VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simObjectListActivityCallbackList.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
13 #include <set>
14 #include <boost/shared_ptr.hpp>
15 #include <tbb/spin_mutex.h>
16 
19 typedef void(*DtVrfObjectListActivityCallbackFcn)(const DtLocalObject* vrfObject,
20  void* usr);
21 
26 {
27 public:
28 
31 
32  virtual void addCallback(DtVrfObjectListActivityCallbackFcn fcn, void* usrData,
33  const DtObjectType& filter = DtObjectType::anyType(),
34  bool invertFilter = false);
35 
36  virtual void removeCallback(DtVrfObjectListActivityCallbackFcn fcn, void* usrData,
37  const DtObjectType& filter = DtObjectType::anyType(),
38  bool invertFilter = false);
39 
40  virtual void invokeCallbacks(const DtLocalObject* vrfObject) const;
41 
42  virtual void removeAll();
43 
44  int count() const
45  {
46  return myCallbackList.size();
47  }
48 
49 protected:
50  typedef std::set<DtSimObjectListActivityCallbackInfo> DtCallbackListType;
51 
52  mutable tbb::spin_mutex myMutex;
53 
55 
56 private:
59 
60 };
61 
62 
int count() const
Definition: simObjectListActivityCallbackList.h:44
DtCallbackListType myCallbackList
Definition: simObjectListActivityCallbackList.h:54
Callback list for DtLocalObjectManager object list activity, such as adding and removing objects...
Definition: simObjectListActivityCallbackList.h:25
Definition: objectType.h:27
void(* DtVrfObjectListActivityCallbackFcn)(const DtLocalObject *vrfObject, void *usr)
Callback function definition (for callbacks registered on DtLocalObject* additions to and removals fr...
Definition: simObjectListActivityCallbackList.h:19
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
tbb::spin_mutex myMutex
Definition: simObjectListActivityCallbackList.h:52
static const DtObjectType & anyType()
std::set< DtSimObjectListActivityCallbackInfo > DtCallbackListType
Definition: simObjectListActivityCallbackList.h:50
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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)