Code Cleanup

- Removed obsolete Nibbler::getDOM.
This commit is contained in:
Paul Beckingham 2011-07-26 00:40:29 -04:00
parent 9bf1ec2f7c
commit fde7ec107a
3 changed files with 1 additions and 108 deletions

View file

@ -934,83 +934,6 @@ bool Nibbler::getOneOf (
return false;
}
////////////////////////////////////////////////////////////////////////////////
// [<number>|<uuid>|<word>|].<word>[.<word> ...]
//
// TODO Obsolete
bool Nibbler::getDOM (std::string& result)
{
std::string::size_type i = mCursor;
if (i < mLength)
{
save ();
std::string left;
std::string right;
int number;
// <name>.<name>[.<name> ...]
if (getName (left) &&
skip ('.') &&
getName (right))
{
while (skip ('.') &&
getWord (right))
;
result = mInput.substr (i, mCursor - i);
return true;
}
restore ();
// <id>.<name>[.<name> ...]
if (getInt (number) &&
skip ('.') &&
getName (right))
{
while (skip ('.') &&
getWord (right))
;
result = mInput.substr (i, mCursor - i);
return true;
}
restore ();
// <uuid>.<name>[.<name> ...]
if (getUUID (left) &&
skip ('.') &&
getName (right))
{
while (skip ('.') &&
getWord (right))
;
result = mInput.substr (i, mCursor - i);
return true;
}
restore ();
// <name>[.<name> ...]
if (getName (right))
{
while (skip ('.') &&
getWord (right))
;
result = mInput.substr (i, mCursor - i);
return true;
}
restore ();
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
// A name is a string of alpha-numeric characters.
bool Nibbler::getName (std::string& result)

View file

@ -66,7 +66,6 @@ public:
bool getDateISO (time_t&);
bool getDate (const std::string&, time_t&);
bool getOneOf (const std::vector <std::string>&, std::string&);
bool getDOM (std::string&);
bool getName (std::string&);
bool getWord (std::string&);