VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ifServerMessage.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfmsgs/vrfmsgsDefines.h"
13 
19 
21 {
22 public:
24  {
25  Unknown = 0,
30  UserDefined = 100000
31  };
32 
33 public:
34 
37 
39  virtual ~DtIfServerMessage();
40 
43 
46 
48  virtual int type() const;
49 
50  virtual DtSimInterfaceContent * clone() const;
51 
52  virtual void setMessage(const std::string&);
53  virtual std::string message() const;
54 
55  virtual void setMessageCategory(MessageCategory);
56  virtual MessageCategory messageCategory() const;
57 
58  virtual void setSeverity(int);
59  virtual int severity() const;
60 
61  virtual void addExtra(const std::string&, const std::string&);
62  const std::map<std::string, std::string> extra() const { return myExtra; };
63  virtual std::string extraValue(const std::string& key) const;
64 
65  virtual int netRepSize() const;
66  virtual bool setFromNet(const char* contentBuffer,
67  unsigned contentSize);
68  virtual bool setToNet();
69 
70  virtual void printDataToString(DtString& str);
71 
72  static DtSimInterfaceContent* creator();
73 
74 protected:
75  std::string myMessage;
78 
79  std::map<std::string, std::string> myExtra;
80 };
MessageCategory myMessageCategory
Definition: ifServerMessage.h:76
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Definition: simInterfaceContent.h:78
virtual int netRepSize() const
Definition: simInterfaceContent.h:76
#define DT_DLL_vrfmsgs
This file is used to determine how to build.
Definition: vrfmsgsDefines.h:28
MessageCategory
Definition: ifServerMessage.h:23
virtual int type() const =0
Definition: ifServerMessage.h:28
Definition: ifServerMessage.h:27
int mySeverity
Definition: ifServerMessage.h:77
virtual void printDataToString(DtString &str)
std::map< std::string, std::string > myExtra
Definition: ifServerMessage.h:79
const DtSimInterfaceContent & operator=(const DtSimInterfaceContent &orig)
const std::map< std::string, std::string > extra() const
Definition: ifServerMessage.h:62
std::string myMessage
Definition: ifServerMessage.h:75
virtual bool setToNet()
Definition: simInterfaceContent.h:83
Definition: ifServerMessage.h:29
Definition: simInterfaceContent.h:45
Instances of DtIfServerMessage are sent out when the server wants to send a status message with categ...
Definition: ifServerMessage.h:20
Definition: ifServerMessage.h:26
virtual DtSimInterfaceContent * clone() const =0

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)