VR-Forces 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 #include <tbb/spin_mutex.h>
21 
28 {
29 
30 public:
31 
34  DtBreachDetector(const DtString& name,
35  DtLocalObject* owner,
36  DtSimulationServices* simManager,
37  DtComponentDescriptor* desc = 0,
38  DtReaderWriterRegistry* parentRegistry = 0);
39 
41  virtual ~DtBreachDetector() override;
42 
45  virtual const char* type() const override;
46 
47  virtual bool init() override;
48 
50  virtual void tick() override;
51 
55  static DtSimComponent * creator(const DtString& name,
56  DtLocalObject* owner,
57  DtSimulationServices* simManager,
58  DtComponentDescriptor* desc = 0,
59  DtReaderWriterRegistry* parentRegistry = 0);
60 
63  static bool checkForBreach(const DtVertexList& breachVertices,
64  const DtSimObject* engineeringObject);
65 
66 protected:
68  virtual bool checkForBreach(DtSimObjectReference breachObject);
69 
71  virtual bool checkPointBreach(const DtSimObject* breachObject) const;
72 
74  virtual bool checkLinearBreach(const DtSimObject* breachObject) const;
75 
78  virtual bool checkArealBreach(const DtSimObject* breachObject) const;
79 
82  static bool checkPointBreach(const DtVertexList& breachVertices,
83  const DtSimObject* engineeringObject);
84 
87  static bool checkLinearBreach(const DtVertexList& breachVertices,
88  const DtSimObject* engineeringObject);
89 
92  static bool checkArealBreach(const DtVertexList& breachVertices,
93  const DtSimObject* engineeringObject);
94 
97  virtual void processVerticesChanged();
98 
100  virtual void updateBreachStatus();
101 
103  virtual void processBreachVerticesChanged(DtSimObjectReference);
104 
106  virtual void processBreachObjectAboutToBeRemoved(const DtSimObject*);
107 
109  virtual void processBreachObjectAdded(DtSimObjectReference);
110 
112  static void breachEffectivenessChanged(DtSimObjectReference, DtVrfObjectPredicateEvaluator*,void*);
113  virtual void processBreachEffectivenessChanged(DtSimObjectReference);
114 
115 protected:
118 
120  DtBreachDetector(const DtBreachDetector & orig);
121 
124  orig);
125 
126 protected:
127  typedef std::map<const DtSimObject*, boost::signals2::connection> BreachedBy;
129 
132 
133  std::set<DtSimObjectReference> myFirstTimeEffectiveObjs;
134  std::set<DtSimObjectReference> myNewlyEffectiveObjs;
135  std::set<DtSimObjectReference> myNewlyIneffectiveObjs;
136 
138 
139  boost::signals2::scoped_connection mySimObjectAddedCallback;
140  tbb::spin_mutex myRemovalMutex;
141 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtEngineeringObjEffectivePredicate myIneffectivePred
Definition: breachDetector.h:131
std::set< DtSimObjectReference > myNewlyIneffectiveObjs
Definition: breachDetector.h:135
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
std::map< const DtSimObject *, boost::signals2::connection > BreachedBy
Definition: breachDetector.h:127
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
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
Definition: readerWriterRegistry.h:39
boost::signals2::scoped_connection mySimObjectAddedCallback
Definition: breachDetector.h:139
std::set< DtSimObjectReference > myNewlyEffectiveObjs
Definition: breachDetector.h:134
virtual bool init() override
Calls setRadio()
DtEngineeringObjEffectivePredicate myEffectivePred
Definition: breachDetector.h:130
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
tbb::spin_mutex myRemovalMutex
Definition: breachDetector.h:140
DtBreachDetector; Determines whether or not this object is breached by a breach route (see predefined...
Definition: breachDetector.h:27
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:25
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
Definition: vrfObjectPredicateEvaluator.h:17
std::set< DtSimObjectReference > myFirstTimeEffectiveObjs
Definition: breachDetector.h:133
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:80
BreachedBy myBreachedBy
Definition: breachDetector.h:128
DtSimObjectReferenceList myBreachObjects
Definition: breachDetector.h:137
A locally simulated VRF object.
Definition: localObject.h:98

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)