torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Message.cpp
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 HAVE_CONFIG_H
17 #include "torc/generic/config.h"
18 #endif
19 
20 #include "torc/generic/Message.hpp"
21 
22 namespace torc {
23 namespace generic {
24 
25 void Message::setMessage(const std::string& inSource) {
26  mMessage = inSource;
27 }
28 
29 void Message::setSeverity(const MessageSeverity& inSource) {
30  mSeverity = inSource;
31 }
32 
33 Message::Message() : mMessage(), mSeverity(eMessageSeveritySuppressed) {}
34 
35 Message::Message(const std::string& inMessage, MessageSeverity inSeverity) :
36  mMessage(inMessage), mSeverity(inSeverity) {}
37 
38 Message::~Message() throw () {}
39 
40 Message::Message(const Message& source) :
41  mMessage(source.mMessage), mSeverity(source.mSeverity) {}
42 
44  if(this != &source) {
45  mMessage = source.mMessage;
46  mSeverity = source.mSeverity;
47  }
48  return *this;
49 }
50 
51 } // namespace generic
52 } // namespace torc
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
std::string string
std::string mMessage
Definition: Message.hpp:50
MessageSeverity mSeverity
Definition: Message.hpp:51