VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simCommandDistributor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
9 
12 
14 #include <vrfplan/simCommand.h>
16 #include <tbb/spin_rw_mutex.h>
17 
25 {
26 
27 public:
29  typedef DtSimCommandCallbackList::DtCallbackFunctionType DtSimCommandCallbackFcn;
30  typedef std::map<DtSimCommandMessageType, DtSimCommandCallbackList> DtSimCallbackListMap;
31 
34 
36  virtual ~DtSimCommandDistributor();
37 
39  void addCallback(DtSimCommandMessageType cmdType,
40  DtSimCommandCallbackFcn fcn, void* usrData);
41 
43  void removeCallback(DtSimCommandMessageType cmdType,
44  DtSimCommandCallbackFcn fcn, void* usrData);
45 
48  void invokeCallbacks(const DtSimCommand& simCmd);
49 
50 protected:
51 
54 
56  DtSimCommandDistributor& operator=(const DtSimCommandDistributor& orig);
57 
58 protected:
59  tbb::spin_rw_mutex mySimCommandCallbacksMutex;
61 };
tbb::spin_rw_mutex mySimCommandCallbacksMutex
Definition: simCommandDistributor.h:59
DtSimCommandCallbackList::DtCallbackFunctionType DtSimCommandCallbackFcn
Definition: simCommandDistributor.h:29
std::map< DtSimCommandMessageType, DtSimCommandCallbackList > DtSimCallbackListMap
Definition: simCommandDistributor.h:30
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Definition: noArgumentCallbackList.h:91
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
DtSimCallbackListMap mySimCommandCallbacks
Definition: simCommandDistributor.h:60
DtCallbackList< const DtSimCommand & > DtSimCommandCallbackList
Definition: simCommandDistributor.h:28
Contains the DtSimCommandDistributor class declaration.
Definition: simCommandDistributor.h:24

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)