diff options
Diffstat (limited to 'comphelper/inc/comphelper/componentmodule.hxx')
-rw-r--r-- | comphelper/inc/comphelper/componentmodule.hxx | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx index 4bc917ef13d3..5893313c8497 100644 --- a/comphelper/inc/comphelper/componentmodule.hxx +++ b/comphelper/inc/comphelper/componentmodule.hxx @@ -270,103 +270,6 @@ namespace comphelper ) ); } - //========================================================================== - //= helpers - //========================================================================== - - //========================================================================== - // declaring a OModule for a component library - -#define DECLARE_COMPONENT_MODULE( ModuleClass, ClientClass ) \ - /* -------------------------------------------------------------------- */ \ - class ModuleClass : public ::comphelper::OModule \ - { \ - friend struct ModuleClass##Creator; \ - typedef ::comphelper::OModule BaseClass; \ - \ - public: \ - static ModuleClass& getInstance(); \ - \ - private: \ - ModuleClass(); \ - }; \ - \ - /* -------------------------------------------------------------------- */ \ - class ClientClass : public ::comphelper::OModuleClient \ - { \ - private: \ - typedef ::comphelper::OModuleClient BaseClass; \ - \ - public: \ - ClientClass() : BaseClass( ModuleClass::getInstance() ) \ - { \ - } \ - }; \ - \ - /* -------------------------------------------------------------------- */ \ - template < class TYPE > \ - class OAutoRegistration : public ::comphelper::OAutoRegistration< TYPE > \ - { \ - private: \ - typedef ::comphelper::OAutoRegistration< TYPE > BaseClass; \ - \ - public: \ - OAutoRegistration() : BaseClass( ModuleClass::getInstance() ) \ - { \ - } \ - }; \ - /* -------------------------------------------------------------------- */ \ - template < class TYPE > \ - class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE > \ - { \ - private: \ - typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass; \ - \ - public: \ - OSingletonRegistration() : BaseClass( ModuleClass::getInstance() ) \ - { \ - } \ - }; - - //========================================================================== - //= implementing a OModule for a component library - -#define IMPLEMENT_COMPONENT_MODULE( ModuleClass ) \ - struct ModuleClass##Creator \ - { \ - ModuleClass m_aModuleClass; \ - }; \ - namespace \ - { \ - class the##ModuleClass##Instance : public rtl::Static<ModuleClass##Creator, the##ModuleClass##Instance> {}; \ - } \ - \ - ModuleClass::ModuleClass() \ - :BaseClass() \ - { \ - } \ - \ - ModuleClass& ModuleClass::getInstance() \ - { \ - return the##ModuleClass##Instance::get().m_aModuleClass; \ - } \ - - //========================================================================== - //= implementing the API of a component library (component_*) - -#define IMPLEMENT_COMPONENT_LIBRARY_API( module_class, initializer_function ) \ - extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( \ - const sal_Char **ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) \ - { \ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; \ - } \ - extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( \ - const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) \ - { \ - initializer_function(); \ - return module_class::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey ); \ - } - //........................................................................ } // namespace comphelper //........................................................................ |