![]() |
VR-Link API Documentation for DIS
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 * hLinearObjPub.h 00007 *********************************************************************/ 00008 00009 #if DtHLA 00010 00011 #ifndef hLinearObjPub_H_ 00012 #define hLinearObjPub_H_ 00013 00014 #include "hObjPub.h" 00015 #include "objectType.h" 00016 00020 00021 class DT_DLL_VL DtLinearObjectRepository; 00022 00039 00040 class DT_DLL_VL DtLinearObjectPublisher : public DtObjectPublisher 00041 { 00042 public: 00043 00046 typedef DtLinearObjectRepository* (*DtStateRepCreator)(); 00047 00048 public: 00049 00051 DtLinearObjectPublisher( 00052 DtLinearObjectRepository *stateRepToUse, 00053 DtExerciseConn* conn, 00054 const char* name = 0, 00055 const DtDDMRegionSet* regionSetToUse = 0); 00056 00058 DtLinearObjectPublisher( 00059 RTI::ObjectClassHandle h, 00060 DtExerciseConn* conn, 00061 const char* name = 0, 00062 const DtDDMRegionSet* regionSetToUse = 0); 00063 00065 DtLinearObjectPublisher( 00066 const DtSyntheticEnvironmentObjectType& type, 00067 DtExerciseConn* conn, 00068 const char* name = 0, 00069 const DtDDMRegionSet* regionSetToUse = 0); 00070 00072 virtual ~DtLinearObjectPublisher(); 00073 00076 virtual DtLinearObjectRepository* linearObjectStateRep(); 00077 00079 virtual DtLinearObjectRepository* losr(); 00080 00081 public: 00082 00084 static DtStateRepCreator setStateRepCreator(DtStateRepCreator creator); 00085 00086 protected: 00087 00089 DtLinearObjectPublisher(const DtLinearObjectPublisher& orig); 00090 00092 DtLinearObjectPublisher& operator= 00093 (const DtLinearObjectPublisher& orig); 00094 00095 //Non-virtual method called from constructor. 00096 const char* objectClassNameFromType 00097 (const DtSyntheticEnvironmentObjectType& type); 00098 00099 protected: 00100 00101 static DtStateRepCreator theStateRepCreator; 00102 }; 00103 00104 inline DtLinearObjectRepository* 00105 DtLinearObjectPublisher::linearObjectStateRep() 00106 { 00107 return (DtLinearObjectRepository*) myStateRep; 00108 } 00109 00110 inline DtLinearObjectRepository* DtLinearObjectPublisher::losr() 00111 { 00112 return (DtLinearObjectRepository*) myStateRep; 00113 } 00114 00115 #endif //hLinearObjPub_H_ 00116 #endif //DtHLA 00117