The interface IZUnknown is used as the basic interface of the framework. It defines methods for memory management in C++. The concept is based on reference counters. Each call of addRef will increase the counter, each call of release() will decrease the counter. If the counter reaches zero, the object will be deleted automatically. When creating an new object, the reference counter is initalized with one and no addRef() must be called.
virtual void MQUALIFIER zeus::IZUnknown::addRef |
( |
| ) |
const |
|
pure virtual |
This method increases the reference counter of this object. The call is const because it will not change the content of the object, since the reference counter is not an object data. This allows to handle const reference using addRef() and release().
Implemented in zeus::TZVariant, zeus::TAbstractStub, zeus::TSingleLinkedList< T >::TSingleListIterator, zeus::TSerialConnection, zeus::TSettingsManager, zeus::TAbstractInputStream, zeus::TXObject, zeus::TAbstractOutputStream, zeus::TAbstractRemoteObject, zeus::TBluetoothSocket, zeus::TSocket, zeus::TThread, zeus::TXObjectFactory, zeus::TFileSystemWatcher, zeus::TMapMessage, zeus::TSecurityManager, zeus::TNaming, zeus::TXLoaderObject, zeus::TXSynchronAction, zeus::TXMLMessage, zeus::TAbstractMessage, zeus::TTextMessage, zeus::TLibraryManager, zeus::TObjectMessage, zeus::TBinaryMessage, zeus::TXMemberVariable, zeus::TCommPipe, zeus::TRemoteMethodCall, zeus::TAbstractMainThread, zeus::TModule, zeus::TSimpleCommand, zeus::TXProcProject, zeus::TRemoteReference, zeus::TCriticalSection, zeus::TThreadManager, zeus::TSystemManager, zeus::TXObjectCollection, zeus::TZeusAPI, zeus::TPeerFinder, zeus::TFingerPrint, zeus::TZObject, zeus::TStdLogger, zeus::TCommPipe_Stub, zeus::TXMLBatchProcessor, zeus::TPropertyFile, zeus::TTimerManager, zeus::TMutex, zeus::TOptionManager, zeus::TEvent, zeus::TZObjectFactory, zeus::TAbstractXProcess, zeus::TThreadMessageQueue, zeus::TSingletonManager, zeus::TNamedContext, zeus::TXProcTarget, zeus::TStringContainer, zeus::TSynchronizeObject, zeus::TVariableResolver, zeus::TXRootObject, zeus::TAbstractModuleSession, zeus::TXErrorObject, zeus::TLocalMapMessage, zeus::TBatchContext, zeus::TTimerEventGroupContainer, zeus::TNamedObject, zeus::TTimerEvent, zeus::TTimerEventHandleCreator, zeus::TNamedContext_Stub, zeus::TMessagePool_Stub, and zeus::TMessageServerConnection_Stub.
This method is used to cast to different interface types. This is a secure way asking for other implemented interfaces, since C++ does not reject invalid casts.
- Parameters
-
rInterfaceID | : ID of the requested interface |
rpIface | : return value of the interface. The pointer contains the address of the requested interface |
- Return values
-
RET_NOERROR | : Interface returned |
RET_UNKNOWN_INTERFACE | : Interface is not valid or not implemented |
Implemented in zeus::TZVariant, zeus::TAbstractStub, zeus::TSingleLinkedList< T >::TSingleListIterator, zeus::TSerialConnection, zeus::TSettingsManager, zeus::TAbstractInputStream, zeus::TXObject, zeus::TAbstractOutputStream, zeus::TAbstractRemoteObject, zeus::TBluetoothSocket, zeus::TSocket, zeus::TThread, zeus::TXObjectFactory, zeus::TFileSystemWatcher, zeus::TSecurityManager, zeus::TNaming, zeus::TXLoaderObject, zeus::TXSynchronAction, zeus::TLibraryManager, zeus::TXMemberVariable, zeus::TCommPipe, zeus::TRemoteMethodCall, zeus::TAbstractMainThread, zeus::TModule, zeus::TSimpleCommand, zeus::TXProcProject, zeus::TCriticalSection, zeus::TThreadManager, zeus::TSystemManager, zeus::TXObjectCollection, zeus::TZeusAPI, zeus::TPeerFinder, zeus::TZObject, zeus::TStdLogger, zeus::TCommPipe_Stub, zeus::TXMLBatchProcessor, zeus::TPropertyFile, zeus::TTimerManager, zeus::TMutex, zeus::TOptionManager, zeus::TEvent, zeus::TZObjectFactory, zeus::TAbstractXProcess, zeus::TThreadMessageQueue, zeus::TSingletonManager, zeus::TNamedContext, zeus::TXProcTarget, zeus::TStringContainer, zeus::TSynchronizeObject, zeus::TVariableResolver, zeus::TXRootObject, zeus::TAbstractModuleSession, zeus::TXErrorObject, zeus::TLocalMapMessage, zeus::TBatchContext, zeus::TTimerEventGroupContainer, zeus::TNamedObject, zeus::TTimerEvent, zeus::TTimerEventHandleCreator, zeus::TNamedContext_Stub, zeus::TMessagePool_Stub, and zeus::TMessageServerConnection_Stub.