|
nis-util
1.0.D108
|
#include <string.h>
Public Member Functions | |
| virtual | ~input_string () |
Static Public Member Functions | |
| static pointer | create (const rcstring &filename, const rcstring &text) |
| static pointer | create (const rcstring &filename, const char *text) |
| static pointer | create_env (const rcstring &environment_variable_name) |
Protected Member Functions | |
| size_t | read_inner (source_location &data_locn, void *data, size_t data_size) |
Private Member Functions | |
| input_string (const rcstring &filename, const rcstring &text) | |
| input_string () | |
| input_string (const input_string &rhs) | |
| input_string & | operator= (const input_string &rhs) |
Private Attributes | |
| rcstring | filename |
| int | line_number |
| rcstring | text |
| size_t | tpos |
The input_string class is used to represent reading data from an in-memory string.
| input_string::~input_string | ( | ) | [virtual] |
| input_string::input_string | ( | const rcstring & | filename, |
| const rcstring & | text | ||
| ) | [private] |
| input_string::input_string | ( | ) | [private] |
The default constructor. Do not use.
| input_string::input_string | ( | const input_string & | rhs | ) | [private] |
The copy constructor. Do not use.
| rhs | The right hand side of the initialization. |
| input::pointer input_string::create | ( | const rcstring & | filename, |
| const rcstring & | text | ||
| ) | [static] |
| input_string::pointer input_string::create | ( | const rcstring & | filename, |
| const char * | text | ||
| ) | [static] |
| input_string::pointer input_string::create_env | ( | const rcstring & | environment_variable_name | ) | [static] |
| input_string& input_string::operator= | ( | const input_string & | rhs | ) | [private] |
The assignment operator. Do not use.
| rhs | The right hand side of the assignment. |
| size_t input_string::read_inner | ( | source_location & | data_locn, |
| void * | data, | ||
| size_t | data_size | ||
| ) | [protected, virtual] |
The read_inner method is called byu the underflow method to fill the buffer buf with more data.
| data_locn | The location of the beginning of the returned data. It is the first argument because it's position is immediately before the returned data. |
| data | pointer to the base of an array to receive the data |
| data_size | the maximum number of bytes of data than can be received into the data array. |
Implements input.
rcstring input_string::filename [private] |
int input_string::line_number [private] |
rcstring input_string::text [private] |
size_t input_string::tpos [private] |
The tpos instance variable is used to remember the next read position within the input, used by the read_inner method. If tpos >= text.size(), then we are at "end of file".
1.7.6.1