Show SMemoryManager.h syntax highlighted
#ifndef __SMEMORYMANAGER_H__
#define __SMEMORYMANAGER_H__
#include <map>
#include <memory>
#include <boost/signals/trackable.hpp>
#include <boost/thread/mutex.hpp>
namespace boost{ class thread; }
#include <osgIntrospectionToolKit/signalslib.hpp>
#include <osg/ref_ptr>
#include <osg/Referenced>
#include <osgIntrospectionToolKit/Export.h>
#include <osgIntrospectionToolKit/CReflectedRefPointer.h>
namespace osgIntrospectionToolKit
{
class OSGINTROSPECTIONTOOLKIT_EXPORT SMemoryManager : public osg::Referenced , public boost::signalslib::trackable
{
public:
typedef std::map<osg::Referenced*, osg::ref_ptr<CReflectedRefPointer> > Map;
typedef Map::iterator iterator;
typedef Map::const_iterator const_iterator;
typedef Map::key_type key_type;
// typedef Map::data_type data_type;
typedef Map::mapped_type data_type;
typedef Map::value_type value_type;
private:
SMemoryManager();
protected:
virtual ~SMemoryManager();
public:
static SMemoryManager* instance();
osg::ref_ptr<CReflectedRefPointer> getOrCreateReflectedRefPointer(osgIntrospection::Value& ref_value);
void reload();
void flush();
void operator () ();
private:
Map _map;
mutable boost::mutex _mutex;
std::auto_ptr<boost::thread> _flushThread;
bool _done;
};
}
#endif // ** __SMEMORYMANAGER_H__ ** //
See more files for this project here