interface declare More...
Go to the source code of this file.
Classes | |
| class | ZFInterface |
| dummy base of interface types More... | |
Macros | |
| #define | zfinterface |
| shows the type is an interface, see ZFInterface | |
| #define | zfimplement |
| shows class implement from interface, see ZFInterface | |
| #define | ZFINTERFACE_DECLARE_WITH_CUSTOM_CTOR(InterfaceName, ParentInterface, ...) |
| see ZFINTERFACE_DECLARE | |
| #define | ZFINTERFACE_DECLARE(InterfaceName, ParentInterface, ...) |
| see ZFInterface | |
| #define | ZFIMPLEMENT_DECLARE(ImplementedInterfaces, ...) |
| see ZFINTERFACE_DECLARE | |
| #define | ZFINTERFACE_ON_INIT_DECLARE() |
| declare custom init step for the interface | |
| #define | ZFINTERFACE_ON_INIT_DEFINE(YourInterface) |
| see ZFINTERFACE_ON_INIT_DECLARE | |
| #define | ZFINTERFACE_ON_DEALLOC_DECLARE() |
| see ZFINTERFACE_ON_INIT_DECLARE | |
| #define | ZFINTERFACE_ON_DEALLOC_DEFINE(YourInterface) |
| see ZFINTERFACE_ON_INIT_DECLARE | |
interface declare
| #define ZFINTERFACE_DECLARE_WITH_CUSTOM_CTOR | ( | InterfaceName, | |
| ParentInterface, | |||
| ... ) |
you may have custom constructor with this macro, but must be declared as protected with no params, and must also declare an virtual protected destructor
| #define ZFINTERFACE_ON_INIT_DECLARE | ( | ) |
declare custom init step for the interface
although ZFInterface is designed as interface type, it is normal class in C++ in fact, you can supply your own custom init step
once declared, the init step would be called after ZFObject::objectOnInit and before ZFObject::objectOnInitFinish, ordered from parent interface to child interface, and the paired ZFINTERFACE_ON_DEALLOC_DECLARE would be called after ZFObject::objectOnDeallocPrepare and before ZFObject::objectOnDealloc
note: use only if necessary, and at your own risk
overrided init step would be called for each instance of this class and all of subclasses, take care of performance