VR-Exchange 2.4 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lromMapper.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #if DtTENA
11 
12 #pragma once
13 
15 #include <vlTena/objectInterface.h>
16 #include <vlutil/vlMachineTypes.h>
17 #include <vector>
18 #include <map>
19 
20 class DtString;
21 
22 namespace MAKVrExchange
23 {
24 
25  namespace DtTenaBroker
26  {
27 
28  class DtExerciseConn;
29 
32  class DT_DLL_VLTENA DtLromMapper
33  {
34  public:
35 
39  typedef const DtString& (*DtObjectInterfaceChooser)(
40  const DtString& vrlinkClassName, void* usr );
41 
42  typedef const DtString& (*DtMessageInterfaceChooser)(
43  const DtString& vrlinkClassName, void* usr );
44 
45  public:
46 
48  DtLromMapper();
49 
51  virtual ~DtLromMapper();
52 
54  virtual void init(DtExerciseConn* exConn) = 0;
55 
57  virtual DtMessageInterface* messageInterface(const DtString& ifName) = 0;
58 
60  virtual DtObjectInterface* objectInterface(const DtString& ifName) = 0;
61 
66  virtual void setObjectInterfaceClassToChoose(
67  const DtString& vrlinkClassName, const DtString& interfaceName);
68 
72  virtual void setMessageInterfaceClassToChoose(
73  const DtString& vrlinkClassName, const DtString& interfaceName);
74 
79  virtual void setObjectInterfaceClassChooser(
80  const DtString& vrlinkClassName, DtObjectInterfaceChooser chooser);
81 
85  virtual void setMessageInterfaceClassChooser(
86  const DtString& vrlinkClassName, DtMessageInterfaceChooser chooser);
87 
93  virtual const DtString& chooseObjectInterfaceClass(const DtString& vrlinkClassName,
94  void* usr = NULL) const;
95 
98  virtual const DtString& chooseMessageInterfaceClass(const DtString& vrlinkClassName,
99  void* usr = NULL) const;
100 
103  DtLromMapper::DtObjectInterfaceChooser objectInterfaceClassChooser(
104  const DtString& vrlinkClassName) const;
105 
109  DtLromMapper::DtMessageInterfaceChooser messageInterfaceClassChooser(
110  const DtString& vrlinkClassName) const;
111 
114  virtual void setObjectInterfaceClassNames(const DtString& vrlinkClassName,
115  const std::vector<DtString>& classes);
116 
119  virtual const std::vector<DtString>& objectInterfaceClassNames(
120  const DtString& vrlinkClassName);
121 
125  virtual void setObjectInterfaceClass(const DtString& vrlinkClassName,
126  const DtString& fomClassName);
127 
130  virtual void setMessageInterfaceClasses(const DtString& vrlinkClassName,
131  const std::vector<DtString>& classes);
132 
136  virtual const std::vector<DtString>& messageInterfaceClasses(
137  const DtString& vrlinkClassName);
138 
142  virtual void setMessageInterfaceClass(const DtString& vrlinkClassName,
143  const DtString& fomClassName);
144 
145  private:
146 
148  DtLromMapper(const DtLromMapper& orig);
149 
151  DtLromMapper& operator=(const DtLromMapper& orig);
152 
153  protected:
154 
155  std::map<DtString, DtString> mySimpleObjectInterfaceChooserList;
156  std::map<DtString, DtObjectInterfaceChooser> myObjectInterfaceChooserList;
157  std::map<DtString, std::vector<DtString> > myObjectInterfaceMapList;
158 
159  std::map<DtString, DtString> mySimpleMessageInterfaceChooserList;
160  std::map<DtString, DtMessageInterfaceChooser> myMessageInterfaceChooserList;
161  std::map<DtString, std::vector<DtString> > myMessageInterfaceMapList;
162 
163  };
164 
165  }
166 }
167 
168 #endif // DtTENA

Document ID: Generated on Thu Jul 23 10:25:22 EDT 2015 from SVN revision 155065
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)