Functions | |
| void | FixNewLines (std::string &message) |
| substitute all newline characters with special token '$'. | |
| void | RestoreNewLines (std::string &message) |
| restore newline characters in network message | |
| bool | SplitCommandAndParams (std::string cmdStr, std::string &cmdName, std::string ¶ms) |
| split command string into command name (and possible modifier) and parameters string | |
| bool | GetParameter (const std::string &srcString, const std::string &parName, std::string &parVal, const char separator=DEFAULT_SEPARATOR) |
| extract parameter from network string | |
| bool | GetIntParameter (const std::string &srcString, const std::string &parName, int &val, const char separator=DEFAULT_SEPARATOR) |
| get integer parameter from network string | |
| bool | GetCharParameter (const std::string &srcString, const std::string &parName, char &val, const char separator=DEFAULT_SEPARATOR) |
| get char parameter from network string | |
| void QNetworkString::FixNewLines | ( | std::string & | message | ) |
substitute all newline characters with special token '$'.
| message | string to be parsed |
References QStringHandler::Escape(), and QStringHandler::Replace().
Referenced by QNwMessageBuilder::BuildMessage().
| bool QNetworkString::GetCharParameter | ( | const std::string & | srcString, | |
| const std::string & | parName, | |||
| char & | val, | |||
| const char | separator = DEFAULT_SEPARATOR | |||
| ) |
get char parameter from network string
| srcString | string from which parameter is to be extracted | |
| parName | parameter to be extracted | |
| val | destination char |
References GetParameter(), and QStringHandler::StringToChar().
| bool QNetworkString::GetIntParameter | ( | const std::string & | srcString, | |
| const std::string & | parName, | |||
| int & | val, | |||
| const char | separator = DEFAULT_SEPARATOR | |||
| ) |
get integer parameter from network string
| srcString | string from which parameter is to be extracted | |
| parName | parameter to be extracted | |
| val | destination int | |
| separator | character used in srcString to separate different parName=parVal pieces (defaults to DEFAULT_SEPARATOR) |
References GetParameter(), and QStringHandler::StringToInt().
| bool QNetworkString::GetParameter | ( | const std::string & | srcString, | |
| const std::string & | parName, | |||
| std::string & | parVal, | |||
| const char | separator = DEFAULT_SEPARATOR | |||
| ) |
extract parameter from network string
| srcString | string from which parameter is to be extracted | |
| parName | parameter to be extracted | |
| parVal | string filled with value of requested parameter | |
| separator | character used in srcString to separate different parName=parVal pieces (defaults to DEFAULT_SEPARATOR) |
Referenced by GetCharParameter(), and GetIntParameter().
| void QNetworkString::RestoreNewLines | ( | std::string & | message | ) |
restore newline characters in network message
| message | string to be parsed |
References QStringHandler::Replace(), and QStringHandler::UnEscape().
Referenced by QBaseCmdParser::ParseParameters(), and QBaseClient::ProcessAnswer().
| bool QNetworkString::SplitCommandAndParams | ( | std::string | cmdStr, | |
| std::string & | cmdName, | |||
| std::string & | params | |||
| ) |
split command string into command name (and possible modifier) and parameters string
| cmdStr | source string to be parsed | |
| cmdName | is filled with command name (and possibly modifier) | |
| params | is filled with the parameters part of the command string |
References QStringHandler::DoubleSwallowSpaces().
Referenced by QBaseCmdParser::Parse(), and QBaseClient::ProcessAnswer().
1.5.6