torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Message.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 #ifndef TORC_GENERIC_MESSAGE_HPP
17 #define TORC_GENERIC_MESSAGE_HPP
18 
19 #include <string>
21 
22 namespace torc {
23 namespace generic {
24 
25 /**
26  * The actual message object. It consists of the actual message string and the currently set
27  * severity of this message.
28  */
29 class Message {
30 public:
31  inline const std::string getMessage() const;
32 
33  void setMessage(const std::string& inSource);
34 
35  inline const MessageSeverity getSeverity() const;
36 
37  void setSeverity(const MessageSeverity& inSource);
38 
39  Message();
40 
41  Message(const std::string& inMessage, MessageSeverity inSeverity);
42 
43  ~Message() throw ();
44 
45  Message(const Message& inSource);
46 
47  Message& operator=(const Message& inSource);
48 
49 private:
52 
53 };
54 inline const std::string Message::getMessage() const {
55  return mMessage;
56 }
57 
58 inline const MessageSeverity Message::getSeverity() const {
59  return mSeverity;
60 }
61 
62 } // namespace generic
63 } // namespace torc
64 
65 #endif // TORC_GENERIC_MESSAGE_HPP
void setSeverity(const MessageSeverity &inSource)
Definition: Message.cpp:29
void setMessage(const std::string &inSource)
Definition: Message.cpp:25
Message & operator=(const Message &inSource)
Definition: Message.cpp:43
const MessageSeverity getSeverity() const
Definition: Message.hpp:58
std::string string
const std::string getMessage() const
Definition: Message.hpp:54
std::string mMessage
Definition: Message.hpp:50
MessageSeverity mSeverity
Definition: Message.hpp:51