VR-Exchange 2.1 API Documentation
disBroker/startTrans.h
Go to the documentation of this file.
1 /******************************************************************************
2  ** Copyright (c) 1992-2012 VT MAK
3  ******************************************************************************/
4 
5 
6 
7 #ifndef startTrans_H_
8 #define startTrans_H_
9 
13 
14 
15 #include "interactionTrans.h"
16 #include <vl/startInter.h>
17 
19 {
20 public:
21 
23  DtExtStartResumePdu(const DtNetStartResumePdu *initial,
24  DtBufferPtr buffer);
25 
28  DtTimeStampType realWorldTimeType() const;
29  void setRealWorldTimeType(const DtTimeStampType type);
30 
33  DtTimeStampType simulationTimeType() const;
34  void setSimulationTimeType(const DtTimeStampType type);
35 
37  virtual void printDataToStream(std::ostream& stream) const;
38 
39 public:
42  static DtPdu *create(const DtNetPacket *initial,
43  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
44 
45 
46  typedef void (*DtExtStartResumePduCb)(DtExtStartResumePdu *pdu, void *usr);
47 
50  static void addCallback(DtExerciseConn *conn,
51  DtExtStartResumePduCb cb, void *usr);
52  static void removeCallback(DtExerciseConn *conn,
53  DtExtStartResumePduCb cb, void *usr);
54 };
55 
57 
58 
59 namespace MAKVrExchange
60 {
61  class DtPortalStartInteraction;
62  namespace DtDisBroker
63  {
64 
65  class DtDisBroker;
66 
71  {
72  public:
73 
77 
82 
88  static const char* translatorName();
89 
93  virtual const char* virtualTranslatorName() const;
94 
96  virtual void enableTranslator(bool enabled);
97 
114  virtual DtPortalStartInteraction* translate( DtPortalStartInteraction* destination,
115  const DtExtStartResumeInteraction& source );
116 
135  virtual DtExtStartResumeInteraction* translate( DtExtStartResumeInteraction* destination,
136  const DtPortalStartInteraction& source );
137 
138  protected:
139 
148  virtual void createDisInteraction( const DtPortalStartInteraction& incoming );
149 
158  virtual void createPortalInteraction( const DtExtStartResumeInteraction& incoming );
159 
172  static void receiveDisInteraction( DtExtStartResumeInteraction* interaction,
173  void* userData );
174 
187  static void receivePortalInteraction( const DtPortalStartInteraction& interaction,
188  void* userData );
189 
190  private:
191 
193  static const char thisTranslatorName[];
194 
196  static const char thisInteractionName[];
197 
200 
203 
205  int operator==( const DtStartInteractionTranslator& );
206 
208  int operator!=( const DtStartInteractionTranslator& );
209 
210  }; //end class DtStartInteractionTranslator
211 
213  {
214  return thisTranslatorName;
215  }
216 
218  {
219  return translatorName();
220  }
221 
222  }
223 }
224 
225 #endif

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)