VR-Forces 4.1 Class Documentation
objectFilterManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //\file objectFilterManager.h
7 
8 #pragma once
9 
12 #include <vrvCore/DtUniqueID.h>
13 #include <vrvCore/DtStateView.h>
14 #include <vrvCore/DtEntityState.h>
15 
16 #include <map>
17 
18 namespace makVrf
19 {
20  class DtVrfSelectionFilter;
21 }
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtSimObjectEntry;
27 }
28 
29 //This class will be responsible for keeping track of filters that are used
30 //to show/hide objects in the system. It will make connections for new object
31 //additions as well as updates to those objects. When an object is added or
32 //updated it will be passed through the set of filters for visibility.
34 {
35 public:
36  //CTOR
38 
39  //DTOR
40  virtual ~DtObjectFilterManager();
41 
42  //Method that will be used to return the singleton of this manager that is registered with the DE.
43  //If not registered will create and register a singleton
45 
46  //Activate/deactive a filter for modifying visibility. If filter is active and already exists will
47  //not process. Same with deactivating and not having a filter exist
48  virtual void activateFilter(bool, const makVrf::DtVrfSelectionFilter&);
49 
50  //Returns whether or not this filter is currently active
51  virtual bool filterActive(const makVrf::DtVrfSelectionFilter&) const;
52 
53 protected:
56 
59 
61  virtual void slot_tick();
62 
66 
70 
72  virtual void activateFilter(const makVrf::DtVrfSelectionFilter&);
74 
76  virtual int showHideContext(const std::string& filter);
77 
79  virtual void show(makVrv::DtElementID, int context, bool makeVisible);
80 
81 protected:
83 
84  typedef std::map<std::string, makVrf::DtVrfSelectionFilter*> FilterMap;
86 
90 
94 
96  typedef std::map<std::string, bool> FilterContextMap;
98  {
101  };
102 
104  typedef std::map<makVrv::DtElementID, FilterContext> ElementContextMap;
105 
107 
108  // Items that are waiting for vrlink context to show up for
109  std::map<makVrv::DtElementID, bool> myWaiting;
110 
112  typedef std::map<std::string, int> ShowHideContextMap;
114 };

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)