Choreonoid  1.8
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cnoid::SimpleScanner Class Reference

#include <SimpleScanner.h>

Public Types

typedef std::ifstream::pos_type pos_type
 

Public Member Functions

 SimpleScanner ()
 
void clear (bool doRelease=true)
 
bool open (const std::string &filename)
 
void close ()
 
bool getLine ()
 
const std::string & currentLine ()
 
void moveForward ()
 
void skipSpaces ()
 
void skipSpacesAndTabs ()
 
int peekChar ()
 
int readChar ()
 
bool checkCharAtCurrentPosition (int chara)
 
bool checkChar (int chara)
 
bool checkLF ()
 
void checkLFEx ()
 
bool checkEOF ()
 
bool checkStringAtCurrentPosition (const char *str)
 
bool checkString (const char *str)
 
void checkStringEx (const char *str)
 
bool seekToString (pos_type initialSeekPos, const char *str, size_t maxLength, pos_type &out_seekPos)
 
bool readStringAtCurrentPosition (std::string &out_string)
 
bool readString (std::string &out_string)
 
bool readStringToEOL (std::string &out_string)
 
float readFloatEx ()
 
bool readInt (int &out_value)
 
int readIntEx ()
 
void throwEx (const std::string &error)
 

Public Attributes

std::ifstream ifs
 
char * buf
 
size_t bufsize
 
const char * pos
 
const char * dummy
 
const char * bufEndPos
 
size_t lineNumber
 
std::string filename
 
std::string tmpString
 
char buf1 [buf1size]
 
std::vector< char > buf2
 

Static Public Attributes

static constexpr size_t buf1size = 256
 

Member Typedef Documentation

◆ pos_type

typedef std::ifstream::pos_type cnoid::SimpleScanner::pos_type

Constructor & Destructor Documentation

◆ SimpleScanner()

cnoid::SimpleScanner::SimpleScanner ( )
inline

Member Function Documentation

◆ checkChar()

bool cnoid::SimpleScanner::checkChar ( int  chara)
inline

◆ checkCharAtCurrentPosition()

bool cnoid::SimpleScanner::checkCharAtCurrentPosition ( int  chara)
inline

◆ checkEOF()

bool cnoid::SimpleScanner::checkEOF ( )
inline

◆ checkLF()

bool cnoid::SimpleScanner::checkLF ( )
inline

◆ checkLFEx()

void cnoid::SimpleScanner::checkLFEx ( )
inline

◆ checkString()

bool cnoid::SimpleScanner::checkString ( const char *  str)
inline

◆ checkStringAtCurrentPosition()

bool cnoid::SimpleScanner::checkStringAtCurrentPosition ( const char *  str)
inline

◆ checkStringEx()

void cnoid::SimpleScanner::checkStringEx ( const char *  str)
inline

◆ clear()

void cnoid::SimpleScanner::clear ( bool  doRelease = true)
inline

◆ close()

void cnoid::SimpleScanner::close ( )
inline

◆ currentLine()

const std::string& cnoid::SimpleScanner::currentLine ( )
inline

◆ getLine()

bool cnoid::SimpleScanner::getLine ( )
inline

◆ moveForward()

void cnoid::SimpleScanner::moveForward ( )
inline

◆ open()

bool cnoid::SimpleScanner::open ( const std::string &  filename)
inline

◆ peekChar()

int cnoid::SimpleScanner::peekChar ( )
inline

◆ readChar()

int cnoid::SimpleScanner::readChar ( )
inline

◆ readFloatEx()

float cnoid::SimpleScanner::readFloatEx ( )
inline

◆ readInt()

bool cnoid::SimpleScanner::readInt ( int &  out_value)
inline

◆ readIntEx()

int cnoid::SimpleScanner::readIntEx ( )
inline

◆ readString()

bool cnoid::SimpleScanner::readString ( std::string &  out_string)
inline

◆ readStringAtCurrentPosition()

bool cnoid::SimpleScanner::readStringAtCurrentPosition ( std::string &  out_string)
inline

◆ readStringToEOL()

bool cnoid::SimpleScanner::readStringToEOL ( std::string &  out_string)
inline

◆ seekToString()

bool cnoid::SimpleScanner::seekToString ( pos_type  initialSeekPos,
const char *  str,
size_t  maxLength,
pos_type out_seekPos 
)
inline

◆ skipSpaces()

void cnoid::SimpleScanner::skipSpaces ( )
inline

◆ skipSpacesAndTabs()

void cnoid::SimpleScanner::skipSpacesAndTabs ( )
inline

◆ throwEx()

void cnoid::SimpleScanner::throwEx ( const std::string &  error)
inline

Member Data Documentation

◆ buf

char* cnoid::SimpleScanner::buf

◆ buf1

char cnoid::SimpleScanner::buf1[buf1size]

◆ buf1size

constexpr size_t cnoid::SimpleScanner::buf1size = 256
staticconstexpr

◆ buf2

std::vector<char> cnoid::SimpleScanner::buf2

◆ bufEndPos

const char* cnoid::SimpleScanner::bufEndPos

◆ bufsize

size_t cnoid::SimpleScanner::bufsize

◆ dummy

const char* cnoid::SimpleScanner::dummy

◆ filename

std::string cnoid::SimpleScanner::filename

◆ ifs

std::ifstream cnoid::SimpleScanner::ifs

◆ lineNumber

size_t cnoid::SimpleScanner::lineNumber

◆ pos

const char* cnoid::SimpleScanner::pos

◆ tmpString

std::string cnoid::SimpleScanner::tmpString

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