Takes a buffer of ascii char and returns a SmartPtr to a vector of strings containing individual lines of data (it looks for a newline character). It does NOT append the newline character to the strings, nor will it append EOF characters.
Static Public Member Functions | |
| static SmartPtr< std::vector< std::string > > | getLines (const Buffer &buf, std::string *last_unterminated_line=0) |
| Splits text into a vector of lines. | |
| static void | read (BOIStream &s, std::string &str, char skip=' ') |
| like scanf("%s") for BOStreams. | |
| static void | read (BOIStream &s, int &val, char skip=' ') |
| like atoi() for BOStreams. | |
| static void | read (BOIStream &s, short &val, char skip=' ') |
| like atoi() for BOStreams. | |
| static void | read (BOIStream &s, float &val, char skip=' ') |
| like atof() for BOStreams. | |
| static void | write (BOOStream &s, const std::string &str) |
| like printf("%s") for BOStreams. | |
| static void | write (BOOStream &s, float val) |
| like printf("%f") for BOStreams. | |
| static void | write (BOOStream &s, int val) |
| like printf("%d") for BOStreams. | |
| static void | write (BOOStream &s, short val) |
| like printf("%hd") for BOStreams. | |
| static SmartPtr< std::vector< std::string > > code::AsciiLineReader::getLines | ( | const Buffer & | buf, | |
| std::string * | last_unterminated_line = 0 | |||
| ) | [static] |
Splits text into a vector of lines.
Anything after the last linefeed goes into the optional `unterminated_last_line' argument -- NOT the vector.
Depending on your reading mode, you may have to append the first string from your next buffer to this string.
`last_unterminated_line' is unchanged if `buf' ends with a linefeed.
| static void code::AsciiLineReader::read | ( | BOIStream & | s, | |
| float & | val, | |||
| char | skip = ' ' | |||
| ) | [static] |
like atof() for BOStreams.
Skips leading skip/whitespace chars.
| static void code::AsciiLineReader::read | ( | BOIStream & | s, | |
| short & | val, | |||
| char | skip = ' ' | |||
| ) | [static] |
like atoi() for BOStreams.
Skips leading skip/whitespace chars.
| static void code::AsciiLineReader::read | ( | BOIStream & | s, | |
| int & | val, | |||
| char | skip = ' ' | |||
| ) | [static] |
like atoi() for BOStreams.
Skips leading skip/whitespace chars.
| static void code::AsciiLineReader::read | ( | BOIStream & | s, | |
| std::string & | str, | |||
| char | skip = ' ' | |||
| ) | [static] |
like scanf("%s") for BOStreams.
Skips leading skip/whitespace chars.
| static void code::AsciiLineReader::write | ( | BOOStream & | s, | |
| short | val | |||
| ) | [static] |
like printf("%hd") for BOStreams.
| static void code::AsciiLineReader::write | ( | BOOStream & | s, | |
| int | val | |||
| ) | [static] |
like printf("%d") for BOStreams.
| static void code::AsciiLineReader::write | ( | BOOStream & | s, | |
| float | val | |||
| ) | [static] |
like printf("%f") for BOStreams.
| static void code::AsciiLineReader::write | ( | BOOStream & | s, | |
| const std::string & | str | |||
| ) | [static] |
like printf("%s") for BOStreams.
1.4.7