VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtObjectsCountTreeLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvVrlQt/vrvVrlQt.h>
14 #include <vrvCore/DtEntityState.h>
16 #include <vector>
17 
18 namespace makVrv
19 {
24  {
25  public:
27  typedef std::pair<std::string, DtObjectsCountTreeInterface::TacticalGraphicType> TacticalTypePair;
29  typedef std::vector<TacticalTypePair> TacticalTypePairList;
30  typedef std::vector<int> EntityIDList;
32 
33  public:
36 
38  virtual ~DtObjectsCountTreeLogic();
39 
41  DtObjectsCountTreeLogic() = delete;
42 
45 
47  DtObjectsCountTreeLogic& operator=(const DtObjectsCountTreeLogic&) = delete;
48 
49  public:
50  virtual void refreshCounts();
51 
52  protected:
53  virtual void slot_countEntitiesAdded(const DtElementData::ElementList& elementList);
54  virtual void slot_countEntitiesRemoved(const DtElementData::UniqueIdList& elementIdList);
55  virtual void slot_countDestroyedAndTacticals(const DtElementAttributeManager::EntryAttributesList& attributeList);
56  virtual void slot_tacticalGraphicRenamed( const DtUniqueID& tacticalId, const std::string& overlay);
57  virtual void slot_tacticalGraphicRemoved( const DtUniqueID& tacticalId);
58 
59  virtual void countOneEntity(const DtElementEntry* entry, const bool subtract = false);
60  virtual void countOneDestroyed(const DtElementEntry* entry, const DtElementAttributeDamageState* damageState);
61  virtual void countOneTactical(const DtElementAttributeDisplayName* dispName,
62  const DtElementAttributeKindAndCategory* kindCat, bool subtract = false);
63 
64  virtual void rememberEntityID(int entityID);
65  virtual void forgetEntityID(int entityID);
66  virtual bool knownEntityID(int entityID);
67 
68  virtual void rememberDestroyedID(int destroyedID);
69  virtual void forgetDestroyedID(int destroyedID);
70  virtual bool knownDestroyedID(int destroyedID);
71 
72  virtual void rememberTacticalData(std::string dispName, DtObjectsCountTreeInterface::TacticalGraphicType tacticalType);
73  virtual void forgetTacticalData(const std::string& dispName);
74  virtual bool knownTacticalData(const std::string& dispName);
75  virtual DtObjectsCountTreeInterface::TacticalGraphicType findTacticalDataType(const std::string& dispName);
76 
77  virtual DtObjectsCountTreeInterface::TacticalGraphicType tacticalType(std::pair<int,int> kindCat);
78 
80  virtual void slot_postInitialize();
82  virtual void updateEntityStats();
84  virtual void updateTacticalStats();
85 
86  protected:
93 
94  //Cached counts for the objects
97 
100 
106  };
107 }
108 
The logic for getting object counts from a simulation and populating an DtObjectsCountTreeInterface G...
Definition: DtObjectsCountTreeLogic.h:23
int myAreasCount
Definition: DtObjectsCountTreeLogic.h:103
DtSignalConnectionManager myManager
Definition: DtObjectsCountTreeLogic.h:89
int myDestroyedEntityCount
Definition: DtObjectsCountTreeLogic.h:96
DtObjectsCountTreeInterface * myWidget
Definition: DtObjectsCountTreeLogic.h:88
std::pair< std::string, DtObjectsCountTreeInterface::TacticalGraphicType > TacticalTypePair
Typedefs describing lists of entity ids and of tactical element name/type pairs.
Definition: DtObjectsCountTreeLogic.h:28
#define DT_DLL_VRVVRLQT
Definition: vrvVrlQt.h:19
DtElementEntry holds the non-simulation-specific data about an element, including its element type an...
Definition: DtElementEntry.h:22
int myDestroyedAggregateCount
Definition: DtObjectsCountTreeLogic.h:99
Contains DLL export macros.
DtDe & myDe
Definition: DtObjectsCountTreeLogic.h:87
Contains makVrv::DtObjectsCountTreeInterface class.
int myLiveEntityCount
Definition: DtObjectsCountTreeLogic.h:95
int myPhaselinesCount
Definition: DtObjectsCountTreeLogic.h:105
std::vector< TacticalTypePair > TacticalTypePairList
Typedefs describing lists of entity ids and of tactical element name/type pairs.
Definition: DtObjectsCountTreeLogic.h:29
TacticalGraphicType
Enumeration for specifying different types of tactical graphics controls.
Definition: DtObjectsCountTreeInterface.h:25
std::vector< EntryAttributes > EntryAttributesList
Define the type used to signal changes to one or more attributes for one or more elements.
Definition: DtElementAttributeManager.h:44
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Contains makVrv::DtVrlinkSimulatedEntityState class.
int myObstaclesCount
Definition: DtObjectsCountTreeLogic.h:104
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
std::vector< int > EntityIDList
Typedefs describing lists of entity ids and of tactical element name/type pairs.
Definition: DtObjectsCountTreeLogic.h:30
int myRouteCount
Definition: DtObjectsCountTreeLogic.h:102
std::vector< DtElementEntry * > ElementList
Type definition for a vector of DtElementEntry pointers.
Definition: DtElementData.h:47
Base class to provide boost signal/slot management.
The interface used by the DtObjectsCountTreeWidget and the DtObjectsCountTreeLogic.
Definition: DtObjectsCountTreeInterface.h:21
std::vector< DtElementID > UniqueIdList
Public Type Definitions.
Definition: DtElementData.h:49
int myLiveAggregateCount
Definition: DtObjectsCountTreeLogic.h:98
Contains the DtElementAttributeManager class declaration.
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:72
Definition: DtUniqueElementAttribute.h:81
EntityIDList destroyedIDs
Definition: DtObjectsCountTreeLogic.h:91
int myWaypointCount
Definition: DtObjectsCountTreeLogic.h:101
TacticalTypePairList tacticalData
Definition: DtObjectsCountTreeLogic.h:92
EntityIDList entityIDs
Definition: DtObjectsCountTreeLogic.h:90

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)