Public Member Functions | |
| BoStream () | |
| Default constructor, need to open. | |
| BoStream (const char *s) | |
| Constructor takes name of input file. | |
| BoStream (const char *s, std::ios_base::openmode mode) | |
| Constructor takes name of input file, mode. | |
| BoStream (const char *s, int mode) | |
| Constructor takes name of input file, mode. | |
| ~BoStream () | |
| Destructor, calls xdr_destroy to delete xdr stream. | |
| BoStream & | operator<< (const String &ds) |
| Binary Output stream operator<<. | |
| BoStream & | operator<< (const char *s) |
| Output operator, writes char* TO binary stream BoStream. | |
| BoStream & | operator<< (const char &c) |
| Output operator, writes char to binary stream BoStream. | |
| BoStream & | operator<< (const int &i) |
| Output operator, writes int to binary stream BoStream. | |
| BoStream & | operator<< (const long &l) |
| Output operator, writes long to binary stream BoStream. | |
| BoStream & | operator<< (const short &s) |
| Output operator, writes short to binary stream BoStream. | |
| BoStream & | operator<< (const bool &b) |
| Output operator, writes bool to binary stream BoStream. | |
| BoStream & | operator<< (const double &d) |
| Output operator, writes double to binary stream BoStream. | |
| BoStream & | operator<< (const float &f) |
| Output operator, writes float to binary stream BoStream. | |
| BoStream & | operator<< (const unsigned char &c) |
| Output operator, writes unsigned char to binary stream BoStream. | |
| BoStream & | operator<< (const unsigned int &i) |
| Output operator, writes unsigned int to binary stream BoStream. | |
| BoStream & | operator<< (const unsigned long &l) |
| Output operator, writes unsigned long to binary stream BoStream. | |
| BoStream & | operator<< (const unsigned short &s) |
| Output operator, writes unsigned short to binary stream BoStream. | |
Private Attributes | |
| XDR | xdrOutBuf |
| XDR output stream buffer. | |
| char | outBuf [MAX_NETOBJ_SZ] |
| Buffer to hold converted data before it is written. | |
The Dakota::BoStream class is a binary output classes which overloads the << operator for all standard data types (int, char, float, etc). The class relies on the built in write methods within the ostream base classes. Dakota::BoStream inherits from the ofstream class. The motivation to develop this class was to replace the Rogue wave class which Dakota historically used for binary I/O. If available, the class utilize rpc/xdr to construct machine independent binary files. These Dakota restart files can be moved between hosts.
| BoStream | ( | ) |
Default constructor, need to open.
Default constructor allocates the xdr stream but does not call the open() method. The open() method must be called before stream can be written to.
| BoStream | ( | const char * | s | ) |
Constructor takes name of input file.
Constructor, takes char * filename as argument. Calls base class open method with filename and no other arguments. Also allocates xdr stream
| BoStream | ( | const char * | s, | |
| std::ios_base::openmode | mode | |||
| ) |
Constructor takes name of input file, mode.
Constructor, takes char * filename and int flags as arguments. Calls base class open method with filename and flags as arguments. Also allocates xdr stream. Note : If no rpc/xdr support xdr calls are #ifdef'd out.
| BoStream & operator<< | ( | const char * | s | ) |
1.5.1