// trfstream.h #ifndef trfstream_H #define trfstream_H // Define the insertion objects used ito format streams in TRF++. // // begin_object - indicates the start of a new object // end_object - indicates the end of an object // new_line - indicates a new line // trf_format - Default format for TRF++ streams. // // These are used as follows: // // ----------------------------------------------- // // f.h // // # include "trfutil/trfstream.h" // // void f(ostream& stream, double x, double y) { // stream << begin_object; // stream << "x = " << x; // stream << new_line; // stream << "y = " << y' // stream << end_object; // } // // ----------------------------------------------- // // #include // needed for cout // #include "f.h" // // void main() { // std::cout << trf_format; // f(std::cout,1.2,2.34); // } // // ----------------------------------------------- // // Depending on the definition of trf_stream, the output might be: // // [ x = 1.0 // y = 2.34 ] // #include #include "objstream/ObjectFormat.hpp" namespace trf { extern ObjectFormat trf_format; } // end namespace #endif