![]() |
ai::Ref< X > Class Template ReferenceMany object types are reference counted, such as dictionaries (
Detailed Descriptiontemplate<class X>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ai::Ref< X >::Ref | ( | const X & | x, | |
| IncrementPolicy | policy = DoIncrement | |||
| ) | [inline] |
Constructs a reference to an object and conditionally increments the reference count based on 'policy'.
References AICountedObjectSuite::AddRef, ai::DoIncrement, ai::GetAICountedObjectSuitePtr(), and ai::Ref< X >::x.
Copy-constructs a reference from another reference, and increments the reference count.
References AICountedObjectSuite::AddRef, ai::GetAICountedObjectSuitePtr(), and ai::Ref< X >::x.
Destructor.
Decrements the reference count.
References ai::GetAICountedObjectSuitePtr(), AICountedObjectSuite::Release, and ai::Ref< X >::x.
| void ai::Ref< X >::Assign | ( | const X & | x, | |
| IncrementPolicy | policy = DoIncrement | |||
| ) | [inline] |
Assignment function, decrements the reference count of the current object and conditionally increments the count of the newly assigned object based on 'policy'.
References AICountedObjectSuite::AddRef, ai::DoIncrement, ai::GetAICountedObjectSuitePtr(), AICountedObjectSuite::Release, and ai::Ref< X >::x.
| ai::Ref< X >::operator X | ( | ) | const [inline] |
Implicit conversion to an X allows a Ref<X> to be used wherever an X can appear.
References ai::Ref< X >::x.
Comparison operator, tests whether the same objects are identified by both references.
References ai::Ref< X >::x.
| X * ai::Ref< X >::operator<< | ( | void(*)(const RefReplaceParam &p) | f | ) | [inline] |
Allows a Ref<X> to be passed to a function that takes an X*.
Releases the current referenced object and expects the function to assign a new object to the pointer and increment its reference count. Use the function Replace() for the dummy parameter p.
References ai::GetAICountedObjectSuitePtr(), AICountedObjectSuite::Release, and ai::Ref< X >::x.
Assignment operator, decrements the reference count of the current object and increments the count of the newly assigned object.
References AICountedObjectSuite::AddRef, ai::GetAICountedObjectSuitePtr(), AICountedObjectSuite::Release, and ai::Ref< X >::x.
Comparison operator, tests whether the same objects are identified by both references.
References ai::Ref< X >::x.
Allows a Ref<X> to be passed to the AIEntrySuite ToXXX functions.
Increments the reference count to offset the decremented count on the API side, keeping the count correct and allowing the destructor on the plug-in side to dispose of the object.
References AICountedObjectSuite::AddRef, ai::GetAICountedObjectSuitePtr(), and ai::Ref< X >::x.
| Contents | Suites | Classes | Class Index | Member Index |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||