Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
74140442
Kaydet (Commit)
74140442
authored
Tem 21, 2011
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Drop macros from componentmodule.hxx
üst
d423fd54
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
96 deletions
+79
-96
componentmodule.hxx
comphelper/inc/comphelper/componentmodule.hxx
+0
-92
comphelper_module.hxx
comphelper/source/inc/comphelper_module.hxx
+49
-1
comphelper_module.cxx
comphelper/source/misc/comphelper_module.cxx
+18
-1
comphelper_services.cxx
comphelper/source/misc/comphelper_services.cxx
+6
-1
udlg_services.cxx
svtools/workben/unodialog/udlg_services.cxx
+6
-1
No files found.
comphelper/inc/comphelper/componentmodule.hxx
Dosyayı görüntüle @
74140442
...
@@ -270,98 +270,6 @@ namespace comphelper
...
@@ -270,98 +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_getFactory( \
const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) \
{ \
initializer_function(); \
return module_class::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey ); \
}
//........................................................................
//........................................................................
}
// namespace comphelper
}
// namespace comphelper
//........................................................................
//........................................................................
...
...
comphelper/source/inc/comphelper_module.hxx
Dosyayı görüntüle @
74140442
...
@@ -35,7 +35,55 @@ namespace comphelper { namespace module
...
@@ -35,7 +35,55 @@ namespace comphelper { namespace module
{
{
//........................................................................
//........................................................................
DECLARE_COMPONENT_MODULE
(
ComphelperModule
,
ComphelperModuleClient
)
class
ComphelperModule
:
public
::
comphelper
::
OModule
{
friend
struct
ComphelperModuleCreator
;
typedef
::
comphelper
::
OModule
BaseClass
;
public
:
static
ComphelperModule
&
getInstance
();
private
:
ComphelperModule
();
};
/* -------------------------------------------------------------------- */
class
ComphelperModuleClient
:
public
::
comphelper
::
OModuleClient
{
private
:
typedef
::
comphelper
::
OModuleClient
BaseClass
;
public
:
ComphelperModuleClient
()
:
BaseClass
(
ComphelperModule
::
getInstance
()
)
{
}
};
/* -------------------------------------------------------------------- */
template
<
class
TYPE
>
class
OAutoRegistration
:
public
::
comphelper
::
OAutoRegistration
<
TYPE
>
{
private
:
typedef
::
comphelper
::
OAutoRegistration
<
TYPE
>
BaseClass
;
public
:
OAutoRegistration
()
:
BaseClass
(
ComphelperModule
::
getInstance
()
)
{
}
};
/* -------------------------------------------------------------------- */
template
<
class
TYPE
>
class
OSingletonRegistration
:
public
::
comphelper
::
OSingletonRegistration
<
TYPE
>
{
private
:
typedef
::
comphelper
::
OSingletonRegistration
<
TYPE
>
BaseClass
;
public
:
OSingletonRegistration
()
:
BaseClass
(
ComphelperModule
::
getInstance
()
)
{
}
};
//........................................................................
//........................................................................
}
}
// namespace comphelper::module
}
}
// namespace comphelper::module
...
...
comphelper/source/misc/comphelper_module.cxx
Dosyayı görüntüle @
74140442
...
@@ -35,7 +35,24 @@ namespace comphelper { namespace module
...
@@ -35,7 +35,24 @@ namespace comphelper { namespace module
{
{
//........................................................................
//........................................................................
IMPLEMENT_COMPONENT_MODULE
(
ComphelperModule
);
struct
ComphelperModuleCreator
{
ComphelperModule
m_aComphelperModule
;
};
namespace
{
class
theComphelperModuleInstance
:
public
rtl
::
Static
<
ComphelperModuleCreator
,
theComphelperModuleInstance
>
{};
}
ComphelperModule
::
ComphelperModule
()
:
BaseClass
()
{
}
ComphelperModule
&
ComphelperModule
::
getInstance
()
{
return
theComphelperModuleInstance
::
get
().
m_aComphelperModule
;
}
//........................................................................
//........................................................................
}
}
// namespace comphelper::module
}
}
// namespace comphelper::module
...
...
comphelper/source/misc/comphelper_services.cxx
Dosyayı görüntüle @
74140442
...
@@ -85,6 +85,11 @@ namespace comphelper { namespace module
...
@@ -85,6 +85,11 @@ namespace comphelper { namespace module
}
}
// namespace comphelper::module
}
}
// namespace comphelper::module
//........................................................................
//........................................................................
IMPLEMENT_COMPONENT_LIBRARY_API
(
::
comphelper
::
module
::
ComphelperModule
,
::
comphelper
::
module
::
initializeModule
)
extern
"C"
SAL_DLLPUBLIC_EXPORT
void
*
SAL_CALL
component_getFactory
(
const
sal_Char
*
pImplementationName
,
void
*
pServiceManager
,
void
*
pRegistryKey
)
{
::
comphelper
::
module
::
initializeModule
();
return
::
comphelper
::
module
::
ComphelperModule
::
getInstance
().
getComponentFactory
(
pImplementationName
,
pServiceManager
,
pRegistryKey
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/workben/unodialog/udlg_services.cxx
Dosyayı görüntüle @
74140442
...
@@ -56,6 +56,11 @@ namespace udlg
...
@@ -56,6 +56,11 @@ namespace udlg
}
// namespace udlg
}
// namespace udlg
//........................................................................
//........................................................................
IMPLEMENT_COMPONENT_LIBRARY_API
(
::
udlg
::
UdlgModule
,
::
udlg
::
initializeModule
)
extern
"C"
SAL_DLLPUBLIC_EXPORT
void
*
SAL_CALL
component_getFactory
(
const
sal_Char
*
pImplementationName
,
void
*
pServiceManager
,
void
*
pRegistryKey
)
{
::
udlg
::
initializeModule
();
return
::
udlg
::
UdlgModule
::
getInstance
().
getComponentFactory
(
pImplementationName
,
pServiceManager
,
pRegistryKey
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment