Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > d0f84c65bfdfda037b021ed34815337c > files > 109

libmetakit-devel-2.4.9.7-9.0.mga1.i586.rpm

<html><head>
	<title>Metakit sample code - Struct</title>
</head><body bgcolor=white>

<font face=Helvetica size=3>

<!--begin-->
<h2><img src="e4app.gif" alt="App Icon" border=0 align=left>
Metakit sample code - Struct</h2><br clear=left>

<p>This application highlights some low-level aspects of the Metakit library.
</p>

<p><b>What it does</b>: Struct is a little utility which displays the data
structure of any Metakit datafile on standard output. The output uses a
text-mode graph to display the data structure, which can be useful to determine
what information is stored in a specific Metakit datafile. </p>

<p><b>What it illustrates</b>: For demonstration purposes, Struct has been
compiled as a real-mode small-model MS-DOS utility program. It shows how you can extract
structural information from a Metakit datafile without knowing anything
about it. The sample code includes a general &quot;StructureMap&quot; class
to generate text-based graphs. The size of the STRUCT.EXE program demonstrates
how small a fully self-contained application using Metakit can be. </p>

<p>Note that although Struct must respect the very severe 64 K memory limit imposed
by small-model MS-DOS, you can still use this program to examine the structure of files
of any reasonable size. The reason for this is that Metakit implements on-demand loading,
and that Struct never accesses the actual data itself.</p>

<p><b>How to use it</b>: To examine the structure of a datafile, simply
run STRUCT.EXE from the MS-DOS prompt with the filename as argument. There
are a few command-line options to control the output format, these are
listed when you start Struct without a filename. They are: </p>

<ul>
<dl>
	<dt><b>-d</b> </dt> <dd>Show a linear description instead of the default tree. </dd>
	<dt><b>-t</b> </dt> <dd>Show a linear description of the structure, omitting the property names.</dd>
	<dt><b>-c </b></dt> <dd>Show column structure instead of the deafult tree structure (advanced).</dd>
</dl>
</ul>

<p>You can redirect the output to file, just as with any other MS-DOS program.
</p>

<p><b>Known problems</b>: None. </p>

<p><b>Files in EXAMPLES\STRUCT</b>: </p>

<p>STRUCT.CPP - Struct main program 
<br>STRUCT.MAK - MSVC 1.52 project makefile </p>
<!--end-->

<center><p><hr size=1>
||
&nbsp; <a href="index.html" target="_top">Roadmap</a>
&nbsp; <a href="classes.html">Class Index</a>
&nbsp; <a href="samples.html">Sample Index</a>
&nbsp; ||
&nbsp; <a href="intro.html">Introduction</a>
&nbsp; <a href="tips.html">Tips and Tricks</a>
&nbsp; || 

</center>
</font>

</body></html>