<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_rwmodel_8cpp">
<title>/Users/bernard/b20/bsoft/src/rwmodel/rwmodel.cpp File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/src/rwmodel/rwmodel.cpp</primary></indexterm>
<para>

<para>Library routines to read and write atomic model parameters. </para>
 
</para>
<programlisting>#include &quot;rwmodel.h&quot;
#include &quot;rwmodel_star.h&quot;
#include &quot;rwmodel_xml.h&quot;
#include &quot;rwmodel_cmm.h&quot;
#include &quot;rwmodel_bild.h&quot;
#include &quot;rwmodel_mol.h&quot;
#include &quot;rwmodel_vega.h&quot;
#include &quot;model_links.h&quot;
#include &quot;file_util.h&quot;
#include &quot;linked_list.h&quot;
#include &quot;Color.h&quot;
#include &quot;utilities.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1ac97c50e35b1960b3762ede04e556ce06">read_model</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename)</para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a810dfb4b907a049b3f2b0baa48b147c1">read_model</link> (<link linkend="_class_bstring">Bstring</link> *file_list)</para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a08007ca443b95429702f48f61dd6ccbe">read_model</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename, <link linkend="_class_bstring">Bstring</link> &amp;paramfile)</para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1aaa3d7b9d5570d45b6bccb5ba1b84a20f">read_model</link> (<link linkend="_class_bstring">Bstring</link> *file_list, <link linkend="_class_bstring">Bstring</link> &amp;paramfile)</para>

<para>Reads model parameters. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a041127357e33849f55d16a7e9239f3ac">write_model</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename, <link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Writes model parameters. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a76c34f193ba01f5059630078549335b1">model_init</link> (<link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Initializes a model structure. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a75967edab7f868e18c46f8dfc0270354">model_init</link> (const char *cid)</para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a5cce379cd4ad0c8560e0ed69baa09203">model_add</link> (<link linkend="_struct_bmodel">Bmodel</link> **<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Adds a model to a linked list. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a42c833c02b04c330313cc5c8660291d0">model_add</link> (<link linkend="_struct_bmodel">Bmodel</link> **<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, const char *cid)</para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1ae237a2d60ca6c6b03431011b33421640">model_add</link> (<link linkend="_struct_bmodel">Bmodel</link> **<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_struct_bmodel">Bmodel</link> *model_nu)</para>
</listitem>
            <listitem><para><link linkend="_struct_bcomptype">Bcomptype</link> * <link linkend="_rwmodel_8cpp_1a0a89638b7b36d7d24b91da464011a5b9">component_type_add</link> (<link linkend="_struct_bcomptype">Bcomptype</link> **type, <link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Adds a component type to a linked list. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomponent">Bcomponent</link> * <link linkend="_rwmodel_8cpp_1a0b2efc5e8ffb10993a1a737c9d977d68">component_add</link> (<link linkend="_struct_bcomponent">Bcomponent</link> **comp, <link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Adds a component to a linked list. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomponent">Bcomponent</link> * <link linkend="_rwmodel_8cpp_1a799a4aa9533a6782ee661f5ae53b56de">component_add</link> (<link linkend="_struct_bcomponent">Bcomponent</link> **comp, unsigned long number)</para>
</listitem>
            <listitem><para><link linkend="_struct_blink">Blink</link> * <link linkend="_rwmodel_8cpp_1afe6df6a836d297d3ffce4b764f2f2602">link_add</link> (<link linkend="_struct_blink">Blink</link> **link, <link linkend="_struct_bcomponent">Bcomponent</link> *comp1, <link linkend="_struct_bcomponent">Bcomponent</link> *comp2, double <link linkend="__vector3_8h_1a7baf5ed670fcf9bcca9a3a400820e292">length</link>, double radius)</para>

<para>Adds a component link to a linked list. </para>
</listitem>
            <listitem><para><link linkend="_struct_blink">Blink</link> * <link linkend="_rwmodel_8cpp_1ac943dc851eee280900ec851471d1b716">link_add</link> (<link linkend="_struct_blink">Blink</link> **link, <link linkend="_struct_bcomponent">Bcomponent</link> *comp1, <link linkend="_struct_bcomponent">Bcomponent</link> *comp2)</para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1af1f95f6710cf59add3b24975eede58cb">link_index</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *comp, <link linkend="_struct_bcomponent">Bcomponent</link> *comp2)</para>

<para>Returns the index of a linked component. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a64338597cab826cf0f8201ee81336cd2">model_set_map_filenames</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;mapfile)</para>

<para>Sets all the map file names of selected models. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomptype">Bcomptype</link> * <link linkend="_rwmodel_8cpp_1ae96dc13b92b119a3877c00dda7fef2fa">model_add_type_by_id</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Add a type to a model if the identifier does not exist already. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomptype">Bcomptype</link> * <link linkend="_rwmodel_8cpp_1ad7a03b920e4622a03490ffd7f76449f2">model_add_type_by_filename</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;filename, int num)</para>

<para>Add a type to a model if the type with the given file name does not exist already. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomptype">Bcomptype</link> * <link linkend="_rwmodel_8cpp_1a7bce97c2c063fdd9490630a0cb9af616">model_add_type_by_id_and_filename</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;id, <link linkend="_class_bstring">Bstring</link> &amp;filename, int num)</para>

<para>Add a type to a model if the type with the given id and file name does not exist already. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomptype">Bcomptype</link> * <link linkend="_rwmodel_8cpp_1a7a41f79b27538ef0d8faed31ca6aa1e4">model_get_type</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Return the type corresponding to an identifier. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1af72220661669061c8fa9d6f8f57f7e4a">model_set_type</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;set_type)</para>

<para>Reset the component types. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a5ac06c3b10c435516440ecf67919eab3">model_change_type</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;change_type)</para>

<para>Change a component type name. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1abaea87dd52f4f2a1e53c6e8fad353cb1">model_count_component_types</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Counts the number of components for each type. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a61288be344bc584c235ec833d7feecc7">model_check</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> path)</para>

<para>Checks model properties. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a1fe1400c0e20df3bc7f76821feeb9f9c">model_component_count</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Counts the total number of components. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a16b254cc5d76b79bdcb967f8e5fc761b">model_list_copy</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Copies a model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_rwmodel_8cpp_1a0bf2616fb45e094d7b316edda6574fd1">model_copy</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Copies a model. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1adb6a9138d3db8b8df97e8178ab055653">component_type_copy</link> (<link linkend="_struct_bcomptype">Bcomptype</link> *fromct, <link linkend="_struct_bcomptype">Bcomptype</link> *toct)</para>

<para>Copies all elements from one component to another. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a6837c17ae356c7eed85c529aaa588991">component_copy</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *fromcomp, <link linkend="_struct_bcomponent">Bcomponent</link> *tocomp)</para>

<para>Copies all elements from one component to another. </para>
</listitem>
            <listitem><para>long <link linkend="_rwmodel_8cpp_1a86e46d64bb52844a0e18991b9a8b5d9d">component_count</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *comp)</para>

<para>Counts the total number of components. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomponent">Bcomponent</link> * <link linkend="_rwmodel_8cpp_1a21d0c1146002b3d57a0918b1a80870a9">component_find</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *comp, <link linkend="_class_bstring">Bstring</link> &amp;id)</para>

<para>Finds a component in a component list. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a7f3e5298b2a2bb404d1d2eeb102fd376">link_copy</link> (<link linkend="_struct_blink">Blink</link> *fromlink, <link linkend="_struct_blink">Blink</link> *tolink)</para>

<para>Copies all elements from one link to another. </para>
</listitem>
            <listitem><para><link linkend="_struct_blink">Blink</link> * <link linkend="_rwmodel_8cpp_1ace42ffc673c67674197959117a4ced55">link_find</link> (<link linkend="_struct_blink">Blink</link> *link, <link linkend="_struct_bcomponent">Bcomponent</link> *comp1, <link linkend="_struct_bcomponent">Bcomponent</link> *comp2)</para>

<para>Finds a link in a link list. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1af0b4ad605eb57ff0e0e27b57a36d764d">component_kill</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *comp)</para>

<para>Deallocates memory for one component. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1ac1b9eab88cf92b96392fb308dec6d88b">component_list_kill</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *comp)</para>

<para>Deallocates memory for a list of components. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1aaa8e791654c724b62eca98f30bc4fcbb">comp_type_kill</link> (<link linkend="_struct_bcomptype">Bcomptype</link> *type)</para>

<para>Deallocates memory for one component type. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a10942a7d1017a448cf989936558e6a42">comp_type_list_kill</link> (<link linkend="_struct_bcomptype">Bcomptype</link> *type)</para>

<para>Deallocates memory for a list of component types. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1ad5ab6ec7cf1a8fda3fad924f31d0dbb2">model_link_list_kill</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Deallocates memory for a list of component links. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a4b1b7cb60a9bd9ba79ec834c2b5449f1">link_kill</link> (<link linkend="_struct_blink">Blink</link> **link_list, <link linkend="_struct_bcomponent">Bcomponent</link> *comp, int i)</para>

<para>Deletes a link. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a3454ca3791ba8703b33966c65a05b155">link_kill</link> (<link linkend="_struct_blink">Blink</link> **link_list, <link linkend="_struct_bcomponent">Bcomponent</link> *comp, <link linkend="_struct_bcomponent">Bcomponent</link> *comp2)</para>

<para>Deletes a link. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1aec7736b5460c55fa827de4354d0ae941">poly_list_kill</link> (<link linkend="_struct_bpolygon">Bpolygon</link> *poly)</para>

<para>Deallocates memory for a list of polygons. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a3f6d8a4ff6b4ba32927200c1bbdecc29">comp_associated_links_kill</link> (<link linkend="_struct_bcomponent">Bcomponent</link> *comp, <link linkend="_struct_blink">Blink</link> **link)</para>

<para>Deallocates memory for links associated with a component. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a9a0f6a54310941d6a4d324f497047a96">model_kill</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Deallocates all memory in the list. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a5e9b274dece610530bafb8f23db49be9">model_update_comment</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, int n, char **strings)</para>

<para>Puts a set of strings and time in the comment of a model. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1abff27e4db751640f01bee347386005c6">model_associate</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;associate_type, <link linkend="_class_bstring">Bstring</link> &amp;associate_file)</para>

<para>Associates a model file with a component type. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1af9d7ac5852d7fbbfb0d12847412ffa19">model_associate_mass</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;associate_type, double mass)</para>

<para>Associates a mass with a component type. </para>
</listitem>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a152cdc055aea678009cd5c1d86a3c71f">model_set_comptype_filenames</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;filename)</para>

<para>Sets the filenames of all selected component types to the given string. </para>
</listitem>
            <listitem><para>long <link linkend="_rwmodel_8cpp_1a04d870f86b4ac8aa833d794e4a78d811">model_set_component_radius</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, double comprad)</para>

<para>Set the display radius for all components to a specific value. </para>
</listitem>
            <listitem><para>long <link linkend="_rwmodel_8cpp_1a78627c81db38da1f3be21372af53c63a">model_set_density</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, double density)</para>

<para>Set the density of selected components to a specific value. </para>
</listitem>
            <listitem><para>long <link linkend="_rwmodel_8cpp_1a5313c55fbfd6b3fcc1f48e5b986aaa5c">model_set_fom</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, double fom)</para>

<para>Set the FOM of selected components to a specific value. </para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_rwmodel_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Library routines to read and write atomic model parameters. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20060919 </para>

<para>Modified: 20161004 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_rwmodel_8cpp_1a3f6d8a4ff6b4ba32927200c1bbdecc29"/>    <section>
    <title>comp_associated_links_kill()</title>
<indexterm><primary>comp_associated_links_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>comp_associated_links_kill</secondary></indexterm>
<para><computeroutput>int comp_associated_links_kill (<link linkend="_struct_bcomponent">Bcomponent</link> * comp, <link linkend="_struct_blink">Blink</link> ** link)</computeroutput></para><para>

<para>Deallocates memory for links associated with a component. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>associated componet. </para>
</entry>
                            </row>
                            <row>
                                <entry>**link</entry>
                                <entry>
<para>pointer to component link list. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of component links deallocated. </para>
</formalpara>
</para>
<para>
Definition at line 1092 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1aaa8e791654c724b62eca98f30bc4fcbb"/>    <section>
    <title>comp_type_kill()</title>
<indexterm><primary>comp_type_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>comp_type_kill</secondary></indexterm>
<para><computeroutput>int comp_type_kill (<link linkend="_struct_bcomptype">Bcomptype</link> * type)</computeroutput></para><para>

<para>Deallocates memory for one component type. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*type</entry>
                                <entry>
<para>component type. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 912 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a10942a7d1017a448cf989936558e6a42"/>    <section>
    <title>comp_type_list_kill()</title>
<indexterm><primary>comp_type_list_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>comp_type_list_kill</secondary></indexterm>
<para><computeroutput>int comp_type_list_kill (<link linkend="_struct_bcomptype">Bcomptype</link> * type)</computeroutput></para><para>

<para>Deallocates memory for a list of component types. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*type</entry>
                                <entry>
<para>component type list. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int total number of component types. </para>
</formalpara>
</para>
<para>
Definition at line 926 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a0b2efc5e8ffb10993a1a737c9d977d68"/>    <section>
    <title>component_add()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>component_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomponent">Bcomponent</link>* component_add (<link linkend="_struct_bcomponent">Bcomponent</link> ** comp, <link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Adds a component to a linked list. </para>
</para>

<para><literallayout><computeroutput>The function allocates memory for a new component structure.
If the content of the pointer is null, the new structure is
the first in the list. Otherwise, the end of the list is found
and the new structure added to it.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>**comp</entry>
                                <entry>
<para>component list. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>component identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para><link linkend="_struct_bcomponent">Bcomponent</link> new component. </para>
</formalpara>
</para>
<para>
Definition at line 267 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a799a4aa9533a6782ee661f5ae53b56de"/>    <section>
    <title>component_add()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>component_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomponent">Bcomponent</link>* component_add (<link linkend="_struct_bcomponent">Bcomponent</link> ** comp, unsigned long number)</computeroutput></para><para>
Definition at line 294 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a6837c17ae356c7eed85c529aaa588991"/>    <section>
    <title>component_copy()</title>
<indexterm><primary>component_copy</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_copy</secondary></indexterm>
<para><computeroutput>int component_copy (<link linkend="_struct_bcomponent">Bcomponent</link> * fromcomp, <link linkend="_struct_bcomponent">Bcomponent</link> * tocomp)</computeroutput></para><para>

<para>Copies all elements from one component to another. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*fromcomp</entry>
                                <entry>
<para>source component. </para>
</entry>
                            </row>
                            <row>
                                <entry>*tocomp</entry>
                                <entry>
<para>destination component. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 783 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a86e46d64bb52844a0e18991b9a8b5d9d"/>    <section>
    <title>component_count()</title>
<indexterm><primary>component_count</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_count</secondary></indexterm>
<para><computeroutput>long component_count (<link linkend="_struct_bcomponent">Bcomponent</link> * comp)</computeroutput></para><para>

<para>Counts the total number of components. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>component list. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components. </para>
</formalpara>
</para>
<para>
Definition at line 805 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a21d0c1146002b3d57a0918b1a80870a9"/>    <section>
    <title>component_find()</title>
<indexterm><primary>component_find</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_find</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomponent">Bcomponent</link>* component_find (<link linkend="_struct_bcomponent">Bcomponent</link> * comp, <link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Finds a component in a component list. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>starting component. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>component identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomponent* component found, NULL otherwise. </para>
</formalpara>
</para>
<para>
Definition at line 822 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1af0b4ad605eb57ff0e0e27b57a36d764d"/>    <section>
    <title>component_kill()</title>
<indexterm><primary>component_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_kill</secondary></indexterm>
<para><computeroutput>int component_kill (<link linkend="_struct_bcomponent">Bcomponent</link> * comp)</computeroutput></para><para>

<para>Deallocates memory for one component. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>component. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 877 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ac1b9eab88cf92b96392fb308dec6d88b"/>    <section>
    <title>component_list_kill()</title>
<indexterm><primary>component_list_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_list_kill</secondary></indexterm>
<para><computeroutput>int component_list_kill (<link linkend="_struct_bcomponent">Bcomponent</link> * comp)</computeroutput></para><para>

<para>Deallocates memory for a list of components. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>component list. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int total number of components. </para>
</formalpara>
</para>
<para>
Definition at line 891 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a0a89638b7b36d7d24b91da464011a5b9"/>    <section>
    <title>component_type_add()</title>
<indexterm><primary>component_type_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_type_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomptype">Bcomptype</link>* component_type_add (<link linkend="_struct_bcomptype">Bcomptype</link> ** type, <link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Adds a component type to a linked list. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>**type</entry>
                                <entry>
<para>component type list. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>component type identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomptype* new component type. <literallayout><computeroutput>The function allocates memory for a new component type structure.
If the content of the pointer is null, the new structure is
the first in the list. Otherwise, the end of the list is found
and the new structure added to it.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 230 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1adb6a9138d3db8b8df97e8178ab055653"/>    <section>
    <title>component_type_copy()</title>
<indexterm><primary>component_type_copy</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>component_type_copy</secondary></indexterm>
<para><computeroutput>int component_type_copy (<link linkend="_struct_bcomptype">Bcomptype</link> * fromct, <link linkend="_struct_bcomptype">Bcomptype</link> * toct)</computeroutput></para><para>

<para>Copies all elements from one component to another. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*fromct</entry>
                                <entry>
<para>source component. </para>
</entry>
                            </row>
                            <row>
                                <entry>*toct</entry>
                                <entry>
<para>destination component. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 763 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1afe6df6a836d297d3ffce4b764f2f2602"/>    <section>
    <title>link_add()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>link_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_blink">Blink</link>* link_add (<link linkend="_struct_blink">Blink</link> ** link, <link linkend="_struct_bcomponent">Bcomponent</link> * comp1, <link linkend="_struct_bcomponent">Bcomponent</link> * comp2, double length, double radius)</computeroutput></para><para>

<para>Adds a component link to a linked list. </para>
</para>

<para><literallayout><computeroutput>The function allocates memory for a new link structure.
If the content of the pointer is null, the new structure is
the first in the list. Otherwise, the end of the list is found
and the new structure added to it.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>**link</entry>
                                <entry>
<para>component link list. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp1</entry>
                                <entry>
<para>first component. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp2</entry>
                                <entry>
<para>second component. </para>
</entry>
                            </row>
                            <row>
                                <entry>length</entry>
                                <entry>
<para>length of link. </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>display radius. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para><link linkend="_struct_bcomponent">Bcomponent</link> new component. </para>
</formalpara>
</para>
<para>
Definition at line 315 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ac943dc851eee280900ec851471d1b716"/>    <section>
    <title>link_add()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>link_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_blink">Blink</link>* link_add (<link linkend="_struct_blink">Blink</link> ** link, <link linkend="_struct_bcomponent">Bcomponent</link> * comp1, <link linkend="_struct_bcomponent">Bcomponent</link> * comp2)</computeroutput></para><para>
Definition at line 363 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a7f3e5298b2a2bb404d1d2eeb102fd376"/>    <section>
    <title>link_copy()</title>
<indexterm><primary>link_copy</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_copy</secondary></indexterm>
<para><computeroutput>int link_copy (<link linkend="_struct_blink">Blink</link> * fromlink, <link linkend="_struct_blink">Blink</link> * tolink)</computeroutput></para><para>

<para>Copies all elements from one link to another. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*fromlink</entry>
                                <entry>
<para>source link. </para>
</entry>
                            </row>
                            <row>
                                <entry>*tolink</entry>
                                <entry>
<para>destination link. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 836 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ace42ffc673c67674197959117a4ced55"/>    <section>
    <title>link_find()</title>
<indexterm><primary>link_find</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_find</secondary></indexterm>
<para><computeroutput><link linkend="_struct_blink">Blink</link>* link_find (<link linkend="_struct_blink">Blink</link> * link, <link linkend="_struct_bcomponent">Bcomponent</link> * comp1, <link linkend="_struct_bcomponent">Bcomponent</link> * comp2)</computeroutput></para><para>

<para>Finds a link in a link list. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*link</entry>
                                <entry>
<para>starting link. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp1</entry>
                                <entry>
<para>one component. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp2</entry>
                                <entry>
<para>other component. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Blink* link found, NULL otherwise. </para>
</formalpara>
</para>
<para>
Definition at line 857 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1af1f95f6710cf59add3b24975eede58cb"/>    <section>
    <title>link_index()</title>
<indexterm><primary>link_index</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_index</secondary></indexterm>
<para><computeroutput>int link_index (<link linkend="_struct_bcomponent">Bcomponent</link> * comp, <link linkend="_struct_bcomponent">Bcomponent</link> * comp2)</computeroutput></para><para>

<para>Returns the index of a linked component. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>component with list of linked components to be searched. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp2</entry>
                                <entry>
<para>component to search for. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int link index, -1 if not found. <literallayout><computeroutput>If the second component is not found in the list of linked components,
a -1 is returned.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 378 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a4b1b7cb60a9bd9ba79ec834c2b5449f1"/>    <section>
    <title>link_kill()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>link_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_kill</secondary></indexterm>
<para><computeroutput>int link_kill (<link linkend="_struct_blink">Blink</link> ** link_list, <link linkend="_struct_bcomponent">Bcomponent</link> * comp, int i)</computeroutput></para><para>

<para>Deletes a link. </para>
</para>

<para><literallayout><computeroutput>The link in the model link list is removed.
The associated references to the link in the component link arrays
are removed and the link arrays reorganized.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>**link_list</entry>
                                <entry>
<para>pointer to list of links. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>one component in the link. </para>
</entry>
                            </row>
                            <row>
                                <entry>i</entry>
                                <entry>
<para>index for second component in link array of first component. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bdistmat* new distance matrix structure. </para>
</formalpara>
</para>
<para>
Definition at line 988 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a3454ca3791ba8703b33966c65a05b155"/>    <section>
    <title>link_kill()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>link_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>link_kill</secondary></indexterm>
<para><computeroutput>int link_kill (<link linkend="_struct_blink">Blink</link> ** link_list, <link linkend="_struct_bcomponent">Bcomponent</link> * comp, <link linkend="_struct_bcomponent">Bcomponent</link> * comp2)</computeroutput></para><para>

<para>Deletes a link. </para>
</para>

<para><literallayout><computeroutput>The link in the model link list is removed.
The associated references to the link in the component link arrays
are removed and the link arrays reorganized.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>**link_list</entry>
                                <entry>
<para>pointer to list of links. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp</entry>
                                <entry>
<para>one component in the link. </para>
</entry>
                            </row>
                            <row>
                                <entry>*comp2</entry>
                                <entry>
<para>second component in the link. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bdistmat* new distance matrix structure. </para>
</formalpara>
</para>
<para>
Definition at line 1051 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a5cce379cd4ad0c8560e0ed69baa09203"/>    <section>
    <title>model_add()<computeroutput>[1/3]</computeroutput></title>
<indexterm><primary>model_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_add (<link linkend="_struct_bmodel">Bmodel</link> ** model, <link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Adds a model to a linked list. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>**model</entry>
                                <entry>
<para>model list. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>model identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>The function allocates memory for a new model structure.
If the content of the pointer is null, the new structure is
the first in the list. Otherwise, the end of the list is found
and the new structure added to it.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 178 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a42c833c02b04c330313cc5c8660291d0"/>    <section>
    <title>model_add()<computeroutput>[2/3]</computeroutput></title>
<indexterm><primary>model_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_add (<link linkend="_struct_bmodel">Bmodel</link> ** model, const char * cid)</computeroutput></para><para>
Definition at line 196 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ae237a2d60ca6c6b03431011b33421640"/>    <section>
    <title>model_add()<computeroutput>[3/3]</computeroutput></title>
<indexterm><primary>model_add</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_add (<link linkend="_struct_bmodel">Bmodel</link> ** model, <link linkend="_struct_bmodel">Bmodel</link> * model_nu)</computeroutput></para><para>
Definition at line 205 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ad7a03b920e4622a03490ffd7f76449f2"/>    <section>
    <title>model_add_type_by_filename()</title>
<indexterm><primary>model_add_type_by_filename</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_add_type_by_filename</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomptype">Bcomptype</link>* model_add_type_by_filename (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; filename, int num)</computeroutput></para><para>

<para>Add a type to a model if the type with the given file name does not exist already. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;filename</entry>
                                <entry>
<para>model file to check for and add. </para>
</entry>
                            </row>
                            <row>
                                <entry>num</entry>
                                <entry>
<para>model number within file. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomptype* type identifier. </para>
</formalpara>
</para>
<para>
Definition at line 434 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ae96dc13b92b119a3877c00dda7fef2fa"/>    <section>
    <title>model_add_type_by_id()</title>
<indexterm><primary>model_add_type_by_id</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_add_type_by_id</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomptype">Bcomptype</link>* model_add_type_by_id (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Add a type to a model if the identifier does not exist already. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>component type identifier to check for and add. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomptype* type identifier. </para>
</formalpara>
</para>
<para>
Definition at line 411 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a7bce97c2c063fdd9490630a0cb9af616"/>    <section>
    <title>model_add_type_by_id_and_filename()</title>
<indexterm><primary>model_add_type_by_id_and_filename</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_add_type_by_id_and_filename</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomptype">Bcomptype</link>* model_add_type_by_id_and_filename (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; id, <link linkend="_class_bstring">Bstring</link> &amp; filename, int num)</computeroutput></para><para>

<para>Add a type to a model if the type with the given id and file name does not exist already. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>component type identifier to check for and add. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;filename</entry>
                                <entry>
<para>model file to check for and add. </para>
</entry>
                            </row>
                            <row>
                                <entry>num</entry>
                                <entry>
<para>model number within file. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomptype* type identifier. </para>
</formalpara>
</para>
<para>
Definition at line 465 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1abff27e4db751640f01bee347386005c6"/>    <section>
    <title>model_associate()</title>
<indexterm><primary>model_associate</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_associate</secondary></indexterm>
<para><computeroutput>int model_associate (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; associate_type, <link linkend="_class_bstring">Bstring</link> &amp; associate_file)</computeroutput></para><para>

<para>Associates a model file with a component type. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>the model. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;associate_type</entry>
                                <entry>
<para>component type. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;associate_file</entry>
                                <entry>
<para>component file name. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of types associated. <literallayout><computeroutput>Model files can be coordinates or maps.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1177 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1af9d7ac5852d7fbbfb0d12847412ffa19"/>    <section>
    <title>model_associate_mass()</title>
<indexterm><primary>model_associate_mass</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_associate_mass</secondary></indexterm>
<para><computeroutput>int model_associate_mass (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; associate_type, double mass)</computeroutput></para><para>

<para>Associates a mass with a component type. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model list. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;associate_type</entry>
                                <entry>
<para>component type. </para>
</entry>
                            </row>
                            <row>
                                <entry>mass</entry>
                                <entry>
<para>component type mass. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of types associated. </para>
</formalpara>
</para>
<para>
Definition at line 1207 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a5ac06c3b10c435516440ecf67919eab3"/>    <section>
    <title>model_change_type()</title>
<indexterm><primary>model_change_type</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_change_type</secondary></indexterm>
<para><computeroutput>int model_change_type (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; change_type)</computeroutput></para><para>

<para>Change a component type name. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;change_type</entry>
                                <entry>
<para>component type. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of models. <literallayout><computeroutput>Sets all the component types to the given string.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 545 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a61288be344bc584c235ec833d7feecc7"/>    <section>
    <title>model_check()</title>
<indexterm><primary>model_check</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_check</secondary></indexterm>
<para><computeroutput>int model_check (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> path)</computeroutput></para><para>

<para>Checks model properties. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                            <row>
                                <entry>path</entry>
                                <entry>
<para>search path to find map files. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 592 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a1fe1400c0e20df3bc7f76821feeb9f9c"/>    <section>
    <title>model_component_count()</title>
<indexterm><primary>model_component_count</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_component_count</secondary></indexterm>
<para><computeroutput>int model_component_count (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Counts the total number of components. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 635 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a0bf2616fb45e094d7b316edda6574fd1"/>    <section>
    <title>model_copy()</title>
<indexterm><primary>model_copy</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_copy</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_copy (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Copies a model. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* model copy. <literallayout><computeroutput>Copies only the first model in the list.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 685 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1abaea87dd52f4f2a1e53c6e8fad353cb1"/>    <section>
    <title>model_count_component_types()</title>
<indexterm><primary>model_count_component_types</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_count_component_types</secondary></indexterm>
<para><computeroutput>int model_count_component_types (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Counts the number of components for each type. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 568 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a7a41f79b27538ef0d8faed31ca6aa1e4"/>    <section>
    <title>model_get_type()</title>
<indexterm><primary>model_get_type</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_get_type</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomptype">Bcomptype</link>* model_get_type (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Return the type corresponding to an identifier. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>component identifier to check for and add. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomptype* component type. </para>
</formalpara>
</para>
<para>
Definition at line 491 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a76c34f193ba01f5059630078549335b1"/>    <section>
    <title>model_init()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>model_init</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_init</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_init (<link linkend="_class_bstring">Bstring</link> &amp; id)</computeroutput></para><para>

<para>Initializes a model structure. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>model identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model structure. </para>
</formalpara>
</para>
<para>
Definition at line 144 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a75967edab7f868e18c46f8dfc0270354"/>    <section>
    <title>model_init()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>model_init</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_init</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_init (const char * cid)</computeroutput></para><para>
Definition at line 157 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a9a0f6a54310941d6a4d324f497047a96"/>    <section>
    <title>model_kill()</title>
<indexterm><primary>model_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_kill</secondary></indexterm>
<para><computeroutput>int model_kill (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Deallocates all memory in the list. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 1124 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ad5ab6ec7cf1a8fda3fad924f31d0dbb2"/>    <section>
    <title>model_link_list_kill()</title>
<indexterm><primary>model_link_list_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_link_list_kill</secondary></indexterm>
<para><computeroutput>int model_link_list_kill (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Deallocates memory for a list of component links. </para>
</para>

<para><literallayout><computeroutput>Only the first model in the list is processed.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int total number of component links. </para>
</formalpara>
</para>
<para>
Definition at line 950 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a16b254cc5d76b79bdcb967f8e5fc761b"/>    <section>
    <title>model_list_copy()</title>
<indexterm><primary>model_list_copy</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_list_copy</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_list_copy (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Copies a model. </para>
</para>

<para><literallayout><computeroutput>Copies all the models in a list.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* model copy. </para>
</formalpara>
</para>
<para>
Definition at line 657 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a04d870f86b4ac8aa833d794e4a78d811"/>    <section>
    <title>model_set_component_radius()</title>
<indexterm><primary>model_set_component_radius</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_set_component_radius</secondary></indexterm>
<para><computeroutput>long model_set_component_radius (<link linkend="_struct_bmodel">Bmodel</link> * model, double comprad)</computeroutput></para><para>

<para>Set the display radius for all components to a specific value. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>comprad</entry>
                                <entry>
<para>component display radius. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components selected. </para>
</formalpara>
</para>
<para>
Definition at line 1264 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a152cdc055aea678009cd5c1d86a3c71f"/>    <section>
    <title>model_set_comptype_filenames()</title>
<indexterm><primary>model_set_comptype_filenames</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_set_comptype_filenames</secondary></indexterm>
<para><computeroutput>int model_set_comptype_filenames (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; filename)</computeroutput></para><para>

<para>Sets the filenames of all selected component types to the given string. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;filename</entry>
                                <entry>
<para>component file name. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of component types set. <literallayout><computeroutput>The image numbers are sequentially set as well.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1239 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a78627c81db38da1f3be21372af53c63a"/>    <section>
    <title>model_set_density()</title>
<indexterm><primary>model_set_density</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_set_density</secondary></indexterm>
<para><computeroutput>long model_set_density (<link linkend="_struct_bmodel">Bmodel</link> * model, double density)</computeroutput></para><para>

<para>Set the density of selected components to a specific value. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>density</entry>
                                <entry>
<para>new density value. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components selected. </para>
</formalpara>
</para>
<para>
Definition at line 1285 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a5313c55fbfd6b3fcc1f48e5b986aaa5c"/>    <section>
    <title>model_set_fom()</title>
<indexterm><primary>model_set_fom</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_set_fom</secondary></indexterm>
<para><computeroutput>long model_set_fom (<link linkend="_struct_bmodel">Bmodel</link> * model, double fom)</computeroutput></para><para>

<para>Set the FOM of selected components to a specific value. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>fom</entry>
                                <entry>
<para>new FOM value. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components selected. </para>
</formalpara>
</para>
<para>
Definition at line 1306 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a64338597cab826cf0f8201ee81336cd2"/>    <section>
    <title>model_set_map_filenames()</title>
<indexterm><primary>model_set_map_filenames</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_set_map_filenames</secondary></indexterm>
<para><computeroutput>int model_set_map_filenames (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; mapfile)</computeroutput></para><para>

<para>Sets all the map file names of selected models. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;mapfile</entry>
                                <entry>
<para>map file name. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 395 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1af72220661669061c8fa9d6f8f57f7e4a"/>    <section>
    <title>model_set_type()</title>
<indexterm><primary>model_set_type</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_set_type</secondary></indexterm>
<para><computeroutput>int model_set_type (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; set_type)</computeroutput></para><para>

<para>Reset the component types. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;set_type</entry>
                                <entry>
<para>component type. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of models. <literallayout><computeroutput>Sets all the component types to the given string.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 516 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a5e9b274dece610530bafb8f23db49be9"/>    <section>
    <title>model_update_comment()</title>
<indexterm><primary>model_update_comment</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>model_update_comment</secondary></indexterm>
<para><computeroutput>int model_update_comment (<link linkend="_struct_bmodel">Bmodel</link> * model, int n, char ** strings)</computeroutput></para><para>

<para>Puts a set of strings and time in the comment of a model. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>the model. </para>
</entry>
                            </row>
                            <row>
                                <entry>n</entry>
                                <entry>
<para>the number of strings. </para>
</entry>
                            </row>
                            <row>
                                <entry>**strings</entry>
                                <entry>
<para>an array of strings. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int string length of the new comment. <literallayout><computeroutput>This is designed to pack the command line into a string followed by
a second string for the time.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1158 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1aec7736b5460c55fa827de4354d0ae941"/>    <section>
    <title>poly_list_kill()</title>
<indexterm><primary>poly_list_kill</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>poly_list_kill</secondary></indexterm>
<para><computeroutput>int poly_list_kill (<link linkend="_struct_bpolygon">Bpolygon</link> * poly)</computeroutput></para><para>

<para>Deallocates memory for a list of polygons. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*poly</entry>
                                <entry>
<para>polygon list. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int total number of polygons. </para>
</formalpara>
</para>
<para>
Definition at line 1070 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1ac97c50e35b1960b3762ede04e556ce06"/>    <section>
    <title>read_model()<computeroutput>[1/4]</computeroutput></title>
<indexterm><primary>read_model</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>read_model</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* read_model (<link linkend="_class_bstring">Bstring</link> &amp; filename)</computeroutput></para><para>
Definition at line 28 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a810dfb4b907a049b3f2b0baa48b147c1"/>    <section>
    <title>read_model()<computeroutput>[2/4]</computeroutput></title>
<indexterm><primary>read_model</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>read_model</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* read_model (<link linkend="_class_bstring">Bstring</link> * file_list)</computeroutput></para><para>
Definition at line 33 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a08007ca443b95429702f48f61dd6ccbe"/>    <section>
    <title>read_model()<computeroutput>[3/4]</computeroutput></title>
<indexterm><primary>read_model</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>read_model</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* read_model (<link linkend="_class_bstring">Bstring</link> &amp; filename, <link linkend="_class_bstring">Bstring</link> &amp; paramfile)</computeroutput></para><para>
Definition at line 39 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1aaa3d7b9d5570d45b6bccb5ba1b84a20f"/>    <section>
    <title>read_model()<computeroutput>[4/4]</computeroutput></title>
<indexterm><primary>read_model</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>read_model</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* read_model (<link linkend="_class_bstring">Bstring</link> * file_list, <link linkend="_class_bstring">Bstring</link> &amp; paramfile)</computeroutput></para><para>

<para>Reads model parameters. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*file_list</entry>
                                <entry>
<para>list of model parameter file names. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;paramfile</entry>
                                <entry>
<para>parameter file. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* model parameters. </para>
</formalpara>
</para>
<para>
Definition at line 50 of file rwmodel.cpp.</para>
    </section><anchor xml:id="_rwmodel_8cpp_1a041127357e33849f55d16a7e9239f3ac"/>    <section>
    <title>write_model()</title>
<indexterm><primary>write_model</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>write_model</secondary></indexterm>
<para><computeroutput>int write_model (<link linkend="_class_bstring">Bstring</link> &amp; filename, <link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Writes model parameters. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;filename</entry>
                                <entry>
<para>model parameter file name. </para>
</entry>
                            </row>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of models. </para>
</formalpara>
</para>
<para>
Definition at line 91 of file rwmodel.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_rwmodel_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>rwmodel.cpp</secondary></indexterm>
<indexterm><primary>rwmodel.cpp</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
