VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
statePropertyDecorationFactory.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
10 
11 #include <map>
12 #include <vector>
13 #include <string>
14 
15 namespace makVrv
16 {
17  class DtBaseConnection;
18  class DtDe;
19 }
20 
21 namespace makVrf
22 {
23  class DtStatePropertyDecorationCreator;
24  class DtStatePropertyDecoration;
25  class DtStatePropertyDecorationVisualizer;
26 
31  {
32  public:
34  {
35  CreatorStruct() : creator(0), index(-1) {};
36  CreatorStruct(DtStatePropertyDecorationCreator* c, int i) : creator(c), index(i) {};
37  CreatorStruct(const CreatorStruct& orig) : creator(orig.creator), index(orig.index) {};
38 
40  int index;
41  };
42 
43  typedef std::map<std::string, CreatorStruct> CreatorMap;
44 
46  template <typename InstanceOwner>
48  InstanceOwner& owner )
49  {
52  (owner.findInstance("DtStatePropertyDecorationFactory"));
53 
54  if(!factory)
55  {
56  factory = new DtStatePropertyDecorationFactory();
57  owner.registerInstance("DtStatePropertyDecorationFactory",factory);
58  }
59  return *factory;
60  }
61 
64  static void copyInstance(makVrv::DtBaseConnection& root, makVrv::DtDe& src);
65 
68 
70  virtual const CreatorMap& creators() const;
71 
73  virtual void registerCreator(DtStatePropertyDecorationCreator* creator, int index = -1);
74 
76  virtual int decorationOrder(const std::string& decorationName);
77 
79  virtual DtStatePropertyDecoration* createDecoration( DtStatePropertyDecorationVisualizer& parentVisualizer, const std::string& decorationName);
80 
83 
87 
89  virtual void clear();
90 
92  virtual std::vector<DtStatePropertyDecorationCreator*> creatorsInOrder() const;
93 
94  protected:
95 
98 
100  };
101 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Definition: statePropertyDecoration.h:17
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
CreatorStruct()
Definition: statePropertyDecorationFactory.h:35
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:35
Factory for creating state property decorations.
Definition: statePropertyDecorationFactory.h:30
Contains makVrv::DtVirtualBaseClass class.
static DtStatePropertyDecorationFactory & instance(InstanceOwner &owner)
Get the instance of the factory from its owner (&quot;root&quot;)
Definition: statePropertyDecorationFactory.h:47
Base class for state property decoration creators.
Definition: statePropertyDecoration.h:61
Definition: statePropertyDecorationFactory.h:33
CreatorStruct(DtStatePropertyDecorationCreator *c, int i)
Definition: statePropertyDecorationFactory.h:36
int index
Definition: statePropertyDecorationFactory.h:40
CreatorStruct(const CreatorStruct &orig)
Definition: statePropertyDecorationFactory.h:37
CreatorMap myCreators
Definition: statePropertyDecorationFactory.h:99
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
std::map< std::string, CreatorStruct > CreatorMap
Definition: statePropertyDecorationFactory.h:43
This visualizer will allow for show/hide of various bits of state property data. This uses the DtStat...
Definition: statePropertyDecorationVisualizer.h:28

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)