Added compoundClassName() convinience method to standardize the generation of the compoundClassName.
This commit is contained in:
parent
6e3f893a0e
commit
6bc413530e
@ -44,7 +44,7 @@ class UserDataContainer;
|
|||||||
|
|
||||||
/** Helper macro that creates a static proxy object to call singleton function on it's construction, ensuring that the singleton gets initialized at startup.*/
|
/** Helper macro that creates a static proxy object to call singleton function on it's construction, ensuring that the singleton gets initialized at startup.*/
|
||||||
#define OSG_INIT_SINGLETON_PROXY(ProxyName, Func) static struct ProxyName{ ProxyName() { Func; } } s_##ProxyName;
|
#define OSG_INIT_SINGLETON_PROXY(ProxyName, Func) static struct ProxyName{ ProxyName() { Func; } } s_##ProxyName;
|
||||||
|
|
||||||
/** Base class/standard interface for objects which require IO support,
|
/** Base class/standard interface for objects which require IO support,
|
||||||
cloning and reference counting.
|
cloning and reference counting.
|
||||||
Based on GOF Composite, Prototype and Template Method patterns.
|
Based on GOF Composite, Prototype and Template Method patterns.
|
||||||
@ -76,6 +76,7 @@ class OSG_EXPORT Object : public Referenced
|
|||||||
|
|
||||||
virtual bool isSameKindAs(const Object*) const { return true; }
|
virtual bool isSameKindAs(const Object*) const { return true; }
|
||||||
|
|
||||||
|
|
||||||
/** return the name of the object's library. Must be defined
|
/** return the name of the object's library. Must be defined
|
||||||
by derived classes. The OpenSceneGraph convention is that the
|
by derived classes. The OpenSceneGraph convention is that the
|
||||||
namespace of a library is the same as the library name.*/
|
namespace of a library is the same as the library name.*/
|
||||||
@ -85,6 +86,9 @@ class OSG_EXPORT Object : public Referenced
|
|||||||
by derived classes.*/
|
by derived classes.*/
|
||||||
virtual const char* className() const = 0;
|
virtual const char* className() const = 0;
|
||||||
|
|
||||||
|
/** return the compound class name that combines the libary name and class name.*/
|
||||||
|
std::string getCompoundClassName() const { return std::string(libraryName()) + std::string("::") + std::string(className()); }
|
||||||
|
|
||||||
|
|
||||||
/** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/
|
/** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/
|
||||||
virtual void setThreadSafeRefUnref(bool threadSafe);
|
virtual void setThreadSafeRefUnref(bool threadSafe);
|
||||||
|
Loading…
Reference in New Issue
Block a user