00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_NetSliceExchange__
00020 #define __GAS_NetSliceExchange__
00021
00022 #include "GAS_API.h"
00023
00024 #include "GAS_SubSolver.h"
00025 #include "GAS_Utils.h"
00026
00027 #include <SIM/SIM_Slice.h>
00028 #include <GEO/GEO_AttributeHandle.h>
00029
00030 class SIM_GeometryCopy;
00031 class GU_Detail;
00032 class UT_HashTable;
00033
00034 class GAS_API GAS_NetSliceExchange : public GAS_SubSolver
00035 {
00036 public:
00037 GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
00038
00039 GET_DATA_FUNC_S(GAS_NAME_TRACKERADDR, TrackerAddress);
00040 GET_DATA_FUNC_I(GAS_NAME_TRACKERPORT, TrackerPort);
00041 GET_DATA_FUNC_S(GAS_NAME_JOBNAME, JobName);
00042 GET_DATA_FUNC_I("slice", Slice);
00043
00044 GET_DATA_FUNC_B("assignslice", AssignSlice);
00045 GET_DATA_FUNC_B("transferpoints", TransferPoints);
00046 GET_DATA_FUNC_B("exchangeattribs", ExchangeAttribs);
00047 GET_DATA_FUNC_B("deleteexternal", DeleteExternal);
00048
00049 GET_DATA_FUNC_I("blend", Blend);
00050 GET_DATA_FUNC_S("id", Id);
00051 GET_DATA_FUNC_S("sliceattr", SliceAttr);
00052 GET_DATA_FUNC_S("attrib", Attrib);
00053 GET_DATA_FUNC_S("sliceroot", SliceRoot);
00054
00055 GET_DATA_FUNC_F("overlap", Overlap);
00056 GET_DATA_FUNC_F("overlappscale", OverlapPscale);
00057
00058 protected:
00059 explicit GAS_NetSliceExchange(const SIM_DataFactory *factory);
00060 virtual ~GAS_NetSliceExchange();
00061
00062
00063
00064 virtual bool solveGasSubclass(SIM_Engine &engine,
00065 SIM_Object *obj,
00066 SIM_Time time,
00067 SIM_Time timestep);
00068
00069 private:
00070 void doNetExchange(SIM_GeometryCopy *geo,
00071 const SIM_SliceSearchTable &table,
00072 const char *address,
00073 int port,
00074 const char *jobname,
00075 int blendmode);
00076
00077 void buildAttribPacket(ostream &os,
00078 GU_Detail *gdp,
00079 UT_PtrArray<GEO_Point *> &ptlist,
00080 GEO_AttributeHandle &id_gah,
00081 const char *attribstring);
00082
00083
00084 void applyAttribPacket(UT_IStream &is,
00085 GU_Detail *gdp, const UT_HashTable &idlut);
00086
00087 static const SIM_DopDescription *getDopDescription();
00088
00089 DECLARE_STANDARD_GETCASTTOTYPE();
00090 DECLARE_DATAFACTORY(GAS_NetSliceExchange,
00091 GAS_SubSolver,
00092 "Gas Net Slice Exchange",
00093 getDopDescription());
00094 };
00095
00096 #endif
00097