Changeset View
Changeset View
Standalone View
Standalone View
tools/lldb-mi/MICmdArgValOptionLong.cpp
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | CMICmdArgValOptionLong::IsArgLongOption(const CMIUtilString &vrTxt) const | ||||
const size_t nPos = vrTxt.find("--"); | const size_t nPos = vrTxt.find("--"); | ||||
if (nPos != 0) | if (nPos != 0) | ||||
return false; | return false; | ||||
if (vrTxt.length() < 3) | if (vrTxt.length() < 3) | ||||
return false; | return false; | ||||
const CMIUtilString strArg = vrTxt.substr(2).c_str(); | const CMIUtilString strArg = vrTxt.substr(2); | ||||
if (strArg.IsNumber()) | if (strArg.IsNumber()) | ||||
return false; | return false; | ||||
return true; | return true; | ||||
} | } | ||||
//++ ------------------------------------------------------------------------------------ | //++ ------------------------------------------------------------------------------------ | ||||
// Details: Examine the string and determine if it is a valid long type option argument. | // Details: Examine the string and determine if it is a valid long type option argument. | ||||
Show All 15 Lines | |||||
// Type: Method. | // Type: Method. | ||||
// Args: vrTxt - (R) Some text. | // Args: vrTxt - (R) Some text. | ||||
// Return: bool - True = yes arg name matched, false = no. | // Return: bool - True = yes arg name matched, false = no. | ||||
// Throws: None. | // Throws: None. | ||||
//-- | //-- | ||||
bool | bool | ||||
CMICmdArgValOptionLong::ArgNameMatch(const CMIUtilString &vrTxt) const | CMICmdArgValOptionLong::ArgNameMatch(const CMIUtilString &vrTxt) const | ||||
{ | { | ||||
const CMIUtilString strArg = vrTxt.substr(2).c_str(); | const CMIUtilString strArg = vrTxt.substr(2); | ||||
return (strArg == GetName()); | return (strArg == GetName()); | ||||
} | } | ||||
//++ ------------------------------------------------------------------------------------ | //++ ------------------------------------------------------------------------------------ | ||||
// Details: Retrieve the list of CMICmdArgValBase derived option objects found following | // Details: Retrieve the list of CMICmdArgValBase derived option objects found following | ||||
// *this long option argument. For example "list-thread-groups [ --recurse 1 ]" | // *this long option argument. For example "list-thread-groups [ --recurse 1 ]" | ||||
// where 1 is the list of expected option to follow. | // where 1 is the list of expected option to follow. | ||||
// Type: Method. | // Type: Method. | ||||
Show All 9 Lines |