Renamed the stream member functions get() and eat().

This commit is contained in:
Jesse Beder 2008-06-30 22:34:10 +00:00
parent 852e5b63e5
commit c1966ba3fc
8 changed files with 143 additions and 73 deletions

View file

@ -2,9 +2,9 @@
namespace YAML
{
// GetChar
// get
// . Extracts a character from the stream and updates our position
char Stream::GetChar()
char Stream::get()
{
char ch = input.get();
column++;
@ -15,21 +15,21 @@ namespace YAML
return ch;
}
// GetChar
// get
// . Extracts 'n' characters from the stream and updates our position
std::string Stream::GetChar(int n)
std::string Stream::get(int n)
{
std::string ret;
for(int i=0;i<n;i++)
ret += GetChar();
ret += get();
return ret;
}
// Eat
// eat
// . Eats 'n' characters and updates our position.
void Stream::Eat(int n)
void Stream::eat(int n)
{
for(int i=0;i<n;i++)
GetChar();
get();
}
}