VR-Forces 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() override;
40 
43 
46 
48  virtual int type() const override;
49 
50  virtual DtSimInterfaceContent * clone() const override;
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 override;
66  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
67  virtual bool setToNet() override;
68 
69  virtual void printDataToString(DtString& str) override;
70 
71  static DtSimInterfaceContent* creator();
72 
73 protected:
74  std::string myMessage;
77 
78  std::map<std::string, std::string> myExtra;
79 };
MessageCategory myMessageCategory
Definition: ifServerMessage.h:75
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:76
virtual void printDataToString(DtString &str)
std::map< std::string, std::string > myExtra
Definition: ifServerMessage.h:78
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:74
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 Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)