VisSDStream.h
资源名称:VisSDK.rar [点击查看]
上传用户:weixiumei
上传日期:2008-05-15
资源大小:1769k
文件大小:13k
源码类别:
人物传记/成功经验
开发平台:
Visual C++
- ///////////////////////////////////////////////////////////////////////////
- //
- // NAME
- // VisSDStream.h -- self-describing stream format for data input/output
- //
- // DESCRIPTION
- // The CVisSDStream class is used to read and write ASCII descriptions of
- // MSVisSDK objects. The format for each class is printed at the top of
- // the file. This allows data files to remain somewhat forward and
- // backward compatible, as fields are added/removed to/from classes.
- //
- // The class declarations follow usual C++ syntax, with some restrictions:
- // . exactly one field per line
- // ...
- //
- // Comments and whitespace can be interspersed with the declarations and data.
- // The data itself uses the curly bracket and comma separated syntax
- // of C/C++ data initialization. Variable length lists and sets
- // are supported.
- //
- // Each class which wants to be printable is responsible for providing
- // its own reading/writing routine. Each class which wants to be described
- // must provide a printable lists of fields currently supported. These
- // fields are accesses through the
- //
- // SEE ALSO
- // VisSDStream.cpp implementation
- //
- // Rick's research notes from Sept 13, 1997.
- //
- // BUGS
- //
- //
- // DESIGN
- // The current input/output is written on top of the FILE <stdio.h>
- // routines (fprintf, fscanf). They could be re-written to operate
- // on streams, if desired (however, separate internal input and output
- // streams would be required). This would enable output to strings,
- // for debugging purposes.
- //
- // To maintain backward compatibility, we can use one of two strategies:
- // 1. require newer software to recognize old field, even if these
- // are discarded during the read process
- // 2. have some way to skip unrecognized fields. This requires the
- // syntax of data to be restricted, e.g., bracketed numbers,
- // strings and characters.
- // The second approach has the advantage that code is compatible both
- // ways, i.e., old code can deal with newer data which has extra fields.
- //
- // Warning: The format of these files may change in future releases.
- //
- // Copyright