VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
breachDetector.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 
10 
11 #pragma once
12 
20 
27 {
28 
29 public:
30 
33  DtBreachDetector(const DtString& name,
34  DtLocalObject* owner,
35  DtSimulationServices* simManager,
36  DtComponentDescriptor* desc = 0,
37  DtReaderWriterRegistry* parentRegistry = 0);
38 
40  virtual ~DtBreachDetector();
41 
44  virtual const char* type() const;
45 
46  virtual bool init();
47 
49  virtual void tick();
50 
54  static DtSimComponent * creator(const DtString& name,
55  DtLocalObject* owner,
56  DtSimulationServices* simManager,
57  DtComponentDescriptor* desc = 0,
58  DtReaderWriterRegistry* parentRegistry = 0);
59 
62  static bool checkForBreach(const DtVertexList& breachVertices,
63  const DtSimObject* engineeringObject);
64 
65 protected:
67  virtual bool checkForBreach(DtSimObjectReference breachObject);
68 
70  virtual bool checkPointBreach(const DtSimObject* breachObject) const;
71 
73  virtual bool checkLinearBreach(const DtSimObject* breachObject) const;
74 
77  virtual bool checkArealBreach(const DtSimObject* breachObject) const;
78 
81  static bool checkPointBreach(const DtVertexList& breachVertices,
82  const DtSimObject* engineeringObject);
83 
86  static bool checkLinearBreach(const DtVertexList& breachVertices,
87  const DtSimObject* engineeringObject);
88 
91  static bool checkArealBreach(const DtVertexList& breachVertices,
92  const DtSimObject* engineeringObject);
93 
96  virtual void processVerticesChanged();
97 
99  virtual void updateBreachStatus();
100 
102  virtual void processBreachVerticesChanged(DtSimObjectReference);
103 
105  virtual void processBreachObjectAboutToBeRemoved(const DtSimObject*);
106 
108  virtual void processBreachObjectAdded(DtSimObjectReference);
109 
111  static void breachEffectivenessChanged(DtSimObjectReference, DtVrfObjectPredicateEvaluator*,void*);
112  virtual void processBreachEffectivenessChanged(DtSimObjectReference);
113 
114 protected:
117 
119  DtBreachDetector(const DtBreachDetector & orig);
120 
123  orig);
124 
125 protected:
126  typedef std::map<const DtSimObject*, boost::signals2::connection> BreachedBy;
128 
131 
132  std::set<DtSimObjectReference> myFirstTimeEffectiveObjs;
133  std::set<DtSimObjectReference> myNewlyEffectiveObjs;
134  std::set<DtSimObjectReference> myNewlyIneffectiveObjs;
135 
137 
138  boost::signals2::scoped_connection mySimObjectAddedCallback;
139 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtEngineeringObjEffectivePredicate myIneffectivePred
Definition: breachDetector.h:130
std::set< DtSimObjectReference > myNewlyIneffectiveObjs
Definition: breachDetector.h:134
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
std::map< const DtSimObject *, boost::signals2::connection > BreachedBy
Definition: breachDetector.h:126
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Contains the DtEngineeringObjEffectivePredicate class declaration.
Definition: engineeringObjEffectivePredicate.h:18
Definition: readerWriterRegistry.h:39
virtual bool init()
Calls setRadio()
boost::signals2::scoped_connection mySimObjectAddedCallback
Definition: breachDetector.h:138
std::set< DtSimObjectReference > myNewlyEffectiveObjs
Definition: breachDetector.h:133
DtEngineeringObjEffectivePredicate myEffectivePred
Definition: breachDetector.h:129
class DtVertexList:
Definition: vertexList.h:22
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
DtBreachDetector; Determines whether or not this object is breached by a breach route (see predefined...
Definition: breachDetector.h:26
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:22
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
Definition: vrfObjectPredicateEvaluator.h:17
std::set< DtSimObjectReference > myFirstTimeEffectiveObjs
Definition: breachDetector.h:132
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
BreachedBy myBreachedBy
Definition: breachDetector.h:127
DtSimObjectReferenceList myBreachObjects
Definition: breachDetector.h:136
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)