VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
entityPublisherHLA.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
9 #ifndef entityPublisherHLA_H_
10 #define entityPublisherHLA_H_
11 
12 #if DtHLA
13 
14 #include "objectPublisherHLA.h"
15 #include <vlpi/thresholder.h>
16 #include <vlpi/disEnums.h>
17 
18 
20 class DtGeodeticRegion;
23 
30 {
31 public:
32 
37  static const DtEntityType& guiseSameAsType();
38 
39 public:
40 
42  typedef DtEntityStateRepository* (*DtStateRepCreator)();
43 
46  typedef DtGlobalObjectDesignator (*DtDIGuyNameChooser)(
47  DtEntityPublisher& publisher,
48  void* userData);
49 
50 public:
51 
54  DtEntityStateRepository* stateRepToUse,
55  DtExerciseConn* conn,
56  const char* name = 0,
57  const DtDDMRegionSet* regionSetToUse = 0);
58 
61  RTI::ObjectClassHandle h,
62  DtExerciseConn* conn,
63  const char* name = 0,
64  const DtDDMRegionSet* regionSetToUse = 0);
65 
68  const DtEntityType& type,
69  DtExerciseConn* conn,
70  const char* name = 0,
71  const DtDDMRegionSet* regionSetToUse = 0);
72 
75  const DtEntityType& type,
76  DtExerciseConn* conn,
77  DtDeadReckonTypes algorithm,
78  DtForceType forceId,
79  const DtEntityType& guise = guiseSameAsType(),
80  const char* name = 0,
81  const DtDDMRegionSet* regionSetToUse = 0);
82 
89 
91  virtual ~DtEntityPublisher();
92 
95  virtual DtEntityStateRepository* entityStateRep();
96 
98  virtual DtEntityStateRepository* esr();
99 
103  virtual void enableDiGuyInformation();
104 
107  virtual bool tick();
108 
112  virtual DtOwnershipHandler* setOwnershipHandler( DtOwnershipHandler* handler );
113 
115  virtual void divestObject();
116 
121  virtual void setDIGuyNameChooser(DtDIGuyNameChooser chooser, void* userData = 0);
122 
129  virtual DtString chooseDIGuyName(DtDIGuyObjectStateRepository* diGuySR);
130 
131 public:
132 
134  static DtStateRepCreator setStateRepCreator(DtStateRepCreator creator);
135 
136 public:
137 
139 
140  static void setDfltRotationThreshold(double r);
141  static double dfltRotationThreshold();
142  static void setDfltTranslationThreshold(double t);
143  static double dfltTranslationThreshold();
145 
146 
147 protected:
148 
154  const char* name = 0,
155  const DtDDMRegionSet* regionSetToUse = 0);
156 
158  void init();
159 
163  void createGeographicRegion(DtExerciseConn* conn);
164 
167 
170 
174  const char* objectClassNameFromType(const DtEntityType& type);
175 
176 protected:
177 
178  static DtStateRepCreator theStateRepCreator;
179 
181  std::shared_ptr<DtGeodeticRegion> myGeodeticPublishingRegion;
182 
184  DtDIGuyNameChooser myDIGuyNameChooser;
185 
188 };
189 
191 {
193 }
194 
196 {
198 }
199 
200 #if DT_CANT_USE_STATIC_MEMBER_FCN_AS_DFLT_ARG
201 inline const DtEntityType& gGuiseSameAsType()
202 {
204 }
205 #else
206 #undef gGuiseSameAsType
207 #endif
208 
209 #endif
210 #endif
211 
DtStateRepository * myStateRep
Definition: objectPublisherHLA.h:221
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:62
Instances of DtDIGuyObjectPublisher publish DIGuyObject objects to the network.
Definition: diGuyObjectPublisherHLA.h:19
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
DtString DtGlobalObjectDesignator
In HLA a DtGlobalObjectDesignator is a DtString.
Definition: globalObjectDesignator.h:22
std::shared_ptr< DtGeodeticRegion > myGeodeticPublishingRegion
Definition: entityPublisherHLA.h:181
DtDIGuyObjectPublisher * myDiGuyObjectPub
Definition: entityPublisherHLA.h:180
virtual DtEntityStateRepository * esr()
Synonym for entityStateRep().
Definition: entityPublisherHLA.h:195
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
Definition: objectPublisherHLA.h:34
std::set< DtDDMRegionSP > DtDDMRegionSet
Definition: region13.h:34
DtDIGuyNameChooser myDIGuyNameChooser
Optional function used to choose DIGuy object publisher name.
Definition: entityPublisherHLA.h:184
Instances of DtEntityPublisher are used for local or source simulations of entities (i...
Definition: entityPublisherHLA.h:29
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
virtual bool tick()
Tick (update) this object.
DtGeodeticRegion.
Definition: geodeticRegion.h:38
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
virtual DtEntityStateRepository * entityStateRep()
Returns a pointer to the EntityStateRepository - through which you can set or inspect current state i...
Definition: entityPublisherHLA.h:190
static DtStateRepCreator theStateRepCreator
Definition: entityPublisherHLA.h:178
This is a base class meant to encapsulate user callbacks on ownership management services.
Definition: ownershipHandlerHLA.h:27
DtForceType
Section 4.
Definition: disEnums.h:199
Instances of DtDIGuyObjectStateRepository are used to store state data for DIGuyObject objects...
Definition: diGuyObjectStateRepository.h:31
Contains the standard DIS enumerations.
void * myDIGuyNameChooserUserData
Optional user data to pass to the DIGuy name chooser.
Definition: entityPublisherHLA.h:187
DtDeadReckonTypes
Definition: disEnums.h:1020
Instances of DtString are used to represent strings.
Definition: vlString.h:38
This file provides a declaration of the class DtObjectPublisher.
void init(RTI::ObjectClassHandle hand, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0)
static const DtEntityType & guiseSameAsType()
Returns a constant that can be passed to the constructor indicating that we should use the entity typ...
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
class DtHlaObjectWithStateRep:
Definition: hlaObjectWithStateRep.h:28

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)