VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgNodeObserver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <boost/unordered_map.hpp>
16 
17 #include <osg/Observer>
18 #include <osg/Node>
19 
20 namespace makVrv
21 {
23  class DT_DLL_VRVOSG DtOsgNodeObserver : public osg::Observer
24  {
25  public:
26  DtOsgNodeObserver(osg::Node* node);
27  virtual ~DtOsgNodeObserver();
28 
29  virtual void objectDeleted(void* object);
30 
31  boost::signal<void (osg::Node*)> signal_NodeDeleting;
32  private:
33  osg::Node* myNode;
34  };
35 
36  typedef boost::unordered_map<osg::Node*, DtOsgNodeObserver*>
38 
42  {
43  public:
46 
48  virtual ~DtOsgNodeObserverSupervisor();
49 
51  void createObserver(osg::Node* node);
52 
54  bool observerExists(osg::Node* node);
55 
57  void destroyObserver(osg::Node* data, bool bCheck);
58 
60  void removeAndDestroyAllObservers(void);
61 
65  boost::signal<void (osg::Node*)> signal_NodeDeleting;
66  private:
67 
68  void slot_NodeDeleting(osg::Node* node);
69 
71 
73  };
74 
75 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)