VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfMessageHandler.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <map>
16 
17 namespace makVrf
18 {
19 
21 
24 
28  {
29  public:
32  virtual ~DtMessageHandler();
33 
36  virtual void addMessageCallback(unsigned int messageType, DtMessageDelegate& delegate);
37 
40  virtual void removeMessageCallback(unsigned int messageType, DtMessageDelegate& delegate);
41 
44  virtual void clearMessageCallbacks(unsigned int messageType);
45 
47  virtual void processMessage(DtBaseMessage* msg);
48 
49  protected:
50 
51  typedef std::multimap<unsigned int, DtMessageDelegate> MessageMap;
52  typedef std::pair<unsigned int, DtMessageDelegate> MessagePair;
54  };
55 
56 }
#define DT_DLL_DEBUGDRAWCONNECTOR
Definition: export.h:15
MessageMap myMessageHandlers
Definition: vrfMessageHandler.h:53
Defines a single parameter delegate to make binding member function pointers easier. This should be much faster (and much lighter weight) than boost::function+boost::bind.
std::pair< unsigned int, DtMessageDelegate > MessagePair
Definition: vrfMessageHandler.h:52
DtBaseMessage is the base class for all messages that can be sent between the server and the client...
Definition: vrfMessage.h:25
Delegate template for binding static or member functions for callback at later time The return type a...
Definition: delegate.h:115
DtDelegate< void, DtBaseMessage * > DtMessageDelegate
create a typedef for message delegates (callback) that take a DtRadarFxResponse* as a parameter and r...
Definition: vrfMessageHandler.h:20
std::multimap< unsigned int, DtMessageDelegate > MessageMap
Definition: vrfMessageHandler.h:51
DtMessageHandler manages message delegates. More than one delegate may be registered for a given mess...
Definition: vrfMessageHandler.h:27

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)