#ifndef MESSAGE_H #define MESSAGE_H ///////////////////////////////////////////////////////////////////// // Message.h - Defines EndPoints and Messages // // ver 1.0 // // Language: Visual C++, 2008 // // Platform: Dell Dimension T7400, Win 7 Pro // // Application: Utility for CSE687 projects // // Author: Jim Fawcett, Syracuse University, CST 4-187 // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////// #include #include "IMsg.h" #include "EndPoint.h" ///////////////////////////////////////////////////////////////////////// // Create, serialize, and deserialize Message instances class Message : public IMessage { public: Message(const std::string& text = ""); Message(const std::string& body, EndPoint ep, const std::string& type); Message(const Message& msg); std::string& type(); std::string& body(); std::string& address(); std::string ToString(); static Message FromString(const std::string& xml); private: static std::string trimQuotes(const std::string& s); EndPoint addr_; std::string body_; std::string type_; }; #endif