#include <stream.hh>

Public Member Functions | |
| Stream (void) | |
| Stream (const char *Name, const char *Type=0, const char *Data=0) | |
| Stream (const Stream &x) | |
| ~Stream () | |
| Stream & | operator= (const Stream &x) |
| void | Spew (Xwriter &xout) const |
| void | append (const std::string &s) |
| Stream * | Clone (void) const |
| bool | empty (void) const |
| const char * | getDelimit (void) const |
| const char * | getEncode (void) const |
| const char * | getObjType (void) const |
| void | delimit (char Delim) |
| void | Add (float x) |
| void | Add (const std::string &x, bool escsp=false) |
| void | Add (int x) |
| void | Add (double x) |
| void | Add (const UCVec &x) |
| void | Clear (void) |
| void | Fill (int N, const float *x, int perLine=0) |
| void | Fill (int N, const double *x, int perLine=0) |
| void | Fill (int N, const int *x, int perLine=0) |
| void | Fill (int N, const std::string x[], int perLine=0) |
| bool | decode64Data (void *data, int dLen, int N) |
| void | encode64Data (const char *data, int N) |
| void | open (void) |
| void | lineBreak (void) |
| bool | read (double data[], int N) |
| Read N data words. | |
| bool | read (float data[], int N) |
| Read N data words. | |
| bool | read (int data[], int N) |
| Read N data words. | |
| bool | read (std::string data[], int N) |
| Read N data strings. | |
| void | setRemote (const char *File) |
| void | setData (const char *Data) |
| void | setEncode (const char *Code) |
| void | setSize (int Size) |
| xsil::Stream::Stream | ( | void | ) |
| xsil::Stream::Stream | ( | const char * | Name, | |
| const char * | Type = 0, |
|||
| const char * | Data = 0 | |||
| ) |
| xsil::Stream::~Stream | ( | ) |
XSIL stream destructor.
| void xsil::Stream::Spew | ( | Xwriter & | xout | ) | const [virtual] |
Write it out as an XML document.
Implements xsil::xobj.
| void xsil::Stream::append | ( | const std::string & | s | ) |
Append a string to the current local stream contents. Each striing is assumed to be a lexically complete token and is separated by the current delimiter character from the preceding data. If the string pushes the current line length beyond the maximum length, a new-line character is added and the white space is inserted so that the string will start at the current indent level. brief Add a string to the current local stream.
| s | Lexically complete token to be added to the stream. |
| Stream* xsil::Stream::Clone | ( | void | ) | const [virtual] |
Create a identical copy of the current Stream. brief Clone a stream.
Implements xsil::xobj.
| bool xsil::Stream::empty | ( | void | ) | const [inline] |
Test for data in stream.
| const char * xsil::Stream::getDelimit | ( | void | ) | const [inline] |
Get the delimiter character. brief Get delimiter.
| const char * xsil::Stream::getEncode | ( | void | ) | const [inline] |
Get encoding type. brief Get encoding.
| const char* xsil::Stream::getObjType | ( | void | ) | const [virtual] |
Get object type
Implements xsil::xobj.
| void xsil::Stream::delimit | ( | char | Delim | ) |
Set the delimiter character. The delimiter character must be unique. brief Set the delimiter character.
| void xsil::Stream::Add | ( | float | x | ) |
Append a floating point entry to the stream string. brief Append a float.
| x | float point number to be added to the stream. |
| void xsil::Stream::Add | ( | const std::string & | x, | |
| bool | escsp = false | |||
| ) |
Append a string to the stream string. brief Append a string.
| x | Character string to be appended to the stream. | |
| escsp | Escape blanks. |
| void xsil::Stream::Add | ( | int | x | ) |
Append a floating point entry to the stream string. brief Append an integer.
| x | Integer number to be added to the stream. |
| void xsil::Stream::Add | ( | double | x | ) |
Append a floating point entry to the stream string. brief Add a double float.
| x | Double floating point number to be added to the stream. |
| void xsil::Stream::Add | ( | const UCVec & | x | ) |
Append an unsigned byte string. brief Add a byte string.
| x | reference to the byte string descriptor. |
| void xsil::Stream::Clear | ( | void | ) |
Clear out the stream data. brief Clear the stream data.
| void xsil::Stream::Fill | ( | int | N, | |
| const float * | x, | |||
| int | perLine = 0 | |||
| ) |
| void xsil::Stream::Fill | ( | int | N, | |
| const double * | x, | |||
| int | perLine = 0 | |||
| ) |
| void xsil::Stream::Fill | ( | int | N, | |
| const int * | x, | |||
| int | perLine = 0 | |||
| ) |
| void xsil::Stream::Fill | ( | int | N, | |
| const std::string | x[], | |||
| int | perLine = 0 | |||
| ) |
| bool xsil::Stream::decode64Data | ( | void * | data, | |
| int | dLen, | |||
| int | N | |||
| ) |
Decode and copy base64 encoded data from the strem into a data array. The data are swapped if the specified byte ordering is different than that of the node. The byte-swapping granularity is specified by the dLen parameter. brief Fill from stream.
| data | String array to be encoded into the stream. | |
| dLen | Data granularity for use in byte swapping. | |
| N | Length of data to be encoded into the stream. |
| void xsil::Stream::encode64Data | ( | const char * | data, | |
| int | N | |||
| ) |
Fill stream with base64 encoded data. brief Fill from string.
| data | String array to be encoded into the stream. | |
| N | length of data to be encoded into the stream. |
| void xsil::Stream::open | ( | void | ) |
Open the stream for input.
| void xsil::Stream::lineBreak | ( | void | ) |
Insert a line break at the current position. brief Insert a line break.
| bool xsil::Stream::read | ( | double | data[], | |
| int | N | |||
| ) |
Read N data words.
Read N double float data words from the input stream.
| data | Double vector to receive requested data. | |
| N | Number of data words to read. |
| bool xsil::Stream::read | ( | float | data[], | |
| int | N | |||
| ) |
Read N data words.
Read N float data words from the input stream.
| data | Float vector to receive requested data. | |
| N | Number of data words to read. |
| bool xsil::Stream::read | ( | int | data[], | |
| int | N | |||
| ) |
Read N data words.
Read N integer data words from the input stream.
| data | Integer vector to receive requested data. | |
| N | Number of data words to read. |
| bool xsil::Stream::read | ( | std::string | data[], | |
| int | N | |||
| ) |
Read N data strings.
Read N character strings from the input stream.
| data | String vector to receive requested data. | |
| N | Number of data strings to read. |
| void xsil::Stream::setRemote | ( | const char * | File | ) |
Make the stream a remote stream and define the file name. brief Define file for remote stream.
| File | File name or web address from which data are to be read. |
| void xsil::Stream::setData | ( | const char * | Data | ) |
Set the input data to the specified character string. brief set stream data.
| Data | pointer to a data string. |
| void xsil::Stream::setEncode | ( | const char * | Code | ) |
Specify the encoding technique used for binary data. brief Specify the encoding technique.
| Code | pointer to a string describing the encodeing technique. |
| void xsil::Stream::setSize | ( | int | Size | ) |
Set the Maximum line size. brief set line size.
| Size | Maximum line size to be used when printing the stream. |
1.5.4