QNetworkString.hh

Go to the documentation of this file.
00001 
00007 #ifndef _Q_NETWORK_STRING_HH_
00008 #define _Q_NETWORK_STRING_HH_
00009 
00010 #include <string>
00011 
00012 #include "QDaqCommonDefs.hh"
00013 
00014 #define DEFAULT_SEPARATOR ' '
00015 #define NET_TOKEN '$'
00016 
00017 namespace QNetworkString {
00018 
00023    void FixNewLines(std::string& message);
00024 
00029    void RestoreNewLines(std::string& message);
00030 
00040    bool GetInt(const std::string& src, int& dest);
00041 
00049    bool GetBool(const std::string& src, bool& dest);
00050 
00057    bool GetDouble(const std::string& src, double& dest);
00058    
00065    bool GetChar(const std::string& src, char& dest);
00066 
00071    std::string GetHexadecimal(int value);
00072 
00085    bool GetParameter(const std::string& srcString,
00086                      const std::string& parName,
00087                      std::string&       parVal,
00088                      const char         separator = DEFAULT_SEPARATOR);
00089 
00102    bool GetIntParameter(const std::string& srcString,
00103                         const std::string& parName,
00104                         int&               val,
00105                         const char         separator = DEFAULT_SEPARATOR);
00106 
00117    bool GetCharParameter(const std::string& srcString,
00118                         const std::string& parName,
00119                          char&               val,
00120                          const char         separator = DEFAULT_SEPARATOR);
00121 
00122 
00124    std::string GetDaqStatusString(const QDaqState daqState);
00125 
00126    ProcessStatus_t GetProcessStatusCode(int code);
00127 
00128    std::string GetProcessStatusString(ProcessStatus_t status);
00129 };
00130 
00131 #endif

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1