00001 #ifndef HEADER_STRINGMSG_H
00002 #define HEADER_STRINGMSG_H
00003
00004 #include "BaseMsg.h"
00005 #include "BaseListener.h"
00006
00007 #include <string>
00008
00009
00010
00011
00012 class StringMsg : public BaseMsg {
00013 private:
00014 std::string m_value;
00015 public:
00016 CLONE(StringMsg);
00017 StringMsg(BaseListener *listener, const std::string &name,
00018 const std::string &value)
00019 : BaseMsg(listener->getName(), name), m_value(value) {}
00020 StringMsg(const std::string &listenerName, const std::string &name,
00021 const std::string &value)
00022 : BaseMsg(listenerName, name), m_value(value) {}
00023
00024 virtual void sendActual(BaseListener *listener) const
00025 {
00026 listener->receiveString(this);
00027 }
00028 const std::string &getValue() const { return m_value; }
00029 virtual std::string toString() const;
00030 };
00031
00032
00033 #endif