Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Message.h

Go to the documentation of this file.
00001 #include <string>
00002 #include <map>
00003 
00004 #ifndef MESSAGE_H
00005 #define MESSAGE_H
00006 namespace rwil {
00007 
00009   class Message
00010     {
00011     public:
00013 
00017       Message(std::string deviceName, std::string command);
00019 
00024       Message(std::string deviceName, std::string command, time_t when);
00026 
00029       Message(std::map<std::string,std::string> params);
00031 
00035       Message(std::map<std::string,std::string> params, time_t when);
00037 
00040       Message(const Message &msg);
00041 
00043 
00046       const std::string& GetDevice() const;
00048 
00051       const std::string& GetCommand() const;
00052 
00054 
00059       bool operator<(const Message& rhs);
00060 
00062 
00066       void SetParam(std::string n, std::string param);
00068 
00073       std::string GetParam(std::string n) const;
00075 
00079       time_t GetWhen() const;
00081 
00084       const std::map<std::string,std::string>& GetMap() const;
00085 
00086     protected:
00087     private:
00089       mutable std::map<std::string,std::string> m_parameters;
00091       const time_t m_when;
00092     };
00093 
00095   class EncapsulatingMessage : public Message
00096     {
00097     public:
00099 
00103       EncapsulatingMessage(std::string encapsulateCommand, const Message &oldMessage);
00105 
00110       EncapsulatingMessage(std::string encapsulateCommand, const Message & oldMessage, time_t when);
00111     };
00112 
00114   class FailedAfterRetryingMessage : public EncapsulatingMessage
00115     {
00116     public:
00118 
00121       FailedAfterRetryingMessage(const Message & oldMessage);
00122     };
00123 
00125   class SetRetriesMessage : public Message
00126     {
00127     public:
00129 
00133       SetRetriesMessage(std::string deviceName, unsigned retries);
00134     };
00135 }
00136 #endif

Generated on Tue Apr 9 13:53:07 2002 for RWIL - Real World Interface Library by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001