More clean up for synch with 0.8.42

This commit is contained in:
Don BURNS
2001-09-19 21:19:47 +00:00
parent 2462c6273c
commit 7e81f6cfa6
292 changed files with 39673 additions and 0 deletions

37
include/osg/MemoryAdapter Normal file
View File

@@ -0,0 +1,37 @@
#ifndef OSG_MEMORYADAPTER
#define OSG_MEMORYADAPTER 1
#include <osg/Referenced>
namespace osg {
/** Class for adapting the memory management of external data.
* Typically used to specify the memory management of user data
* which can be attached to osg::Node.
*/
class SG_EXPORT MemoryAdapter : public Referenced
{
public:
MemoryAdapter() {}
/** Increment the reference count of the userData.*/
virtual void ref_data(void* /*userData*/) = 0;
/** Decrement the reference count of the userData.
Is usually implemented such that if reference count
is decremented to zero the userData should be
deleted. However, this is entirely up to the
discression of the user who is extending this base class.*/
virtual void unref_data(void* /*userData*/) = 0;
/** not current used, but will be used in future.*/
virtual void* clone_data(void* /*userData*/) { return 0L; }
protected:
virtual ~MemoryAdapter() {}
};
};
#endif