QNwMessageBuilder.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_NW_MESSAGE_BUILDER_HH_
00003 #define _Q_NW_MESSAGE_BUILDER_HH_
00004 
00005 #include <map>
00006 #include <list>
00007 #include <string>
00008 
00016 class QNwMessageBuilder
00017 {
00018 public:
00020    QNwMessageBuilder();
00021 
00023    virtual ~QNwMessageBuilder();
00024 
00029    bool SetCommand(const std::string& command);
00030    
00032    void SetModifier(const std::string& modifier);
00033 
00048    bool AddParameter(std::string parName, std::string parVal);
00049 
00055    bool SetParameter(std::string parName, std::string parVal);
00056 
00064    bool SetParameterList(std::string parName, std::list<std::string> values);
00072    bool BuildMessage(std::string& nwMessage) const;
00073 
00075    void Clear();
00076 
00077 private:
00078    
00080    const std::string kTokens;
00082    std::string fCommand;
00084    std::string fModifier;
00088    std::map<std::string, std::list<std::string> > fParameters;
00089 
00094    bool Cleanup(std::string& value);
00095 };
00096 #endif

Generated on Tue Nov 16 10:49:59 2010 for CUORE Software by  doxygen 1.5.6