VR-Forces 4.7 Class Documentation
 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 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)