1<html><head>
2	<title>Metakit sample code - Struct</title>
3</head><body bgcolor=white>
4
5<font face=Helvetica size=3>
6
7<!--begin-->
8<h2><img src="e4app.gif" alt="App Icon" border=0 align=left>
9Metakit sample code - Struct</h2><br clear=left>
10
11<p>This application highlights some low-level aspects of the Metakit library.
12</p>
13
14<p><b>What it does</b>: Struct is a little utility which displays the data
15structure of any Metakit datafile on standard output. The output uses a
16text-mode graph to display the data structure, which can be useful to determine
17what information is stored in a specific Metakit datafile. </p>
18
19<p><b>What it illustrates</b>: For demonstration purposes, Struct has been
20compiled as a real-mode small-model MS-DOS utility program. It shows how you can extract
21structural information from a Metakit datafile without knowing anything
22about it. The sample code includes a general &quot;StructureMap&quot; class
23to generate text-based graphs. The size of the STRUCT.EXE program demonstrates
24how small a fully self-contained application using Metakit can be. </p>
25
26<p>Note that although Struct must respect the very severe 64 K memory limit imposed
27by small-model MS-DOS, you can still use this program to examine the structure of files
28of any reasonable size. The reason for this is that Metakit implements on-demand loading,
29and that Struct never accesses the actual data itself.</p>
30
31<p><b>How to use it</b>: To examine the structure of a datafile, simply
32run STRUCT.EXE from the MS-DOS prompt with the filename as argument. There
33are a few command-line options to control the output format, these are
34listed when you start Struct without a filename. They are: </p>
35
36<ul>
37<dl>
38	<dt><b>-d</b> </dt> <dd>Show a linear description instead of the default tree. </dd>
39	<dt><b>-t</b> </dt> <dd>Show a linear description of the structure, omitting the property names.</dd>
40	<dt><b>-c </b></dt> <dd>Show column structure instead of the deafult tree structure (advanced).</dd>
41</dl>
42</ul>
43
44<p>You can redirect the output to file, just as with any other MS-DOS program.
45</p>
46
47<p><b>Known problems</b>: None. </p>
48
49<p><b>Files in EXAMPLES\STRUCT</b>: </p>
50
51<p>STRUCT.CPP - Struct main program 
52<br>STRUCT.MAK - MSVC 1.52 project makefile </p>
53<!--end-->
54
55<center><p><hr size=1>
56||
57&nbsp; <a href="index.html" target="_top">Roadmap</a>
58&nbsp; <a href="classes.html">Class Index</a>
59&nbsp; <a href="samples.html">Sample Index</a>
60&nbsp; ||
61&nbsp; <a href="intro.html">Introduction</a>
62&nbsp; <a href="tips.html">Tips and Tricks</a>
63&nbsp; || 
64
65</center>
66</font>
67
68</body></html>
69