#include <text_file.h>
This class is experimental.
Note: Text files are not entirely architecture-independent, For example, a larger integer will not be read correctly on small integer systems.
Definition at line 249 of file text_file.h.
Public Member Functions | |
text_in_file (std::istream *in_file) | |
Use input stream in_file for text input. | |
text_in_file (std::string file_name) | |
Read an input file with name file_name . | |
virtual int | bool_in (bool &dat, std::string name="") |
Input a bool variable. | |
virtual int | char_in (char &dat, std::string name="") |
Input a char variable. | |
virtual int | double_in (double &dat, std::string name="") |
Input a double variable. | |
virtual int | float_in (float &dat, std::string name="") |
Input a float variable. | |
virtual int | int_in (int &dat, std::string name="") |
Input an int variable. | |
virtual int | long_in (unsigned long int &dat, std::string name="") |
Input an long variable. | |
virtual int | string_in (std::string &dat, std::string name="") |
Input a string variable. | |
virtual int | word_in (std::string &dat, std::string name="") |
Input a word variable. | |
virtual int | start_object (std::string &type, std::string &name) |
Start object input. | |
virtual int | skip_object () |
Skip the present object for the next call to read_type(). | |
virtual int | end_object () |
End object input. | |
virtual int | init_file () |
Initialize file input. | |
virtual int | clean_up () |
Finish file input. | |
std::string | reformat_string (std::string in) |
Add brackets and replace carriage returns with spaces. | |
Protected Member Functions | |
bool | is_hc_type (std::string type) |
If true, then type is a "hard-coded" type. | |
virtual int | word_in_noerr (std::string &dat, std::string name="") |
A version of word_in() which doesn't call the error handler. | |
Protected Attributes | |
std::stack< bool > | hcs |
A list to indicate if the current object and subobjects are "hard-coded". | |
std::istream * | ins |
The input stream. | |
bool | from_string |
True if the string version of the constructor was called. |
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page