HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_NetFetchData.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GAS_NetFetchData.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_NetFetchData__
12 #define __GAS_NetFetchData__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
18 
19 class UT_NetExchange;
20 class UT_NetMessage;
21 
23 {
24 public:
25  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
26 
27  GET_DATA_FUNC_S(GAS_NAME_TRACKERADDR, TrackerAddress);
30 
31  GET_DATA_FUNC_I("peer", Peer);
32  GET_DATA_FUNC_I("npeer", NPeer);
33  GET_DATA_FUNC_S("srcobject", SourceObject);
34  GET_DATA_FUNC_S("srcdataname", SourceDataName);
35  GET_DATA_FUNC_I("srcpeer", SourcePeer);
36 
37  GET_DATA_FUNC_S("dstdataname", DestDataName);
38 protected:
39  explicit GAS_NetFetchData(const SIM_DataFactory *factory);
40  virtual ~GAS_NetFetchData();
41 
42  /// Moves the fields given by FieldName by the given velocity
43  /// field. Moves the points given by GeometryName likewise.
44  virtual bool solveGasSubclass(SIM_Engine &engine,
45  SIM_Object *obj,
46  SIM_Time time,
47  SIM_Time timestep);
48 
49  void processRequest(UT_NetExchange &netxchg,
50  UT_NetMessage *msg,
51  SIM_Engine &engine);
52 
53  void postDataError(UT_NetExchange &netxchg,
54  int dstpeer, const char *errmsg);
55 
56  void attachData(SIM_Engine &engine,
57  SIM_Object *obj,
58  SIM_Time time,
59  const char *dstdataname,
60  const char *data,
61  int len);
62 
63 private:
64  static const SIM_DopDescription *getDopDescription();
65 
69  "Gas Net Fetch Data",
70  getDopDescription());
71 };
72 
73 #endif
74 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:28
#define GAS_API
Definition: GAS_API.h:10
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
#define GET_DATA_FUNC_I(DataName, FuncName)
#define GAS_NAME_TRACKERADDR
Definition: GAS_Utils.h:41
#define GAS_NAME_TRACKERPORT
Definition: GAS_Utils.h:42
GLboolean * data
Definition: glcorearb.h:130
#define GAS_NAME_JOBNAME
Definition: GAS_Utils.h:43
#define GET_DATA_FUNC_S(DataName, FuncName)