ARB
Public Member Functions | Public Attributes | List of all members
StringParser Struct Reference

#include <tools.h>

Collaboration diagram for StringParser:
Collaboration graph
[legend]

Public Member Functions

 StringParser (const std::string &str)
 
bool atEnd () const
 
unsigned char at () const
 
stringCIter getPosition () const
 
void setPosition (const stringCIter &position)
 
void advance (size_t offset)
 
std::string rest () const
 
stringCIter find (char c)
 
size_t eatSpaces ()
 
size_t expectSpaces (size_t count=1, bool allowMore=true)
 
size_t lookingAt (const char *content)
 
void expectContent (const char *content)
 
std::string extractWord (const char *delimiter=" ")
 
long eatNumber (bool &eaten)
 
long extractNumber ()
 

Public Attributes

stringCIter pos
 
stringCIter end
 

Detailed Description

Definition at line 35 of file tools.h.

Constructor & Destructor Documentation

StringParser::StringParser ( const std::string str)
inline

Definition at line 38 of file tools.h.

Member Function Documentation

bool StringParser::atEnd ( ) const
inline

Definition at line 40 of file tools.h.

References end.

Referenced by extractWord().

unsigned char StringParser::at ( ) const
inline

Definition at line 42 of file tools.h.

References gi_assert, and pos.

stringCIter StringParser::getPosition ( ) const
inline

Definition at line 44 of file tools.h.

References pos.

Referenced by parseCounter().

void StringParser::setPosition ( const stringCIter &  position)
inline

Definition at line 45 of file tools.h.

Referenced by parseCounter().

void StringParser::advance ( size_t  offset)
inline

Definition at line 46 of file tools.h.

Referenced by parseCounter().

std::string StringParser::rest ( ) const
inline

Definition at line 48 of file tools.h.

References string().

Referenced by parseCounter().

stringCIter StringParser::find ( char  c)
inline

Definition at line 50 of file tools.h.

References pos.

size_t StringParser::eatSpaces ( )
inline

Definition at line 58 of file tools.h.

References pos.

Referenced by expectSpaces(), parseCounter(), scanSeqlenFromID(), and scanSeqlenFromLOCUS().

size_t StringParser::expectSpaces ( size_t  count = 1,
bool  allowMore = true 
)
inline

Definition at line 67 of file tools.h.

References CURRENT_REST, eatSpaces(), and GBS_global_string().

Referenced by parseCounter().

size_t StringParser::lookingAt ( const char content)
inline

Definition at line 79 of file tools.h.

References pos.

Referenced by expectContent(), and parseCounter().

void StringParser::expectContent ( const char content)
inline

Definition at line 93 of file tools.h.

References CURRENT_REST, GBS_global_string(), and lookingAt().

Referenced by scanSeqlenFromLOCUS().

std::string StringParser::extractWord ( const char delimiter = " ")
inline

Definition at line 99 of file tools.h.

References atEnd(), CURRENT_REST, GBS_global_string(), pos, start, and string().

Referenced by scanSeqlenFromID(), and scanSeqlenFromLOCUS().

long StringParser::eatNumber ( bool &  eaten)
inline

Definition at line 110 of file tools.h.

References pos.

Referenced by extractNumber(), and parseCounter().

long StringParser::extractNumber ( )
inline

Definition at line 123 of file tools.h.

References CURRENT_REST, eatNumber(), and GBS_global_string().

Referenced by scanSeqlenFromLOCUS().

Member Data Documentation

stringCIter StringParser::pos

Definition at line 36 of file tools.h.

Referenced by at(), eatNumber(), eatSpaces(), extractWord(), find(), getPosition(), and lookingAt().

stringCIter StringParser::end

Definition at line 36 of file tools.h.

Referenced by atEnd().


The documentation for this struct was generated from the following file: