<upf/upf.h>
instead.#include <stdio.h>
#include <upf/abi.h>
#include <string>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | upf |
Defines | |
#define | UPF_DECLARE_CLASS(classname) |
Declares that a class is available to UPF system. | |
#define | UPF_INTERFACE(iface) |
Declares that the class implements interface iface. | |
#define | UPF_PROPERTY(name, value) |
Assigns property to the class. | |
#define | UPF_REQUIRES_CLASS(classname) |
Declares that class named classname must be available. | |
#define | UPF_IMPLEMENT_CLASS(classname) |
This macro expands to implementation of UPF boilerplate code. | |
#define | UPF_REGISTER_CLASS(classname) |
Register class classname in UPF system. | |
#define | UPF_DLL_MODULE() |
Declarator used to enumerate classes exported from DLL. | |
#define | UPF_EXPORTED_CLASS(classname) |
Declare that class classname should be exported from DLL. | |
#define | UPF_ON_LOAD(func) |
Function func will be called immediately after the DLL module is loaded. | |
#define | UPF_ON_UNLOAD(func) |
Function func will be called before the DLL module is unloaded. |
|
Value: typedef ::upf::StdFactory< classname > _upfFactory; \ typedef ::upf::ClassRegistrator< classname > _upfRegistrator; \ friend class _upfFactory; \ friend class _upfRegistrator; |
|
Value: private:\ typedef classname _upfClassType; \ upf_Object _upf_object; \ static void _upfMultiPurposeHook(::upf::MultiPurposeHookArgs *data, classname *instance); \ static void _upf_initClass(::upf::IWriteableClassInfo *classinfo); \ static ::upf::CID _upf_getCID(); \ void _upf_initInstance(); \ public: \ upf_Object* _upf_getABIObject() { return &_upf_object; } \ void incRef(); \ void decRef(); \ ::upf::InterfacePtr queryInterface(const ::upf::IID& iface); \ ::upf::CID getClassID(); |
|
Declares that a class is available to UPF system. This macro will add some internally used variables and implementations of IObject methods. This macro must be part of class declaration. Example: namespace foo { class Bar : public my::IBar { ... UPF_DECLARE_CLASS(Bar) }; }
|
|
Declarator used to enumerate classes exported from DLL. The macro expands to code that declares and implements DLL's entry point. An example: UPF_DLL_MODULE() { UPF_EXPORTED_CLASS(ClassOne) UPF_EXPORTED_CLASS(ClassTwo) }
|
|
Declare that class classname should be exported from DLL. For use only inside UPF_DLL_MODULE statement.
|
|
This macro expands to implementation of UPF boilerplate code. It must be used for every class that contains UPF_DECLARE_CLASS in its declaration. UPF_IMPLEMENT_CLASS is followed by { } brackets that contains UPF_INTERFACE and UPF_PROPERTY declarations.
UPF_IMPLEMENT_CLASS(foo::Bar) { UPF_INTERFACE(my::IBar) UPF_PROPERTY("Description", "A simple calculator implementation") UPF_PROPERTY("Author", "Joe Hacker") UPF_REQUIRES_CLASS(foo::Helper) }
|
|
Declares that the class implements interface iface. Can be only used inside a UPF_IMPLEMENT_CLASS block.
|
|
Function func will be called immediately after the DLL module is loaded.
For use only inside UPF_DLL_MODULE statement. func may either return bool value (the module won't be loaded if any of UPF_ON_LOAD functions return
|
|
Function func will be called before the DLL module is unloaded.
For use only inside UPF_DLL_MODULE statement. func may either return bool value (the module won't be loaded if any of UPF_ON_LOAD functions return
|
|
Assigns property to the class. Can be only used inside a UPF_IMPLEMENT_CLASS block.
|
|
Register class classname in UPF system. You must either call this macro or use runtime-loaded DLL and UPF_DLL_MODULE macro, otherwise the class won't be visible in UPF! Example: upf::init(); UPF_REGISTER_CLASS(MyClass); ...
|
|
Declares that class named classname must be available. (I.e. call to upf::create("classname") would create its instance.) If this condition is not met, the class will not be registered in UPF classes registry.
|