From: <sv...@ww...> - 2004-12-01 05:56:05
|
Author: mkrose Date: 2004-11-30 21:55:59 -0800 (Tue, 30 Nov 2004) New Revision: 1333 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Tools/TaggedRecordCompiler/parsetab.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_grammar.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_lex.py Log: Add type statement to trc to declare external types. External types must have stream operators for serializing to Writer and Reader streams, as well formatted output to std::ostream (for diagnostics). Using EXTTYPE to represent the external typename, the following functions need to be defined: Reader &operator>>(Reader &, EXTTYPE &); Writer &operator<<(Writer &, EXTTYPE const &); std::ostream &operator<<(std::ostream &, EXTTYPE const &); To use an external type in a trc definition file, just declare the type prior to using it, like this: type EXTTYPE; Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1333 Diff omitted (31277 bytes). |