FileTokenizer Class Reference

Class which reads file. It supports comments in # // style, / * * / multiline comments and " " strings. More...

#include <file_tokenizer.hpp>

List of all members.

Public Member Functions

 FileTokenizer (const char *fileName)
 Create from file name - open this file.
 FileTokenizer (FILE *fileDescriptor)
 Create from file - use open file descriptor, do not close on destruction.
 ~FileTokenizer ()
bool is_feof ()
 True if there is no more tokens (but there might still be some white characters).
void get_next_token (bool noconvert=false)
 Fetch next token.

Public Attributes

int int_value
 Last token as int.
double float_value
 Last token as double.
char raw_string [2048]
 Last token (unconverted).

Private Attributes

FILE * source
const bool autoClose


Detailed Description

Class which reads file. It supports comments in # // style, / * * / multiline comments and " " strings.

Constructor & Destructor Documentation

FileTokenizer::FileTokenizer ( const char *  fileName  ) 

Create from file name - open this file.

Exceptions:
FileTokenizerException if file doesn't exists

FileTokenizer::FileTokenizer ( FILE *  fileDescriptor  )  [inline]

Create from file - use open file descriptor, do not close on destruction.

FileTokenizer::~FileTokenizer (  ) 


Member Function Documentation

bool FileTokenizer::is_feof (  ) 

True if there is no more tokens (but there might still be some white characters).

void FileTokenizer::get_next_token ( bool  noconvert = false  ) 

Fetch next token.


Member Data Documentation

Last token as int.

Last token as double.

Last token (unconverted).

FILE* FileTokenizer::source [private]

const bool FileTokenizer::autoClose [private]


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

Generated on Thu Oct 22 16:30:59 2009 for Main server by  doxygen 1.5.6