VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
predicateCallbackManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
12 #include "tbb/spin_rw_mutex.h"
13 
15 
20 {
21 private:
23 
28 
29 public:
31  virtual ~DtPredicateCallbackManager();
32 
36 
40  void addSimObjectPredicateCallback(DtSimObjectReference,
42  const DtVrfObjectPredicate& predicate, DtTime evaluationPeriod = 0,
43  void* userData = 0);
44  void removeSimObjectPredicateCallback(const DtSimObject*,
46  const DtVrfObjectPredicate& predicate, DtTime evaluationPeriod = 0,
47  void* userData = 0);
48 
53  void invokeSimObjectPredicateCallbacks();
54 
57  virtual void clearPredicateCallbacks();
59 
60  virtual void removeAllPredicatesFor(const DtSimObject*);
61 
62 protected:
64  typedef std::list< std::pair<DtSimObjectReference, boost::shared_ptr<DtVrfObjectPredicateCallbackInfo> > > PredicateList;
66  {
68  boost::signals2::connection removalConnection;
69  };
70 
71  typedef std::map<DtUUID, PredicateInfo> PredicateCallbackList;
73 
74  tbb::spin_rw_mutex myPredicateCallbackManagerMutex;
75 };
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
PredicateList list
Definition: predicateCallbackManager.h:67
std::map< DtUUID, PredicateInfo > PredicateCallbackList
Definition: predicateCallbackManager.h:71
tbb::spin_rw_mutex myPredicateCallbackManagerMutex
Definition: predicateCallbackManager.h:74
Definition: predicateCallbackManager.h:65
Contains the DtVrfObjectPredicate class declaration.
Definition: vrfObjectPredicate.h:20
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::list< std::pair< DtSimObjectReference, boost::shared_ptr< DtVrfObjectPredicateCallbackInfo > > > PredicateList
Definition: predicateCallbackManager.h:64
The predicate callback manager allows for registration of callbacks by sim object for predicates...
Definition: predicateCallbackManager.h:19
void(* DtVrfObjectPredicateCallbackFunction)(DtSimObjectReference obj, DtVrfObjectPredicateEvaluator *predicateEval, void *userData)
Callback function that takes a DtSimObjectReference, a pointer to the DtVrfObjectPredicateEvaluator t...
Definition: vrfObjectPredicateCallbackInfo.h:19
boost::signals2::connection removalConnection
Definition: predicateCallbackManager.h:68
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
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
const DtSimulationServices * mySimulationServices
Definition: predicateCallbackManager.h:63
PredicateCallbackList myPredicateCallbackList
Definition: predicateCallbackManager.h:72

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)