template <class DO> class RefTemplate : public nn::nex::DORef
Name | Description |
---|---|
DO | Specifies the class of the Duplicated Object to reference. |
Creates safe references (accessors) to duplicated objects.
This is a shallow template class; the shared portion is implemented by DORef
. Specify the Duplicated Object class name as the template argument. In addition, you can use a Ref
that has been defined as the Duplicated Object class in a typedef
statement. For example, if you have a Duplicated Object class called Avatar
, its reference class is defined as AvatarRef
in a typedef
statement.
Under this system, references are used for safe access to Duplicated Objects. This RefTemplate
class provides safe references to Duplicated Objects. By creating Duplicated Object references, you can call C++ functions. If there is a reference to an object, that object can be treated as a C++ object.
As long as there is a reference to a Duplicated Object, the system will not invalidate Duplicated Object pointers. Typically, references to objects are constructed on the stack and deleted when they become unnecessary. When an object is being deleted from a station's Duplicated Object store (by using RemoveFromStoreOperation
), it is important that references to that object be kept only for a short period of time. The system cannot call the destructor on a Duplicated Object if any references to that object remain.
You can create a reference either by explicitly specifying a DOHandle
or explicitly specifying a reference to an object. You can also use the default constructor, which allows you to make the specification later using an assignment operator.
RefTemplate | Initializes the reference as an invalid reference. | |
---|---|---|
operator *
|
Provides access to Duplicated Objects. | |
IsValid
|
Gets whether the DORef instance is valid. |
|
GetHandle
|
Gets a handle to the duplicated object specified by this reference. (Inherits DORef .) |
|
IsSoft | Determines whether DORef is a soft reference to the duplicated object. (Inherits DORef .) |
|
IsHard | Determines whether DORef is a hard reference to the duplicated object. (Inherits DORef .) |
|
SetSoft | Sets DORef to a soft reference. (Inherits DORef .) |
|
SetHard | Sets DORef to a hard reference. (Inherits DORef .) |
|
GetDOPtr
|
Gets a pointer to the duplicated object indicated by this reference. (Inherits DORef .) |
|
Poll
|
Polls to see whether the DORef reference is valid. (Inherits DORef .) |
|
Wait
|
Waits until either the DORef becomes valid or the timeout elapses. (Inherits DORef .) |
nn::nex::RootObject
nn::nex::DORef
nn::nex::RefTemplate
CONFIDENTIAL