This is the class used to strip comments (and whitespace) from any input stream.
More...
#include <commentstream.h>
|
void | killComments () |
| This function will remove the comments and whitespace from the input stream. More...
|
|
|
istream * | istrptr |
| This is the input stream that will have the comments and whitespace removed. More...
|
|
This is the class used to strip comments (and whitespace) from any input stream.
◆ CommentStream() [1/2]
CommentStream::CommentStream |
( |
| ) |
|
|
inline |
◆ CommentStream() [2/2]
CommentStream::CommentStream |
( |
istream & |
istr | ) |
|
|
inline |
This is the CommentStream constructor for a given input stream.
- Parameters
-
istr | is the given input stream |
◆ ~CommentStream()
CommentStream::~CommentStream |
( |
| ) |
|
|
inline |
◆ eof()
int CommentStream::eof |
( |
| ) |
|
|
inline |
This function will check to see if the input stream has reached the end of file marker.
- Returns
- 1 if the input stream has reached the end of file marker, 0 otherwise
◆ fail()
int CommentStream::fail |
( |
| ) |
|
|
inline |
This function will check to see if the input stream has failed.
- Returns
- 1 if the input stream has failed, 0 otherwise
◆ get()
This function will read the next character from the input stream.
- Parameters
-
c | will store the next character in the input stream |
◆ getLine()
CommentStream & CommentStream::getLine |
( |
char * |
text, |
|
|
int |
length |
|
) |
| |
This function will read the next line from the input stream.
- Parameters
-
text | will store the next line in the input stream |
length | is the length of the line to be read from the input stream |
◆ killComments()
void CommentStream::killComments |
( |
| ) |
|
|
protected |
This function will remove the comments and whitespace from the input stream.
◆ operator!()
int CommentStream::operator! |
( |
| ) |
|
|
inline |
This function will check to see if the input stream has failed.
- Returns
- 1 if the input stream has failed, 0 otherwise
◆ operator>>() [1/4]
◆ operator>>() [2/4]
This operator will read data from the CommentStream and store it as a char*.
- Parameters
-
a | is the char* used to store the data that has been read |
◆ operator>>() [3/4]
This operator will read data from the CommentStream and store it as a double.
- Parameters
-
a | is the double used to store the data that has been read |
◆ operator>>() [4/4]
This operator will read data from the CommentStream and store it as an integer.
- Parameters
-
a | is the integer used to store the data that has been read |
◆ peek()
char CommentStream::peek |
( |
| ) |
|
This function will inspect (but not read) the next character in the input stream.
- Returns
- the next character in the input stream
◆ seekg()
This function will find the specified position in the input stream.
- Parameters
-
pos | is the position in the input stream to be found |
◆ setStream()
void CommentStream::setStream |
( |
istream & |
istr | ) |
|
|
inline |
This function will store a given input stream.
- Parameters
-
istr | is the given input stream |
◆ tellg()
streampos CommentStream::tellg |
( |
| ) |
|
|
inline |
This function will return the current position in the input stream.
- Returns
- pos, the current position in the input stream
◆ ws
◆ istrptr
istream* CommentStream::istrptr |
|
protected |
This is the input stream that will have the comments and whitespace removed.
The documentation for this class was generated from the following files: