Synch with 20010921
This commit is contained in:
@@ -5,6 +5,16 @@
|
||||
|
||||
namespace osg {
|
||||
|
||||
/** META_Object macro define the standard clone, isSameKindAs and className methods.
|
||||
* Use when subclassing from Object to make it more convinient to define
|
||||
* the standard pure virtual clone, isSameKindAs and className methods
|
||||
* which are required for all Object subclasses.*/
|
||||
#define META_Object(name) \
|
||||
virtual Object* clone() const { return new name (); } \
|
||||
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
|
||||
virtual const char* className() const { return #name; }
|
||||
|
||||
|
||||
/** Base class/standard interface for objects which require IO support,
|
||||
cloning and reference counting.
|
||||
Based on GOF Composite, Prototype and Template Method patterns.
|
||||
|
||||
Reference in New Issue
Block a user