VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayGroupManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
16 
17 #include <boost/unordered_map.hpp>
18 
19 #include <list>
20 
21 namespace makVrv
22 {
23 
24  class DtBaseConnection;
25 
38  {
39  public:
40 
43  {
44  HiddenGroup = 0,
45  DefaultGroup = 1,
46  UnusedLowGroup = 2,
47  GroupsGroup = 500000,
48  UnusedHighGroup = 1000000,
49  };
50 
52  typedef std::list<std::string> GroupRangeList;
53 
54  public:
55 
58  static DtOverlayGroupManager& instance( DtDe& de );
59 
62  static DtOverlayGroupManager& instance( DtBaseConnection& sim );
63 
65  static void copyInstance( DtBaseConnection& sim, DtDe& de );
66 
68  virtual ~DtOverlayGroupManager();
69 
83  inline void initializeDefaultGroupSets()
84  {
85  addOverlayGroupSet( "hoverGroupSet" );
86  addOverlayGroupSet( "selectedGroupSet" );
87  addOverlayGroupSet( "iconsGroupSet" );
88  addOverlayGroupSet( "rangeInfoGroupSet" );
89  addOverlayGroupSet( "entityInfoPinnedGroupSet" );
90  addOverlayGroupSet( "symbolDecorationGroupSet" );
91  }
92 
95  virtual void addOverlayGroupSet( const std::string& name );
96 
100  virtual void addOverlayGroupSetUnder( const std::string& name,
101  const std::string& beforeName );
102 
106  virtual void addOverlayGroupSetAbove( const std::string& name,
107  const std::string& afterName );
108 
111  virtual const GroupRangeList& overlayGroupSets() const;
112 
116  virtual GroupRangeList& overlayGroupSets();
117 
123  virtual unsigned int nextGroupId( const std::string& groupSetName );
124 
125  protected:
126 
127  template <typename ManagerClass>
128  friend ManagerClass& defaultManagerInstanceFunction(DtDe&,bool);
129 
130  template <typename ManagerClass>
131  friend void defaultManagerRegisterInstanceFunction(DtDe&,ManagerClass*);
132 
135 
138 
141 
145  virtual void initializeGroupIdGenerators();
146 
147  protected:
148 
154  {
155  public:
156 
161  DtOverlayGroupIdGenerator( const std::string& name,
162  unsigned int minId, unsigned int maxId );
163 
169  unsigned int nextGroupId();
170 
171  protected:
172 
173  std::string myGroupName;
174 
175  unsigned int myNextId;
176 
177  unsigned int myMinId;
178  unsigned int myMaxId;
179 
180  };
181 
182  protected:
183 
185  typedef boost::unordered_map<std::string,DtOverlayGroupIdGenerator*>
187 
189 
191 
193 
194  unsigned int myNextGroupId;
195 
197 
198  };
199 
200 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)