VR-Forces 4.1 Class Documentation
DtObjectConsoleMessageHandler.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrvUtil/signalslib.h>
14 
15 #include <vrfGuiCore/vrfGuiCore.h>
16 #include <vrvCore/DtUniqueID.h>
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtSimObjectEntry;
23 }
24 
25 class DtEntityIdentifier;
26 class DtString;
27 
28 namespace makVrf
29 {
30  class DtNetworkMessageInterface;
31 
33  {
34  public:
35  typedef std::vector<std::pair<std::string, int> > DtConsoleMessageList;
36 
39 
41  static DtObjectConsoleMessageHandler& instance(makVrv::DtDe& de);
42 
43  virtual void setEnabled(bool);
44  bool enabled() const
45  {
46  return myEnabled;
47  }
48 
49  boost::signal<void (const DtEntityIdentifier&, int notifyLevel, const std::string&)> signal_consoleMessageReceived;
50  boost::signal<void (int)> signal_messageQueueSizeChanged;
51 
52  virtual void setMessageQueueSize(int);
53  int messageQueueSize() const
54  {
55  return myMessageQueueSize;
56  }
57 
59  virtual DtConsoleMessageList messagesFor(const std::string& entityId) const;
60 
65  virtual void setReceivingMessagesFor(makVrv::DtElementID, bool);
66 
68  virtual void clearAllMessages(const std::string& entityId);
69 
70  protected:
71  virtual void processObjectConsoleMessageCallback(DtNetworkMessageInterface*);
72  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
73 
75  virtual void messagesToResolve();
76 
77  protected:
78  typedef std::map<std::string, DtConsoleMessageList> DtConsoleMessageMap;
79 
81  bool myEnabled;
84 
85  std::map<makVrv::DtElementID, int> myReceivingMessagesFor;
86 
88  std::map<std::string, bool> myHasAwaitingMessages;
89 
90  std::map<makVrv::DtElementID, bool> mySetAwaiting;
91  };
92 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)