VR-Forces 4.1 Class Documentation
exConnInterface.h
Go to the documentation of this file.
1 
2 #pragma once
3 
7 #include <vl/exerciseConn.h>
8 
9 //This class manages passing calls and data from the main (display engine) thread
10 //to the driver thread, which is what is ticking the DtExerciseConnection.
12 {
13 public:
14  //Construction is done by the driver thread.
16  : myDriver(driver)
17  , myExConn(0)
18  {
21  if (connection)
22  {
23  myExConn = connection->exerciseConn();
24  }
25  }
26 
27  //These functions may be called from a thread other than the driver thread.
28  void sendCommentInteraction(const DtString& data)
29  {
30  //Queue the execute function to be run by the driver thread.
31  //This bind function puts the arguments into the queue as well, which
32  //will then be processed by the execute function in the other thread.
34  boost::bind(&DtExConnInterface::executeSendCommentInteraction, this, data));
35  }
36 
38 protected:
39 
40  //This is the function will get called in the driver thread, and can
41  //make the normal calls on the exercise connection.
42  void executeSendCommentInteraction(DtString commentString);
43 
45  DtExerciseConn* myExConn;
46 };
47 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)