VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simObjectReference.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
13 #include <vrfutil/rwUUID.h>
14 
15 class DtSimObject;
17 
27 {
28 public:
29 
32 
33  virtual ~DtSimObjectReference();
34 
35  DtSimObjectReference& operator = ( const DtSimObjectReference& );
36 
37  const DtSimObject* operator -> () const;
38  const DtSimObject* operator * () const;
39  operator const DtSimObject* () const { return mySimObject.get(); };
40  const DtUUID& uuid() const;
41 
42  void reset();
43 
44  static DtSimObjectReference nullReference();
45 
46  bool operator < ( const DtSimObjectReference& rhs ) const;
47  bool operator > ( const DtSimObjectReference& rhs ) { return !operator<( rhs ); };
48  bool operator == ( const DtSimObjectReference& ) const;
49 
50  bool operator < ( const DtUUID& rhs ) const;
51  bool operator > ( const DtUUID& rhs ) { return !operator<( rhs ); };
52  bool operator == ( const DtUUID& ) const;
53 
54  operator DtUUID() const;
55  DtString objectName() const;
56 
57  bool isValid() const;
58  bool isDeleted() const;
59 
60 private:
61 
63  DtSimObjectReference& operator=( const DtSimObject* rhs );
64 
65 protected:
66 
67  friend class DtSimObjectManager;
68 
69  std::shared_ptr<const DtSimObject> mySimObject;
70 };
71 
75 {
76 public:
77 
78  DtRwSimObjectReference( const DtSimulationServices* services, const DtString& name, DtReaderWriterRegistry* = 0 );
80 
81  virtual ~DtRwSimObjectReference();
82 
86 
87  operator DtSimObjectReference() const { return myObjectReference; };
88 
89  const DtSimObject* operator->() const;
90 
91  bool isValid() const { return myObjectReference.isValid(); };
92  bool isDeleted() const { return myObjectReference.isDeleted(); };
93 
94  void setSimulationServices( DtSimulationServices* s );
95 
96  virtual void setUUID( const DtUUID& );
97 
98 protected:
99 
100  virtual void postGetSelf();
101 
102 protected:
103 
106 
107 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
const DtSimulationServices * mySimulationServices
Definition: simObjectReference.h:104
virtual void postGetSelf()
Called after either version of getSelf (mtl or environment). Default is no-op.
bool isDeleted() const
Definition: simObjectReference.h:92
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
DtSimObjectReference myObjectReference
Definition: simObjectReference.h:105
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:431
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: simObjectReference.h:74
std::shared_ptr< const DtSimObject > mySimObject
Definition: simObjectReference.h:69
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwUUID & operator=(const DtRwUUID &orig)
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1315
bool isValid() const
Definition: simObjectReference.h:91
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
This class is the central access point for all current-frame state of all objects in the simulation i...
Definition: simObjectManager.h:42
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
virtual void setUUID(const DtRwUUID &u)

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)