![]() |
VR-Link API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 00007 #ifndef DtReflectedAggregate_H_ 00008 #define DtReflectedAggregate_H_ 00009 00010 #if DtHLA 00011 00012 #include "aggregateSR.h" 00013 #include "hReflectedObj.h" 00014 00019 00022 class DT_DLL_VL DtReflectedAggregate; 00023 typedef void (*DtAggregateCallbackFunction)( 00024 DtReflectedAggregate* obj, void* userData); 00025 00031 00032 class DT_DLL_VL DtReflectedAggregate : public DtReflectedObject 00033 { 00034 public: 00035 00037 typedef DtAggregateStateRepository* (*DtStateRepCreator)(); 00038 00039 public: 00040 00042 DtReflectedAggregate(DtHlaObject* obj, DtExerciseConn* conn); 00043 00045 virtual ~DtReflectedAggregate(); 00046 00049 virtual DtAggregateStateRepository* aggregateStateRep() const; 00050 00052 virtual DtAggregateStateRepository* asr() const; 00053 00055 virtual DtReflectedAggregate* next() const; 00056 00058 virtual DtReflectedAggregate* prev() const; 00059 00062 virtual DtReflectedAggregate* wrapNext() const; 00063 00066 virtual DtReflectedAggregate* wrapPrev() const; 00067 00069 virtual void addPostUpdateCallback( 00070 DtAggregateCallbackFunction cb, void* userData); 00071 virtual void removePostUpdateCallback( 00072 DtAggregateCallbackFunction cb, void* userData); 00073 00074 public: 00075 00077 static DtStateRepCreator setStateRepCreator(DtStateRepCreator creator); 00078 00079 public: 00080 00083 #if DtHLA_1516 00084 virtual RTI::ObjectInstanceHandle aggregateObjectId() const; 00085 #else 00086 virtual RTI::ObjectHandle aggregateObjectId() const; 00087 #endif 00088 00089 protected: 00090 00092 DtReflectedAggregate(const DtReflectedAggregate& orig); 00093 00095 DtReflectedAggregate& operator=(const DtReflectedAggregate& orig); 00096 00097 protected: 00098 00099 static DtStateRepCreator theStateRepCreator; 00100 }; 00101 00102 inline DtAggregateStateRepository* 00103 DtReflectedAggregate::aggregateStateRep() const 00104 { 00105 return (DtAggregateStateRepository*) myStateRep; 00106 } 00107 00108 inline DtAggregateStateRepository* 00109 DtReflectedAggregate::asr() const 00110 { 00111 return (DtAggregateStateRepository*) myStateRep; 00112 } 00113 00114 #endif //! DtHLA 00115 #endif //! DtReflectedAggregate_H_ 00116