VR-Exchange 2.1 API Documentation
tenaBroker/detInTrans.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2003 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: detInTrans.h,v $ $Revision: 1.9 $ $State: Exp $
7 *********************************************************************/
8 #ifndef detInTrans_H_
9 #define detInTrans_H_
10 
16 
17 class DtDetonationInteraction;
18 
19 namespace MAKVrExchange {
20 class DtPortalDetonationInteraction;
21 }
22 
23 #include "interactionTrans.h" //DtInteractionTranslator
24 
25 
26 namespace MAKVrExchange { namespace DtTenaBroker {
27 
28 class DtTenaBroker;
29 
34 {
35 
36 public:
37 
39 
41 
42 private:
43 
46 
49 
50 public:
51 
52  static const char* translatorName();
53 
54  virtual const char* virtualTranslatorName() const;
55 
57  virtual void enableTranslator(bool enabled);
58 
75  virtual DtPortalDetonationInteraction* translate(
76  DtPortalDetonationInteraction* destination,
77  const DtDetonationInteraction& source );
78 
97  virtual DtDetonationInteraction* translate( DtDetonationInteraction* destination,
98  const DtPortalDetonationInteraction& source );
99 
100 protected:
101 
103  static const char thisTranslatorName[];
104 
105  void loadWarheadTypeMappingFile();
106  void loadDetonatinResultMappingFile();
107 
108  virtual void createTenaInteraction( const DtPortalDetonationInteraction& incoming );
109 
110  virtual void createPortalInteraction( const DtDetonationInteraction& incoming );
111 
112  virtual void generateFirePdu( const DtDetonationInteraction& incomding );
113 
116  virtual void remapDetonationResult( DtDetonationInteraction* incoming,
117  DtDetonationResult detonationType) const;
119  virtual void remapDetonationResult( DtPortalDetonationInteraction* outgoing,
120  DtU32 detonationType ) const;
121 
122  static void receiveTenaInteraction( DtDetonationInteraction* interaction, void* userData );
123 
124  static void receivePortalInteraction( const DtPortalDetonationInteraction& interaction, void* userData );
125 
126 protected:
127 
128  std::map<unsigned int,unsigned int> myTenaToPortalWarheadMap;
129  std::map<unsigned int,unsigned int> myPortalToTenaWarheadMap;
130 
131  std::map<unsigned int, DtDetonationResult> myTenaToPortalResultMap;
132  std::map<DtDetonationResult, unsigned int> myPortalToTenaResultMap;
133 
134 private:
135 
137  int operator==( const DtDetonationInteractionTranslator& rightOperand ) const;
138 
140  int operator!=( const DtDetonationInteractionTranslator& rightOperand ) const;
141 
142 }; //end class DtDetonationInteractionTranslator
143 
144 
145 }}
146 
147 #endif //end #ifndef detInTrans_H_

Document ID: Generated on Tue Aug 7 22:07:13 EDT 2012 from SVN revision 117874
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)