To run the snippets, use either the SnippetBrowser or RunSnippet utilities. RunSnippet can be invoked like this:
TStreamExample, defined in StreamExample.h and StreamExample.C, is used by the StreamingVersion snippet in TStreamingSnippets. The source code for two versions of this class is available, controlled by the variable SAMPLE_NEWVERSION. This variable is set in the .PinkMake file. When SAMPLE_NEWVERSION is undefined, the "original" version code is used. This original code only writes and reads the original version of the flattened information. When SAMPLE_NEWVERSION is defined, the "new" version code is used. This code writes the new version of the flattened information, but reads both the old and new versions.
The StreamingVersion snippet relies on data files in $TaligentRoot/RuntimeEnv/Data/Samples that contain flattened representations of old and new versions of TStreamExample. This data is created by two versions of StreamExampleDataGeneratorApp: one built with SAMPLE_NEWVERSION undefined, and one with it defined.
You cannot install two versions of a library at the same time. If you want to run these snippets using a different version of the library, you need to:
1) Define (or undefine) the SAMPLE_NEWVERSION variable by editing the compileoptions line in the .PinkMake file.
2) Execute 'Makeit Clean Complete' to delete the old code and rebuild the project. The new library will be installed.
When you next execute the snippet, the changed version of the library will be used.
If you want to generate new data files, you will have to follow this same procedure so that you can generate one file using one library, and the other file using the other. After each build, execute StreamExampleGeneratorApp to generate the data file.