P
Philipp Kraus
Hello,
I have got a problem with the initialization of a static class member
of a singleton class.
The class shows (short) :
class myPluginUse {
public :
template<typename T> T myMethod();
private :
static myPluginUse* m_instance;
}
This class is used in the main program and I initialialize the static
member on the before the
main function. This works well, but this class is also used in a plugin
(DLL) but at the moment
I need a initialization of the static member also on the plugin, which
includes this header.
But the plugin cpp file needs only the public part of the class, not
the private or static member
or any implementation. I can "copy" the header part, but I don't want
to use two different files.
How can I use "one" header without a static initialization on my plugin
cpp and initialization on
my main program?
Thanks
Phil
I have got a problem with the initialization of a static class member
of a singleton class.
The class shows (short) :
class myPluginUse {
public :
template<typename T> T myMethod();
private :
static myPluginUse* m_instance;
}
This class is used in the main program and I initialialize the static
member on the before the
main function. This works well, but this class is also used in a plugin
(DLL) but at the moment
I need a initialization of the static member also on the plugin, which
includes this header.
But the plugin cpp file needs only the public part of the class, not
the private or static member
or any implementation. I can "copy" the header part, but I don't want
to use two different files.
How can I use "one" header without a static initialization on my plugin
cpp and initialization on
my main program?
Thanks
Phil