class RED::State
This class defines the user transaction needed to edit engine data. More...
#include <REDState.h>
Inherits: Object.
Public functions:
State ( RED::Object * iResmgr, int iNumber, int iTransactionMode ) | |
State ( ) | |
~State ( ) | |
virtual void * | As ( const RED::CID & iCID ) |
virtual const void * | As ( const RED::CID & iCID ) const |
template< class T_As > const T_As * | As ( ) const |
template< class T_As > T_As * | As ( ) |
int | GetNumber ( ) const |
RED::Object * | GetResourceManager ( ) const |
bool | InTransaction ( ) const |
bool | operator!= ( const RED::State & iCompare ) const |
bool | operator== ( const RED::State & iCompare ) const |
Public static functions:
static RED::CID | GetClassID ( ) |
static const RED::State & | GetInvalidState ( ) |
static const RED::State & | GetZeroState ( ) |
Protected variables:
int | _mode |
int | _number |
RED::Object * | _resmgr |
Detailed description:
This class defines the user transaction needed to edit engine data.
Header of the State class. The state defines a transaction starting with a RED::IResourceManager::BeginState call and ending with a RED::IResourceManager::EndState call.
Between these two functions, the RED::IResourceManager::GetState call retrieves the current transaction parameter that must be supplied to Red sdk API calls to edit data in the cluster.
The state has a transaction number (first transaction is number 1), points to the cluster's resource manager, and has a transaction mode indicating whether we're in a valid transaction or outside of it.
SDK calls return RED_WORKFLOW_ERROR when transaction errors arise.
Functions documentation
public RED::State::State | ( | RED::Object * | iResmgr, |
int | iNumber, | ||
int | iTransactionMode | ||
) |
State construction method.
Parameters:
iResmgr: | The cluster's resource manager address. |
iNumber: | Transaction number. |
iTransactionMode: | Set in or out of transaction. |
public RED::State::State | ( | ) |
State construction method.
public RED::State::~State | ( | ) |
State destruction method.
public static RED::CID RED::State::GetClassID | ( | ) |
Reimplements: RED::Object::GetClassID.
public static const RED::State & RED::State::GetInvalidState | ( | ) |
Returns:
public static const RED::State & RED::State::GetZeroState | ( | ) |
Returns:
Returns a state in a valid transaction, that'll always access the most recent data container in any object. This state bypasses internal REDsdk transaction mechanisms and always write 'in place'existing data containers. It can eventually create a new data container for a fresh blank object.
public virtual void * RED::State::As | ( | const RED::CID & | iCID | ) |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::Object::As.
public virtual const void * RED::State::As | ( | const RED::CID & | iCID | ) const |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::Object::As.
template< class T_As > public const T_As * RED::State::As | ( | ) const |
Template version of the as const method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::Object::As.
template< class T_As > public T_As * RED::State::As | ( | ) |
Template version of the as method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::Object::As.
public int RED::State::GetNumber | ( | ) const |
Returns:
public RED::Object * RED::State::GetResourceManager | ( | ) const |
Returns:
public bool RED::State::InTransaction | ( | ) const |
Returns:
public bool RED::State::operator!= | ( | const RED::State & | iCompare | ) const |
State difference operator.
Parameters:
iCompare: | Right handed operator compared with this. |
Returns:
public bool RED::State::operator== | ( | const RED::State & | iCompare | ) const |
State comparison operator.
Parameters:
iCompare: | Right handed operator compared with this. |
Returns:
Variables documentation
Indicates whether we're in or outside of a transaction.
Number of the current transaction.
Address of the cluster's resource manager, when available.