Code Search for Developers
 
 
  

SMemoryManager.h from osgDesigner at Krugle


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

osgDesigner

osgDesigner is a graphical tool used to modify an OpenSceneGraph (OSG) scene using the osgIntrospection framework. OpenSceneGraph developpers will be able to extend osgDesigner at need using (editor | render | osgIntrospection wrapper) plugin system.

Project homepage: http://sourceforge.net/projects/osgdesigner
Programming language(s): C++,Shell Script
License: other

  CArrayItemLink.h
  CIndexedItemLink.h
  CPropertyExtractor.h
  CReflectedInstance.h
  CReflectedPointer.h
  CReflectedRefPointer.h
  CReflectedValueLinkExtractor.h
  CValueTree.h
  CValueTreeFunctor.h
  CValueTreeModifier.h
  CommonStdType.h
  ControlList.h
  ExceptionUtility.h
  Export.h
  IGraph.h
  IReflectedValue.h
  IReflectedValueLink.h
  SMemoryManager.h
  STypeGraph.h
  SWrapperManager.h
  signalslib.hpp