VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateNode.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 #pragma once
12 
14 #include "vrfutil/rwUUID.h"
15 #include <vlpi/entityIdentifier.h>
16 #include <vlutil/vlSmartPointers.h>
17 #include <list>
20 
21 #include <boost/unordered_map.hpp>
22 
23 class DtAggregateNode;
24 class DtAggregateData;
26 
27 typedef DtBoost::shared_ptr<DtAggregateNode> DtAggregateNodePtr;
28 typedef DtBoost::shared_ptr<const DtAggregateNode> DtAggregateNodeConstPtr;
29 typedef boost::unordered_map<DtUUID, DtAggregateNodePtr> DtAggregateNodeChildMap;
30 typedef DtBoost::shared_ptr<DtAggregateData> DtAggregateDataPtr;
31 typedef DtBoost::shared_ptr<const DtAggregateData> DtAggregateDataConstPtr;
32 typedef std::list<DtAggregateNodePtr> DtAggregateNodeList;
33 
38 {
39 public:
40 
42  typedef DtAggregateData* (*DtAggregateDataCreator)();
43 
44 public:
45 
47  DtAggregateNode(const DtUUID& uuid,
48  const DtOrganizationManager& organizationManager);
49 
50  DtAggregateNode(DtOrganizationManager& organizationManager);
51 
53  virtual ~DtAggregateNode();
54 
56  virtual void addChild(DtAggregateNodePtr child);
57 
59  virtual bool removeChild(const DtUUID& child);
60 
62  const DtAggregateNodeChildMap& childList() const;
63 
65  virtual const DtVrfObject* entity() const;
66 
69  virtual DtAggregateDataPtr data();
70  virtual DtAggregateDataConstPtr data() const;
72 
74  virtual void print() const;
75 
77  virtual const DtUUID& uuid() const;
78 
79 public:
80 
85  static void setAggregateDataCreator(DtAggregateDataCreator creator);
86  static DtAggregateDataCreator aggregateDataCreator(void);
88 
91  virtual DtOrgViewManagedObjectListConstPtr taskableSubordinates() const;
92  virtual DtOrgViewManagedObjectListConstPtr ableToMoveSubordinates() const;
93  virtual DtOrgViewManagedObjectListConstPtr allSubordinates() const;
94  virtual DtOrgViewManagedObjectListConstPtr subordinatesToIncludeInSpatialModel() const;
96 
98  bool isAggregate() const { return myIsAggregate; };
99 
100 private:
101 
103  DtAggregateNode(const DtAggregateNode& orig);
104 
106  DtAggregateNode& operator=(const DtAggregateNode& orig);
107 
108 protected:
109 
112 
115 
119 
120 protected:
121 
124  static DtAggregateDataCreator theAggregateDataCreator;
125 
131 
133 };
const DtVrfObject * myEntity
Object Id of entity this node is assoicated with.
Definition: aggregateNode.h:111
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
bool myIsAggregate
Definition: aggregateNode.h:132
DtBoost::shared_ptr< const DtAggregateData > DtAggregateDataConstPtr
Definition: aggregateNode.h:31
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
static DtAggregateDataCreator theAggregateDataCreator
Creation function used to create the DtAggregateData object maintained by this class.
Definition: aggregateNode.h:124
DtAggregateDataPtr myData
Data record containing state information assoicated with the node.
Definition: aggregateNode.h:114
DtBoost::shared_ptr< const DtOrgViewManagedObjectList > DtOrgViewManagedObjectListConstPtr
Typedef for a shared pointer to a const DtOrgViewManagedObjectList.
Definition: orgViewManagedObjectList.h:34
bool isAggregate() const
True if this node represents an aggregate (false if individual)
Definition: aggregateNode.h:98
boost::unordered_map< DtUUID, DtAggregateNodePtr > DtAggregateNodeChildMap
Definition: aggregateNode.h:29
std::list< DtAggregateNodePtr > DtAggregateNodeList
Definition: aggregateNode.h:32
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtAggregateNode represents a node in an aggregate hierarchy.
Definition: aggregateNode.h:37
const DtOrganizationManager & myOrganizationManager
Definition: aggregateNode.h:126
DtOrgViewManagedObjectListConstPtr myAbleToMoveSubordinates
Definition: aggregateNode.h:129
DtOrgViewManagedObjectListConstPtr mySubordinatesToIncludeInSpatialModel
Definition: aggregateNode.h:128
This class derives from the DtOrganizationView, and adds the capability to manipulate the hierarchy...
Definition: organizationManager.h:46
DtOrgViewManagedObjectListConstPtr myAllSubordinates
Definition: aggregateNode.h:130
DtBoost::shared_ptr< DtAggregateNode > DtAggregateNodePtr
Definition: aggregateNode.h:25
DtAggregateNodeChildMap myChildNodes
List of children (aggregate subordinates) for this node.
Definition: aggregateNode.h:118
DtBoost::shared_ptr< DtAggregateData > DtAggregateDataPtr
Definition: aggregateNode.h:30
DtAggregateData; abstract base class for aggregate data associated with a DtAggregateNode.
Definition: aggregateData.h:25
DtBoost::shared_ptr< const DtAggregateNode > DtAggregateNodeConstPtr
Definition: aggregateNode.h:28
DtOrgViewManagedObjectListConstPtr myTaskableSubordinates
Definition: aggregateNode.h:127
void print(double **a, int r, int c, char *str)

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)