aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/georges__loader_8cpp-source.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/georges__loader_8cpp-source.html')
-rw-r--r--docs/doxygen/nel/georges__loader_8cpp-source.html405
1 files changed, 405 insertions, 0 deletions
diff --git a/docs/doxygen/nel/georges__loader_8cpp-source.html b/docs/doxygen/nel/georges__loader_8cpp-source.html
new file mode 100644
index 00000000..46a04b4b
--- /dev/null
+++ b/docs/doxygen/nel/georges__loader_8cpp-source.html
@@ -0,0 +1,405 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+ <TITLE>nevrax.org : docs</TITLE>
+ <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
+
+<!-- uplinks -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ </TR>
+</TABLE>
+
+<!-- banner Nevrax -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
+ <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
+</TABLE>
+
+<!-- main table -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+ <!------ Begin Box ------>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
+ <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
+ <TABLE cellspacing=0 cellpadding=1 border=0>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr>
+ </TABLE>
+ </TD></TR></TABLE></TD></TR></TABLE>
+ <!------ End Box ------>
+
+ </TD>
+ <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+<!-- title -->
+<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
+<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
+</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
+</td></tr></table>
+&nbsp;
+
+<!-- block -->
+<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD>
+ <TD><B>Documentation</B></TD>
+ <TD ALIGN=RIGHT>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.14 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
+<hr><h1>georges_loader.cpp</h1><a href="georges__loader_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
+00008 <font class="comment"> *</font>
+00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
+00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
+00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
+00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
+00013 <font class="comment"> * any later version.</font>
+00014 <font class="comment"></font>
+00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
+00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
+00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
+00018 <font class="comment"> * General Public License for more details.</font>
+00019 <font class="comment"></font>
+00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
+00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
+00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
+00023 <font class="comment"> * MA 02111-1307, USA.</font>
+00024 <font class="comment"> */</font>
+00025
+00026 <font class="preprocessor">#include "<a class="code" href="stdgeorges_8h.html">stdgeorges.h</a>"</font>
+00027 <font class="preprocessor">#include "<a class="code" href="georges__loader_8h.html">nel/georges/georges_loader.h</a>"</font>
+00028
+00029 <font class="preprocessor">#include "<a class="code" href="path_8h.html">nel/misc/path.h</a>"</font>
+00030 <font class="preprocessor">#include "<a class="code" href="form__body__elt__atom_8h.html">nel/georges/form_body_elt_atom.h</a>"</font>
+00031 <font class="preprocessor">#include "<a class="code" href="form__body__elt__struct_8h.html">nel/georges/form_body_elt_struct.h</a>"</font>
+00032 <font class="preprocessor">#include "<a class="code" href="form__body__elt__list_8h.html">nel/georges/form_body_elt_list.h</a>"</font>
+00033 <font class="preprocessor">#include "<a class="code" href="mold__elt__type_8h.html">nel/georges/mold_elt_type.h</a>"</font>
+00034
+00035 <font class="keyword">namespace </font>NLGEORGES
+00036 {
+00037
+00039 <font class="comment">// Construction/Destruction</font>
+00041 <font class="comment"></font>
+<a name="l00042"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#r0">00042</a> <font class="keywordtype">bool</font> CLoader::_Initialized = <font class="keyword">false</font>;
+00043
+<a name="l00044"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a0">00044</a> CLoader::CLoader()
+00045 {
+00046 <a class="code" href="classNLGEORGES_1_1CLoader.html#n1">ml</a>.SetLoader( <font class="keyword">this</font> );
+00047 <font class="keywordflow">if</font> (!CLoader::_Initialized)
+00048 {
+00049 <a class="code" href="classNLMISC_1_1IClassable.html">NLMISC::IClassable</a> *p = <a class="code" href="classNLMISC_1_1CClassRegistry.html#d1">NLMISC::CClassRegistry::create</a>(<font class="stringliteral">"CFormBodyElt"</font>);
+00050 <font class="keywordflow">if</font>(p == NULL)
+00051 {
+00052 <a class="code" href="class__registry_8h.html#a1">NLMISC_REGISTER_CLASS</a> (CFormBodyElt);
+00053 }
+00054 <font class="keywordflow">else</font>
+00055 <font class="keyword">delete</font> p;
+00056 p = <a class="code" href="classNLMISC_1_1CClassRegistry.html#d1">NLMISC::CClassRegistry::create</a>(<font class="stringliteral">"CFormBodyEltAtom"</font>);
+00057 <font class="keywordflow">if</font>(p == NULL)
+00058 {
+00059 <a class="code" href="class__registry_8h.html#a1">NLMISC_REGISTER_CLASS</a> (CFormBodyEltAtom);
+00060 }
+00061 <font class="keywordflow">else</font>
+00062 <font class="keyword">delete</font> p;
+00063 p = <a class="code" href="classNLMISC_1_1CClassRegistry.html#d1">NLMISC::CClassRegistry::create</a>(<font class="stringliteral">"CFormBodyEltList"</font>);
+00064 <font class="keywordflow">if</font>(p == NULL)
+00065 {
+00066 <a class="code" href="class__registry_8h.html#a1">NLMISC_REGISTER_CLASS</a> (CFormBodyEltList);
+00067 }
+00068 <font class="keywordflow">else</font>
+00069 <font class="keyword">delete</font> p;
+00070 p = <a class="code" href="classNLMISC_1_1CClassRegistry.html#d1">NLMISC::CClassRegistry::create</a>(<font class="stringliteral">"CFormBodyEltStruct"</font>);
+00071 <font class="keywordflow">if</font>(p == NULL)
+00072 {
+00073 <a class="code" href="class__registry_8h.html#a1">NLMISC_REGISTER_CLASS</a> (CFormBodyEltStruct);
+00074 }
+00075 <font class="keywordflow">else</font>
+00076 <font class="keyword">delete</font> p;
+00077 CLoader::_Initialized = <font class="keyword">true</font>;
+00078 }
+00079 }
+00080
+<a name="l00081"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a1">00081</a> CLoader::~CLoader()
+00082 {
+00083 }
+00084
+<a name="l00085"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a2">00085</a> <font class="keywordtype">void</font> CLoader::LoadForm( CForm&amp; _f, <font class="keyword">const</font> CStringEx&amp; _sxfullname )
+00086 {
+00087 <a class="code" href="classNLGEORGES_1_1CLoader.html#n0">fl</a>.LoadForm( _f, _sxfullname );
+00088 }
+00089
+<a name="l00090"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a3">00090</a> <font class="keywordtype">void</font> CLoader::LoadForm( CForm&amp; _f, <font class="keyword">const</font> CStringEx&amp; _sxfullname, <font class="keyword">const</font> CStringEx&amp; _sxdate )
+00091 {
+00092 <a class="code" href="classNLGEORGES_1_1CLoader.html#n0">fl</a>.LoadForm( _f, _sxfullname, _sxdate );
+00093 }
+00094
+<a name="l00095"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a4">00095</a> <font class="keywordtype">void</font> CLoader::LoadSearchForm( CForm&amp; _f, <font class="keyword">const</font> CStringEx&amp; _sxfilename )
+00096 {
+00097 <a class="code" href="classNLGEORGES_1_1CLoader.html#n0">fl</a>.LoadForm( _f, <a class="code" href="classNLGEORGES_1_1CLoader.html#a10">WhereIsForm</a>( _sxfilename ) );
+00098 }
+00099
+<a name="l00100"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a5">00100</a> <font class="keywordtype">void</font> CLoader::LoadSearchForm( CForm&amp; _f, <font class="keyword">const</font> CStringEx&amp; _sxfilename, <font class="keyword">const</font> CStringEx&amp; _sxdate )
+00101 {
+00102 <a class="code" href="classNLGEORGES_1_1CLoader.html#n0">fl</a>.LoadForm( _f, <a class="code" href="classNLGEORGES_1_1CLoader.html#a10">WhereIsForm</a>( _sxfilename ), _sxdate );
+00103 }
+00104
+<a name="l00105"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a6">00105</a> <font class="keywordtype">void</font> CLoader::SaveForm( CForm&amp; _f, <font class="keyword">const</font> CStringEx&amp; _sxfullname )
+00106 {
+00107 <a class="code" href="classNLGEORGES_1_1CLoader.html#n0">fl</a>.SaveForm( _f, _sxfullname );
+00108 }
+00109
+<a name="l00110"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a7">00110</a> CMoldElt* CLoader::LoadMold( <font class="keyword">const</font> CStringEx &amp;_sxfilename )
+00111 {
+00112 <font class="keywordflow">return</font>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n1">ml</a>.LoadMold( _sxfilename ) );
+00113 }
+00114
+<a name="l00115"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a8">00115</a> CMoldElt* CLoader::LoadMold( <font class="keyword">const</font> CStringEx &amp;_sxfilename, <font class="keyword">const</font> CStringEx &amp;_sxdate )
+00116 {
+00117 <font class="keywordflow">return</font>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n1">ml</a>.LoadMold( _sxfilename, _sxdate ) );
+00118 }
+00119
+<a name="l00120"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a13">00120</a> <font class="keywordtype">void</font> CLoader::SetWorkDirectory( <font class="keyword">const</font> CStringEx &amp;_sxworkdirectory )
+00121 {
+00122 <font class="keywordflow">if</font>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n2">sxworkdirectory</a> != _sxworkdirectory )
+00123 {
+00124 <a class="code" href="classNLGEORGES_1_1CLoader.html#n2">sxworkdirectory</a> = _sxworkdirectory;
+00125 <a class="code" href="classNLMISC_1_1CPath.html#d5">NLMISC::CPath::removeAllAlternativeSearchPath</a>();
+00126 <a class="code" href="classNLMISC_1_1CPath.html#d0">NLMISC::CPath::addSearchPath</a>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n2">sxworkdirectory</a>, <font class="keyword">true</font>, <font class="keyword">true</font> );
+00127 <a class="code" href="classNLMISC_1_1CPath.html#d0">NLMISC::CPath::addSearchPath</a>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n3">sxrootdirectory</a>, <font class="keyword">true</font>, <font class="keyword">true</font> );
+00128 }
+00129 }
+00130
+<a name="l00131"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a14">00131</a> <font class="keywordtype">void</font> CLoader::SetRootDirectory( <font class="keyword">const</font> CStringEx &amp;_sxrootdirectory )
+00132 {
+00133 <font class="keywordflow">if</font>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n3">sxrootdirectory</a> != _sxrootdirectory )
+00134 {
+00135 <a class="code" href="classNLGEORGES_1_1CLoader.html#n3">sxrootdirectory</a> = _sxrootdirectory;
+00136 <a class="code" href="classNLMISC_1_1CPath.html#d5">NLMISC::CPath::removeAllAlternativeSearchPath</a>();
+00137 <a class="code" href="classNLMISC_1_1CPath.html#d0">NLMISC::CPath::addSearchPath</a>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n2">sxworkdirectory</a>, <font class="keyword">true</font>, <font class="keyword">true</font> );
+00138 <a class="code" href="classNLMISC_1_1CPath.html#d0">NLMISC::CPath::addSearchPath</a>( <a class="code" href="classNLGEORGES_1_1CLoader.html#n3">sxrootdirectory</a>, <font class="keyword">true</font>, <font class="keyword">true</font> );
+00139 }
+00140 }
+00141
+<a name="l00142"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a11">00142</a> CStringEx CLoader::GetWorkDirectory()<font class="keyword"> const</font>
+00143 <font class="keyword"></font>{
+00144 <font class="keywordflow">return</font>( sxworkdirectory );
+00145 }
+00146
+<a name="l00147"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a12">00147</a> CStringEx CLoader::GetRootDirectory()<font class="keyword"> const</font>
+00148 <font class="keyword"></font>{
+00149 <font class="keywordflow">return</font>( sxrootdirectory );
+00150 }
+00151
+<a name="l00152"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a9">00152</a> CStringEx CLoader::WhereIsDfnTyp( <font class="keyword">const</font> CStringEx &amp;_sxfilename )
+00153 {
+00154 <font class="keywordflow">return</font>( <a class="code" href="classNLMISC_1_1CPath.html#d6">NLMISC::CPath::lookup</a>( _sxfilename, <font class="keyword">false</font> ) );
+00155 }
+00156
+<a name="l00157"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a10">00157</a> CStringEx CLoader::WhereIsForm( <font class="keyword">const</font> CStringEx &amp;_sxfilename )
+00158 {
+00159 <font class="keywordflow">return</font>( <a class="code" href="classNLMISC_1_1CPath.html#d6">NLMISC::CPath::lookup</a>( _sxfilename, <font class="keyword">false</font> ) );
+00160 }
+00161
+<a name="l00162"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a16">00162</a> <font class="keywordtype">void</font> CLoader::MakeDfn( <font class="keyword">const</font> CStringEx &amp;_sxfullname, <font class="keyword">const</font> std::vector&lt; std::pair&lt; CStringEx, CStringEx &gt; &gt;* <font class="keyword">const</font> _pvdefine )
+00163 {
+00164 CFormFile pff;
+00165 CForm f;
+00166
+00167 CFormBodyEltStruct* pbody = f.GetBody();
+00168 CFormBodyEltAtom* pfbea;
+00169
+00170 <font class="keywordflow">if</font>( ( _pvdefine )&amp;&amp;( !_pvdefine-&gt;empty() ) )
+00171 <font class="keywordflow">for</font>( std::vector&lt; std::pair&lt; CStringEx, CStringEx &gt; &gt;::const_iterator it = _pvdefine-&gt;begin(); it != _pvdefine-&gt;end(); ++it )
+00172 {
+00173 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00174 pfbea-&gt;SetName( it-&gt;first );
+00175 pfbea-&gt;SetValue( it-&gt;second );
+00176 pbody-&gt;AddElt( pfbea );
+00177 }
+00178
+00179 pff.SetForm( f );
+00180 pff.Save( _sxfullname );
+00181 }
+00182
+<a name="l00183"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a17">00183</a> <font class="keywordtype">void</font> CLoader::MakeTyp( <font class="keyword">const</font> CStringEx &amp;_sxfullname, <font class="keyword">const</font> CStringEx &amp;_sxtype, <font class="keyword">const</font> CStringEx &amp;_sxformula, <font class="keyword">const</font> CStringEx &amp;_sxenum, <font class="keyword">const</font> CStringEx &amp;_sxlow, <font class="keyword">const</font> CStringEx &amp;_sxhigh, <font class="keyword">const</font> CStringEx &amp;_sxdefault, <font class="keyword">const</font> std::vector&lt; std::pair&lt; CStringEx, CStringEx &gt; &gt;* <font class="keyword">const</font> _pvpredef , <font class="keyword">const</font> std::vector&lt; std::pair&lt; CStringEx, CStringEx &gt; &gt;* <font class="keyword">const</font> _pvparent )
+00184 {
+00185 CFormFile pff;
+00186 CForm f;
+00187
+00188 CFormBodyEltStruct* pbody = f.GetBody();
+00189 CFormBodyEltAtom* pfbea;
+00190 CFormBodyEltList* pfbel;
+00191 CFormBodyEltStruct* pfbes;
+00192
+00193 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00194 pfbea-&gt;SetName( <font class="stringliteral">"Type"</font> );
+00195 pfbea-&gt;SetValue( _sxtype );
+00196 pbody-&gt;AddElt( pfbea );
+00197
+00198 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00199 pfbea-&gt;SetName( <font class="stringliteral">"Enum"</font> );
+00200 pfbea-&gt;SetValue( _sxenum );
+00201 pbody-&gt;AddElt( pfbea );
+00202
+00203 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00204 pfbea-&gt;SetName( <font class="stringliteral">"Formula"</font> );
+00205 pfbea-&gt;SetValue( _sxformula );
+00206 pbody-&gt;AddElt( pfbea );
+00207
+00208 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00209 pfbea-&gt;SetName( <font class="stringliteral">"Lowlimit"</font> );
+00210 pfbea-&gt;SetValue( _sxlow );
+00211 pbody-&gt;AddElt( pfbea );
+00212
+00213 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00214 pfbea-&gt;SetName( <font class="stringliteral">"Highlimit"</font> );
+00215 pfbea-&gt;SetValue( _sxhigh );
+00216 pbody-&gt;AddElt( pfbea );
+00217
+00218 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00219 pfbea-&gt;SetName( <font class="stringliteral">"DefaultValue"</font> );
+00220 pfbea-&gt;SetValue( _sxdefault );
+00221 pbody-&gt;AddElt( pfbea );
+00222
+00223 CStringEx sx;
+00224
+00225 <font class="keywordflow">if</font>( ( _pvpredef )&amp;&amp;( !_pvpredef-&gt;empty() ) )
+00226 {
+00227 pfbel = <font class="keyword">new</font> CFormBodyEltList;
+00228 pfbel-&gt;SetName( <font class="stringliteral">"Predef"</font> );
+00229 <font class="keywordtype">int</font> i = 0;
+00230 <font class="keywordflow">for</font>( std::vector&lt; std::pair&lt; CStringEx, CStringEx &gt; &gt;::const_iterator it = _pvpredef-&gt;begin(); it != _pvpredef-&gt;end(); ++it )
+00231 {
+00232 pfbes = <font class="keyword">new</font> CFormBodyEltStruct;
+00233 sx.format( <font class="stringliteral">"#%d"</font>, i++ );
+00234 pfbes-&gt;SetName( sx );
+00235 pfbel-&gt;AddElt( pfbes );
+00236
+00237 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00238 pfbea-&gt;SetName( <font class="stringliteral">"Designation"</font> );
+00239 pfbea-&gt;SetValue( it-&gt;first );
+00240 pfbes-&gt;AddElt( pfbea );
+00241
+00242 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00243 pfbea-&gt;SetName( <font class="stringliteral">"Substitute"</font> );
+00244 pfbea-&gt;SetValue( it-&gt;second );
+00245 pfbes-&gt;AddElt( pfbea );
+00246 }
+00247 pbody-&gt;AddElt( pfbel );
+00248 }
+00249
+00250 <font class="keywordflow">if</font>( ( _pvparent )&amp;&amp;( !_pvparent-&gt;empty() ) )
+00251 {
+00252 pfbel = <font class="keyword">new</font> CFormBodyEltList;
+00253 pfbel-&gt;SetName( <font class="stringliteral">"Parents"</font> );
+00254 <font class="keywordtype">int</font> i = 0;
+00255 <font class="keywordflow">for</font>( std::vector&lt; std::pair&lt; CStringEx, CStringEx &gt; &gt;::const_iterator it = _pvparent-&gt;begin(); it != _pvparent-&gt;end(); ++it )
+00256 {
+00257 pfbes = <font class="keyword">new</font> CFormBodyEltStruct;
+00258 sx.format( <font class="stringliteral">"#%d"</font>, i++ );
+00259 pfbes-&gt;SetName( sx );
+00260 pfbel-&gt;AddElt( pfbes );
+00261
+00262 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00263 pfbea-&gt;SetName( <font class="stringliteral">"Activity"</font> );
+00264 pfbea-&gt;SetValue( it-&gt;first );
+00265 pfbes-&gt;AddElt( pfbea );
+00266
+00267 pfbea = <font class="keyword">new</font> CFormBodyEltAtom;
+00268 pfbea-&gt;SetName( <font class="stringliteral">"Filename"</font> );
+00269 pfbea-&gt;SetValue( it-&gt;second );
+00270 pfbes-&gt;AddElt( pfbea );
+00271 }
+00272 pbody-&gt;AddElt( pfbel );
+00273 }
+00274
+00275 pff.SetForm( f );
+00276 pff.Save( _sxfullname );
+00277 }
+00278
+<a name="l00279"></a><a class="code" href="classNLGEORGES_1_1CLoader.html#a15">00279</a> <font class="keywordtype">void</font> CLoader::SetTypPredef( <font class="keyword">const</font> CStringEx &amp;_sxfilename, <font class="keyword">const</font> std::vector&lt; CStringEx &gt;&amp; _pvsx )
+00280 {
+00281 CMoldElt*pme = <a class="code" href="classNLGEORGES_1_1CLoader.html#a7">LoadMold</a>( _sxfilename );
+00282 CMoldEltType* pmet = dynamic_cast&lt; CMoldEltType* &gt;( pme );
+00283 pmet-&gt;SetTypPredef( _pvsx );
+00284 pmet-&gt;Save();
+00285 }
+00286
+00287
+00288 <font class="comment">/*</font>
+00289 <font class="comment">CStringEx CLoader::WhereIs( const CStringEx _sxdirectory, const CStringEx _sxfilename )</font>
+00290 <font class="comment">{</font>
+00291 <font class="comment"> if( _sxfilename.empty() )</font>
+00292 <font class="comment"> return( CStringEx() );</font>
+00293 <font class="comment"></font>
+00294 <font class="comment"> _finddata_t info;</font>
+00295 <font class="comment"> CStringEx searchname = _sxdirectory +_sxfilename;</font>
+00296 <font class="comment"> long lhandle = _findfirst( searchname.c_str(), &amp;info );</font>
+00297 <font class="comment"> if( lhandle != -1 )</font>
+00298 <font class="comment"> {</font>
+00299 <font class="comment"> _findclose( lhandle );</font>
+00300 <font class="comment"> return( searchname );</font>
+00301 <font class="comment"> }</font>
+00302 <font class="comment"></font>
+00303 <font class="comment"> searchname = CStringEx( _sxdirectory + "*.*" );</font>
+00304 <font class="comment"> lhandle = _findfirst( searchname.c_str(), &amp;info ); </font>
+00305 <font class="comment"> do</font>
+00306 <font class="comment"> {</font>
+00307 <font class="comment"> if( !(info.attrib &amp; _A_SUBDIR ) )</font>
+00308 <font class="comment"> continue;</font>
+00309 <font class="comment"> if( ( info.name == "." )||( info.name == ".." ) )</font>
+00310 <font class="comment"> continue;</font>
+00311 <font class="comment"> CStringEx sxresult = WhereIs( CStringEx( _sxdirectory + info.name ), _sxfilename );</font>
+00312 <font class="comment"> if( !sxresult.empty() )</font>
+00313 <font class="comment"> return( sxresult );</font>
+00314 <font class="comment"> }</font>
+00315 <font class="comment"> while( _findnext( lhandle, &amp;info ) != -1 );</font>
+00316 <font class="comment"> </font>
+00317 <font class="comment"> _findclose( lhandle );</font>
+00318 <font class="comment"> return( CStringEx() );</font>
+00319 <font class="comment">}</font>
+00320 <font class="comment"></font>
+00321 <font class="comment">CStringEx CLoader::WhereIsDfnTyp( const CStringEx _sxfilename )</font>
+00322 <font class="comment">{</font>
+00323 <font class="comment"> CStringEx sxfullname = WhereIs( CStringEx( sxworkdirectory +"dfn/" ), _sxfilename );</font>
+00324 <font class="comment"> if( sxfullname.empty() &amp;&amp; ( sxrootdirectory != sxworkdirectory ) )</font>
+00325 <font class="comment"> sxfullname = WhereIs( CStringEx( sxrootdirectory +"dfn/" ), _sxfilename );</font>
+00326 <font class="comment"> return( sxfullname );</font>
+00327 <font class="comment">}</font>
+00328 <font class="comment"></font>
+00329 <font class="comment">CStringEx CLoader::WhereIsForm( const CStringEx _sxfilename )</font>
+00330 <font class="comment">{</font>
+00331 <font class="comment"> CStringEx sxfullname = WhereIs( sxworkdirectory, _sxfilename );</font>
+00332 <font class="comment"> if( sxfullname.empty() &amp;&amp; ( sxrootdirectory != sxworkdirectory ) )</font>
+00333 <font class="comment"> sxfullname = WhereIs( sxrootdirectory, _sxfilename );</font>
+00334 <font class="comment"> return( sxfullname );</font>
+00335 <font class="comment">}</font>
+00336 <font class="comment">*/</font>
+00337
+00338 }
+</pre></div>
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
+</TD>
+<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>