#include <IZUnknown.hpp>
Public Member Functions | |
| virtual Retval MQUALIFIER | askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)=0 |
| virtual void MQUALIFIER | addRef () const =0 |
| virtual void MQUALIFIER | release () const =0 |
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::TAbstractMessage, zeus::TBinaryMessage, zeus::TCommPipe, zeus::TCommPipe_Stub, zeus::TLocalMapMessage, zeus::TMapMessage, zeus::TMessagePool_Stub, zeus::TMessageServerConnection_Stub, zeus::TObjectMessage, zeus::TTextMessage, zeus::TXMLMessage, zeus::TAbstractModuleSession, zeus::TModule, zeus::TSimpleCommand, zeus::TSystemManager, zeus::TZeusAPI, zeus::TBluetoothSocket, zeus::TPeerFinder, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractXProcess, zeus::TBatchContext, zeus::TXMLBatchProcessor, zeus::TXProcProject, zeus::TXProcTarget, zeus::TAbstractRemoteObject, zeus::TAbstractStub, zeus::TNamedContext, zeus::TNamedContext_Stub, zeus::TNamedObject, zeus::TNaming, zeus::TRemoteMethodCall, zeus::TRemoteReference, zeus::TFingerPrint, zeus::TSecurityManager, zeus::TAbstractInputStream, zeus::TAbstractMainThread, zeus::TAbstractOutputStream, zeus::TCriticalSection, zeus::TEvent, zeus::TFileSystemWatcher, zeus::TLibraryManager, zeus::TMutex, zeus::TPropertyFile, zeus::TSettingsManager, zeus::TSingleLinkedList< T >::TSingleListIterator, zeus::TSingletonManager, zeus::TStdLogger, zeus::TStringContainer, zeus::TSynchronizeObject, zeus::TThread, zeus::TThreadManager, zeus::TThreadMessageQueue, zeus::TTimerEvent, zeus::TTimerEventGroupContainer, zeus::TTimerEventHandleCreator, zeus::TTimerManager, zeus::TVariableResolver, zeus::TXErrorObject, zeus::TXLoaderObject, zeus::TXMemberVariable, zeus::TXObject, zeus::TXObjectCollection, zeus::TXObjectFactory, zeus::TXRootObject, zeus::TXSynchronAction, zeus::TZObject, zeus::TZObjectFactory, and zeus::TZVariant.
| virtual Retval MQUALIFIER zeus::IZUnknown::askForInterface | ( | const InterfaceID & | rInterfaceID, |
| IZUnknown *& | rpIface | ||
| ) | [pure virtual] |
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.
| rInterfaceID | : ID of the requested interface |
| rpIface | : return value of the interface. The pointer contains the address of the requested interface |
| RET_NOERROR | : Interface returned |
| RET_UNKNOWN_INTERFACE | : Interface is not valid or not implemented |
Implemented in zeus::TCommPipe, zeus::TCommPipe_Stub, zeus::TLocalMapMessage, zeus::TMessagePool_Stub, zeus::TMessageServerConnection_Stub, zeus::TAbstractModuleSession, zeus::TModule, zeus::TSimpleCommand, zeus::TSystemManager, zeus::TZeusAPI, zeus::TBluetoothSocket, zeus::TPeerFinder, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractXProcess, zeus::TBatchContext, zeus::TXMLBatchProcessor, zeus::TXProcProject, zeus::TXProcTarget, zeus::TAbstractRemoteObject, zeus::TAbstractStub, zeus::TNamedContext, zeus::TNamedContext_Stub, zeus::TNamedObject, zeus::TNaming, zeus::TRemoteMethodCall, zeus::TSecurityManager, zeus::TAbstractInputStream, zeus::TAbstractMainThread, zeus::TAbstractOutputStream, zeus::TCriticalSection, zeus::TEvent, zeus::TFileSystemWatcher, zeus::TLibraryManager, zeus::TMutex, zeus::TPropertyFile, zeus::TSettingsManager, zeus::TSingleLinkedList< T >::TSingleListIterator, zeus::TSingletonManager, zeus::TStdLogger, zeus::TStringContainer, zeus::TSynchronizeObject, zeus::TThread, zeus::TThreadManager, zeus::TThreadMessageQueue, zeus::TTimerEvent, zeus::TTimerEventGroupContainer, zeus::TTimerEventHandleCreator, zeus::TTimerManager, zeus::TVariableResolver, zeus::TXErrorObject, zeus::TXLoaderObject, zeus::TXMemberVariable, zeus::TXObject, zeus::TXObjectCollection, zeus::TXObjectFactory, zeus::TXRootObject, zeus::TXSynchronAction, zeus::TZObject, and zeus::TZObjectFactory.
| virtual void MQUALIFIER zeus::IZUnknown::release | ( | ) | const [pure virtual] |
This method decreases the reference counter of this object. This call is const as well (like addRef()). The killing of an object is allowed by const method, because the content is not used any more.
Implemented in zeus::TAbstractMessage, zeus::TBinaryMessage, zeus::TCommPipe, zeus::TCommPipe_Stub, zeus::TLocalMapMessage, zeus::TMapMessage, zeus::TMessagePool_Stub, zeus::TMessageServerConnection_Stub, zeus::TObjectMessage, zeus::TTextMessage, zeus::TXMLMessage, zeus::TAbstractModuleSession, zeus::TModule, zeus::TSimpleCommand, zeus::TSystemManager, zeus::TZeusAPI, zeus::TBluetoothSocket, zeus::TPeerFinder, zeus::TSerialConnection, zeus::TSocket, zeus::TAbstractXProcess, zeus::TBatchContext, zeus::TXMLBatchProcessor, zeus::TXProcProject, zeus::TXProcTarget, zeus::TAbstractRemoteObject, zeus::TAbstractStub, zeus::TNamedContext, zeus::TNamedContext_Stub, zeus::TNamedObject, zeus::TNaming, zeus::TRemoteMethodCall, zeus::TRemoteReference, zeus::TFingerPrint, zeus::TSecurityManager, zeus::TAbstractInputStream, zeus::TAbstractMainThread, zeus::TAbstractOutputStream, zeus::TCriticalSection, zeus::TEvent, zeus::TFileSystemWatcher, zeus::TLibraryManager, zeus::TMutex, zeus::TPropertyFile, zeus::TSettingsManager, zeus::TSingleLinkedList< T >::TSingleListIterator, zeus::TSingletonManager, zeus::TStdLogger, zeus::TStringContainer, zeus::TSynchronizeObject, zeus::TThread, zeus::TThreadManager, zeus::TThreadMessageQueue, zeus::TTimerEvent, zeus::TTimerEventGroupContainer, zeus::TTimerEventHandleCreator, zeus::TTimerManager, zeus::TVariableResolver, zeus::TXErrorObject, zeus::TXLoaderObject, zeus::TXMemberVariable, zeus::TXObject, zeus::TXObjectCollection, zeus::TXObjectFactory, zeus::TXRootObject, zeus::TXSynchronAction, zeus::TZObject, zeus::TZObjectFactory, and zeus::TZVariant.