VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAerodromeNode.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
15 #include <vrvCore/DtRunwayData.h>
17 
18 #include <osg/Group>
19 
20 #include <string>
21 #include <atomic>
22 
23 #include <matrix/vlVector.h>
24 
25 namespace makVrv
26 {
27  class DtDe;
28 
29  template <class ComponentTypeData>
30  class DtAerodromeNode : public osg::Group
31  {
32  public:
34  DtAerodromeNode(DtDe& de, ComponentTypeData& data, DtAerodromeComponentTypeSignaler<ComponentTypeData>& dataTypeSignaler);
35 
37  virtual ~DtAerodromeNode();
38 
40  DtAerodromeNode() = delete;
42  DtAerodromeNode(const DtAerodromeNode& rhs) = delete;
44  DtAerodromeNode& operator=(const DtAerodromeNode& rhs) = delete;
45  public:
47  ComponentTypeData myData;
49 
50  static const bool theTrack;
51  static std::atomic<int> theCount;
52  };
53 
54 
55  template <class ComponentTypeData>
56  std::atomic<int> DtAerodromeNode<ComponentTypeData>::theCount = { 0 };
57 
58  template <class ComponentTypeData>
59  const bool DtAerodromeNode<ComponentTypeData>::theTrack = false;
60 
61 
62  template <class ComponentTypeData>
64  : myData(data)
65  , myDataSignaler(dataTypeSignaler)
66  , myDe(de)
67  {
68  myDataSignaler.signal_ComponentCreated(myData);
69 
70  ++theCount;
71  if (theTrack)
72  {
73  DtDeScopedLogLevel log(myDe, myDe.log(), 4);
74  myDe.DT_LOG_DEBUG << "DtAerodromeNode(c): " << theCount << std::endl;
75  }
76  }
77 
78  template <class ComponentTypeData>
80  {
81  --theCount;
82  if (theTrack)
83  {
84  DtDeScopedLogLevel log(myDe, myDe.log(), 4);
85  myDe.DT_LOG_DEBUG << "DtAerodromeNode(~): " << theCount << std::endl;
86  }
87 
88  if (!myDe.destructing())
89  {
90  myDataSignaler.signal_ComponentDeleted(myData);
91  }
92  }
93 
96  {
97  std::string apt_icao;
98  std::string runway_num1; // used by some light types (e.g. runway edge/center lights)
99  std::string runway_num2; // used by even less light types than runway_num1 (e.g. taxiway/runway lead on lights)
100  double heading;
101  std::string light_type;
102  std::string model_definition;
103  double glide_angle;
104  DtVector location;
105  };
106 
108 
109 
113  {
114  std::string apt_icao;
115  int size;
116  std::string text;
117  double heading;
118  DtVector location;
119  };
120 
122 }
std::string light_type
Definition: DtAerodromeNode.h:101
virtual ~DtAerodromeNode()
destructor
Definition: DtAerodromeNode.h:79
std::string text
Definition: DtAerodromeNode.h:116
std::string runway_num1
Definition: DtAerodromeNode.h:98
sets the log level when scope is entered, and restores the old log level when scope is exited ...
Definition: DtDeScopedLogLevel.h:21
static std::atomic< int > theCount
Definition: DtAerodromeNode.h:51
Contains makVrv::DtDeScopedLogLevel class.
int size
Definition: DtAerodromeNode.h:115
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
The elements that make up a taxiway sign.
Definition: DtAerodromeNode.h:95
DtAerodromeNode< DtTaxiwaySignData > DtTaxiwaySignNode
Definition: DtAerodromeNode.h:121
double heading
Definition: DtAerodromeNode.h:100
std::string apt_icao
Definition: DtAerodromeNode.h:114
DtAerodromeComponentTypeSignaler< ComponentTypeData > & myDataSignaler
Definition: DtAerodromeNode.h:48
ComponentTypeData myData
Definition: DtAerodromeNode.h:47
std::string apt_icao
Definition: DtAerodromeNode.h:97
DtDe & myDe
Definition: DtAerodromeNode.h:46
DtDebugLog & log()
Inline access for the debug log object.
Definition: DtDe.h:236
DtAerodromeNode & operator=(const DtAerodromeNode &rhs)=delete
not allowed
std::string model_definition
Definition: DtAerodromeNode.h:102
DtVector location
Definition: DtAerodromeNode.h:104
double glide_angle
Definition: DtAerodromeNode.h:103
DtAerodromeNode()=delete
not allowed
static const bool theTrack
Definition: DtAerodromeNode.h:50
DtAerodromeNode< DtLightIndicatorData > DtLightIndicatorNode
Definition: DtAerodromeNode.h:107
DtVector location
Definition: DtAerodromeNode.h:118
Contains makVrv::DtRunwayData class.
Definition: DtAerodromeNode.h:30
Contains DLL export macros.
std::string runway_num2
Definition: DtAerodromeNode.h:99
Signaler for when a certain aerodrome component type is created/destroyed.
Definition: DtAerodromeComponentTypeSignaler.h:21
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
The elements that make up a taxiway sign.
Definition: DtAerodromeNode.h:112
double heading
Definition: DtAerodromeNode.h:117

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)