QNetworkString.hh

Go to the documentation of this file.
00001 
00010 #ifndef _Q_NETWORK_STRING_HH_
00011 #define _Q_NETWORK_STRING_HH_
00012 
00013 #include <string>
00014 #include <list>
00015 
00016 #include "QDaqCommonDefs.hh"
00017 
00018 #define DEFAULT_SEPARATOR ' '
00019 #define NEWLINE_REPLACEMENT '$'
00020 
00021 namespace QNetworkString
00022 {
00027    void FixNewLines(std::string& message);
00028 
00033    void RestoreNewLines(std::string& message);
00034    
00035 
00052    bool SplitCommandAndParams(std::string  cmdStr,
00053                               std::string& cmdName,
00054                               std::string& params);
00055 
00056 
00071    bool GetParameter(const std::string& srcString,
00072                      const std::string& parName,
00073                      std::string&       parVal,
00074                      const char         separator = DEFAULT_SEPARATOR);
00075 
00088    bool GetIntParameter(const std::string& srcString,
00089                         const std::string& parName,
00090                         int&               val,
00091                         const char         separator = DEFAULT_SEPARATOR);
00092 
00103    bool GetCharParameter(const std::string& srcString,
00104                         const std::string& parName,
00105                          char&               val,
00106                          const char         separator = DEFAULT_SEPARATOR);
00107 
00108 };
00109 
00110 #endif

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