diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a02756.html | 1247 |
1 files changed, 1247 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02756.html b/docs/doxygen/nel/a02756.html new file mode 100644 index 00000000..0579e3ce --- /dev/null +++ b/docs/doxygen/nel/a02756.html @@ -0,0 +1,1247 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NLLIGO::CLigoConfig class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLLIGO::CLigoConfig Class Reference</h1><code>#include <<a class="el" href="a05904.html">ligo_config.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Ligo config file<p> +<dl compact><dt><b>Author:</b></dt><dd>Cyril 'Hulud' Corvazier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00047">47</a> of file <a class="el" href="a05904.html">ligo_config.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Primitive class accessors</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_0">canBeChild</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &child, const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &parent)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_1">canBeRoot</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_2">errorMessage</a> (const char *<a class="el" href="a04223.html#a641">format</a>,...)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector< std::string > & </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_3">getContextString</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03107.html">CPrimitiveClass</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_4">getPrimitiveClass</a> (const char *className) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03107.html">CPrimitiveClass</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_5">getPrimitiveClass</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &primitive) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">NLMISC::CRGBA</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_6">getPrimitiveColor</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector< <a class="el" href="a03113.html">CPrimitiveConfigurations</a> > & </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_7">getPrimitiveConfiguration</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_8">getPropertyString</a> (std::string &result, const char *<a class="el" href="a04560.html#a1">filename</a>, xmlNodePtr xmlNode, const char *propName)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_9">isPrimitiveDeletable</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_10">isPrimitiveLinked</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &primitive)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_11">syntaxError</a> (const char *<a class="el" href="a04560.html#a1">filename</a>, xmlNodePtr xmlNode, const char *<a class="el" href="a04223.html#a641">format</a>,...)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_12">initPrimitiveClass</a> (const char *<a class="el" href="a04560.html#a1">filename</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::map< std::string, std::string > </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_13">_ContextFilesLookup</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< std::string > </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_14">_Contexts</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::map< std::string, <a class="el" href="a03107.html">CPrimitiveClass</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03113.html">CPrimitiveConfigurations</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a></td></tr> + +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfiga0">read</a> (const char *fileName)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfiga1">readPrimitiveClass</a> (const char *fileName)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfiga2">~CLigoConfig</a> ()</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td colspan="2"><div class="groupHeader">Public value</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_0">CellSize</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Size of a cell of the ligoscape in meter. <a href="#NLLIGO_1_1CLigoConfigz1897_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_1">PrimitiveClassFilename</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">The ligo class file. <a href="#NLLIGO_1_1CLigoConfigz1897_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_2">Snap</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Snap precision for vertex position checking in meter. <a href="#NLLIGO_1_1CLigoConfigz1897_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_3">ZoneSnapShotRes</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Zone snap shot resolution. <a href="#NLLIGO_1_1CLigoConfigz1897_3"></a><br><br></td></tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLLIGO_1_1CLigoConfiga2" doxytag="NLLIGO::CLigoConfig::~CLigoConfig" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> virtual NLLIGO::CLigoConfig::~<a class="el" href="a02756.html">CLigoConfig</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00051">51</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +<div class="fragment"><pre>00051 { } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_0" doxytag="NLLIGO::CLigoConfig::canBeChild" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::canBeChild </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname" nowrap> <em>child</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname" nowrap> <em>parent</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00242">242</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a06202.html#l00221">NLLIGO::CPrimitiveClass::DynamicChildren</a>, <a class="el" href="a06202.html#l00224">NLLIGO::CPrimitiveClass::GeneratedChildren</a>, <a class="el" href="a06196.html#l00195">NLLIGO::IPrimitive::getParent()</a>, <a class="el" href="a05903.html#l00367">getPrimitiveClass()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00243 { +00244 <span class="comment">// Get the child class</span> +00245 string childClassName; +00246 <span class="keywordflow">if</span> (child.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, childClassName)) +00247 { +00248 <span class="comment">// Get the parent class</span> +00249 <span class="keyword">const</span> CPrimitiveClass *parentClass = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_5">getPrimitiveClass</a> (parent); +00250 <span class="keywordflow">if</span> (parentClass) +00251 { +00252 <span class="comment">// Search for the child class</span> +00253 <a class="code" href="a04558.html#a15">uint</a> i; +00254 <span class="keywordflow">for</span> (i=0; i<parentClass->DynamicChildren.size (); i++) +00255 { +00256 <span class="comment">// The same ?</span> +00257 <span class="keywordflow">if</span> (parentClass->DynamicChildren[i].ClassName == childClassName) +00258 <span class="keywordflow">break</span>; +00259 } +00260 +00261 <span class="keywordflow">if</span> (i<parentClass->DynamicChildren.size ()) +00262 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00263 +00264 <span class="keywordflow">for</span> (i=0; i<parentClass->GeneratedChildren.size (); i++) +00265 { +00266 <span class="comment">// The same ?</span> +00267 <span class="keywordflow">if</span> (parentClass->GeneratedChildren[i].ClassName == childClassName) +00268 <span class="keywordflow">break</span>; +00269 } +00270 +00271 <span class="keywordflow">return</span> (i<parentClass->GeneratedChildren.size ()); +00272 } +00273 <span class="keywordflow">else</span> +00274 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00275 } +00276 <span class="keywordflow">else</span> +00277 { +00278 <span class="comment">// Only if it is a root node or parent class doesn't exist</span> +00279 string parentClassName; +00280 <span class="keywordflow">return</span> ( (parent.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_5">getParent</a> () == NULL) || (!parent.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, parentClassName) ) ); +00281 } +00282 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_1" doxytag="NLLIGO::CLigoConfig::canBeRoot" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::canBeRoot </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>primitive</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00286">286</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a06202.html#l00221">NLLIGO::CPrimitiveClass::DynamicChildren</a>, <a class="el" href="a05903.html#l00367">getPrimitiveClass()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00287 { +00288 <span class="comment">// Get the child class</span> +00289 string childClassName; +00290 <span class="keywordflow">if</span> (child.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, childClassName)) +00291 { +00292 <span class="comment">// Get the parent class</span> +00293 <span class="keyword">const</span> CPrimitiveClass *parentClass = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_5">getPrimitiveClass</a> (<span class="stringliteral">"root"</span>); +00294 <span class="keywordflow">if</span> (parentClass) +00295 { +00296 <span class="comment">// Search for the child class</span> +00297 <a class="code" href="a04558.html#a15">uint</a> i; +00298 <span class="keywordflow">for</span> (i=0; i<parentClass->DynamicChildren.size (); i++) +00299 { +00300 <span class="comment">// The same ?</span> +00301 <span class="keywordflow">if</span> (parentClass->DynamicChildren[i].ClassName == childClassName) +00302 <span class="keywordflow">break</span>; +00303 } +00304 +00305 <span class="keywordflow">return</span> (i<parentClass->DynamicChildren.size ()); +00306 } +00307 <span class="keywordflow">else</span> +00308 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00309 } +00310 <span class="keywordflow">else</span> +00311 { +00312 <span class="comment">// Root class doesn't exist</span> +00313 <span class="keywordflow">return</span> ( !<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_5">getPrimitiveClass</a> (<span class="stringliteral">"root"</span>) ); +00314 } +00315 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_2" doxytag="NLLIGO::CLigoConfig::errorMessage" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLLIGO::CLigoConfig::errorMessage </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>format</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>... </td> + <td class="mdname" nowrap></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00346">346</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05646.html#l01016">format</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>, and <a class="el" href="a05903.html#l00333">syntaxError()</a>. +<p> +<div class="fragment"><pre>00347 { +00348 <span class="comment">// Make a buffer string</span> +00349 va_list args; +00350 va_start( args, format ); +00351 <span class="keywordtype">char</span> <a class="code" href="a04223.html#a589">buffer</a>[1024]; +00352 vsnprintf( buffer, 1024, format, args ); +00353 va_end( args ); +00354 +00355 <a class="code" href="a04199.html#a2">nlwarning</a> (buffer); +00356 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_3" doxytag="NLLIGO::CLigoConfig::getContextString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const std::vector< std::string > & NLLIGO::CLigoConfig::getContextString </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00360">360</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00128">_Contexts</a>. +<p> +<div class="fragment"><pre>00361 { +00362 <span class="keywordflow">return</span> <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_14">_Contexts</a>; +00363 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_4" doxytag="NLLIGO::CLigoConfig::getPrimitiveClass" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03107.html">CPrimitiveClass</a> * NLLIGO::CLigoConfig::getPrimitiveClass </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>className</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00400">400</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>. +<p> +<div class="fragment"><pre>00401 { +00402 std::map<std::string, CPrimitiveClass>::const_iterator ite = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.find (className); +00403 <span class="keywordflow">if</span> (ite != <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.end ()) +00404 { +00405 <span class="keywordflow">return</span> &(ite->second); +00406 } +00407 <span class="keywordflow">return</span> NULL; +00408 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_5" doxytag="NLLIGO::CLigoConfig::getPrimitiveClass" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03107.html">CPrimitiveClass</a> * NLLIGO::CLigoConfig::getPrimitiveClass </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>primitive</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00367">367</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>, <a class="el" href="a06196.html#l00195">NLLIGO::IPrimitive::getParent()</a>, and <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00242">canBeChild()</a>, <a class="el" href="a05903.html#l00286">canBeRoot()</a>, and <a class="el" href="a06195.html#l01396">NLLIGO::IPrimitive::read()</a>. +<p> +<div class="fragment"><pre>00368 { +00369 <span class="keyword">const</span> CPrimitiveClass *primClass = NULL; +00370 +00371 <span class="comment">// Get property class</span> +00372 string className; +00373 <span class="keywordflow">if</span> (primitive.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, className)) +00374 { +00375 std::map<std::string, CPrimitiveClass>::const_iterator ite = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.find (className); +00376 <span class="keywordflow">if</span> (ite != <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.end ()) +00377 { +00378 primClass = &(ite->second); +00379 } +00380 } +00381 +00382 <span class="comment">// Not found ?</span> +00383 <span class="keywordflow">if</span> (!primClass) +00384 { +00385 <span class="comment">// Root ?</span> +00386 <span class="keywordflow">if</span> (!primitive.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_5">getParent</a> ()) +00387 { +00388 std::map<std::string, CPrimitiveClass>::const_iterator ite = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.find (<span class="stringliteral">"root"</span>); +00389 <span class="keywordflow">if</span> (ite != <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.end ()) +00390 { +00391 primClass = &(ite->second); +00392 } +00393 } +00394 } +00395 <span class="keywordflow">return</span> primClass; +00396 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_6" doxytag="NLLIGO::CLigoConfig::getPrimitiveColor" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03337.html">NLMISC::CRGBA</a> NLLIGO::CLigoConfig::getPrimitiveColor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>primitive</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00188">188</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>, <a class="el" href="a05904.html#l00033">DEFAULT_PRIMITIVE_COLOR</a>, and <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>. +<p> +<div class="fragment"><pre>00189 { +00190 <span class="comment">// Get the class</span> +00191 string className; +00192 <span class="keywordflow">if</span> (primitive.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, className)) +00193 { +00194 <span class="comment">// Get the class</span> +00195 std::map<std::string, CPrimitiveClass>::iterator ite = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.find (className); +00196 <span class="keywordflow">if</span> (ite != <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.end ()) +00197 { +00198 <span class="keywordflow">return</span> ite->second.Color; +00199 } +00200 } +00201 <span class="keywordflow">return</span> <a class="code" href="a04481.html#a0">DEFAULT_PRIMITIVE_COLOR</a>; +00202 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_7" doxytag="NLLIGO::CLigoConfig::getPrimitiveConfiguration" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const std::vector<<a class="el" href="a03113.html">CPrimitiveConfigurations</a>>& NLLIGO::CLigoConfig::getPrimitiveConfiguration </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00114">114</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +References <a class="el" href="a05904.html#l00134">_PrimitiveConfigurations</a>. +<p> +<div class="fragment"><pre>00115 { +00116 <span class="keywordflow">return</span> <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a>; +00117 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_8" doxytag="NLLIGO::CLigoConfig::getPropertyString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::getPropertyString </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">std::string & </td> + <td class="mdname" nowrap> <em>result</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>filename</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>xmlNodePtr </td> + <td class="mdname" nowrap> <em>xmlNode</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>propName</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00319">319</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05903.html#l00333">syntaxError()</a>. +<p> +Referenced by <a class="el" href="a06203.html#l00039">NLLIGO::CPrimitiveConfigurations::read()</a>, <a class="el" href="a06201.html#l00193">NLLIGO::CPrimitiveClass::read()</a>, and <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>. +<p> +<div class="fragment"><pre>00320 { +00321 <span class="comment">// Call the CIXml version</span> +00322 <span class="keywordflow">if</span> (!CIXml::getPropertyString (result, xmlNode, propName)) +00323 { +00324 <span class="comment">// Output a formated error</span> +00325 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_11">syntaxError</a> (filename, xmlNode, <span class="stringliteral">"Missing XML node property (%s)"</span>, propName); +00326 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00327 } +00328 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00329 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_12" doxytag="NLLIGO::CLigoConfig::initPrimitiveClass" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::initPrimitiveClass </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>filename</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_9" doxytag="NLLIGO::CLigoConfig::isPrimitiveDeletable" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::isPrimitiveDeletable </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>primitive</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00224">224</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>, and <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>. +<p> +<div class="fragment"><pre>00225 { +00226 <span class="comment">// Get the class</span> +00227 string className; +00228 <span class="keywordflow">if</span> (primitive.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, className)) +00229 { +00230 <span class="comment">// Get the class</span> +00231 std::map<std::string, CPrimitiveClass>::iterator ite = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.find (className); +00232 <span class="keywordflow">if</span> (ite != <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.end ()) +00233 { +00234 <span class="keywordflow">return</span> ite->second.Deletable; +00235 } +00236 } +00237 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00238 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_10" doxytag="NLLIGO::CLigoConfig::isPrimitiveLinked" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::isPrimitiveLinked </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>primitive</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00206">206</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>, and <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>. +<p> +<div class="fragment"><pre>00207 { +00208 <span class="comment">// Get the class</span> +00209 string className; +00210 <span class="keywordflow">if</span> (primitive.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (<span class="stringliteral">"class"</span>, className)) +00211 { +00212 <span class="comment">// Get the class</span> +00213 std::map<std::string, CPrimitiveClass>::iterator ite = <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.find (className); +00214 <span class="keywordflow">if</span> (ite != <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.end ()) +00215 { +00216 <span class="keywordflow">return</span> ite->second.LinkBrothers; +00217 } +00218 } +00219 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00220 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfiga0" doxytag="NLLIGO::CLigoConfig::read" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::read </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>fileName</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Load the config file. Can throw some exception if file doesn't exist or is malformed.<p> +This file will try to open the file ligo class description file (XML) using the LigoClass as file name. It will try first to load directly the file and then to lookup the file in <a class="el" href="a03072.html">NLMISC::CPath</a>. +<p> +Definition at line <a class="el" href="a05903.html#l00042">42</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00128">_Contexts</a>, <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>, <a class="el" href="a05904.html#l00134">_PrimitiveConfigurations</a>, <a class="el" href="a05597.html#l00092">NLMISC::CConfigFile::CVar::asFloat()</a>, <a class="el" href="a05597.html#l00058">NLMISC::CConfigFile::CVar::asInt()</a>, <a class="el" href="a05597.html#l00097">NLMISC::CConfigFile::CVar::asString()</a>, <a class="el" href="a05597.html#l00431">NLMISC::CConfigFile::getVar()</a>, <a class="el" href="a05597.html#l00244">NLMISC::CConfigFile::load()</a>, <a class="el" href="a05904.html#l00078">PrimitiveClassFilename</a>, <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>, <a class="el" href="a05904.html#l00072">Snap</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05904.html#l00075">ZoneSnapShotRes</a>. +<p> +<div class="fragment"><pre>00043 { +00044 <span class="comment">// The CF</span> +00045 <a class="code" href="a02401.html">CConfigFile</a> cf; +00046 +00047 <span class="comment">// Load and parse the file</span> +00048 cf.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea12">load</a> (fileName); +00049 +00050 <span class="comment">// Read the parameters</span> +00051 <a class="code" href="a02402.html">CConfigFile::CVar</a> &cell_size = cf.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea9">getVar</a> (<span class="stringliteral">"cell_size"</span>); +00052 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_0">CellSize</a> = cell_size.<a class="code" href="a02402.html#NLMISC_1_1CConfigFile_1_1CVarz1933_1">asFloat</a> (); +00053 <a class="code" href="a02402.html">CConfigFile::CVar</a> &snap = cf.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea9">getVar</a> (<span class="stringliteral">"snap"</span>); +00054 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_2">Snap</a> = snap.<a class="code" href="a02402.html#NLMISC_1_1CConfigFile_1_1CVarz1933_1">asFloat</a> (); +00055 <a class="code" href="a02402.html">CConfigFile::CVar</a> &snapShot = cf.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea9">getVar</a> (<span class="stringliteral">"zone_snapeshot_res"</span>); +00056 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_3">ZoneSnapShotRes</a> = (<a class="code" href="a04558.html#a15">uint</a>)snapShot.<a class="code" href="a02402.html#NLMISC_1_1CConfigFile_1_1CVarz1933_2">asInt</a> (); +00057 <a class="code" href="a02402.html">CConfigFile::CVar</a> &primitiveClassFilename = cf.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea9">getVar</a> (<span class="stringliteral">"primitive_class_filename"</span>); +00058 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_1">PrimitiveClassFilename</a>= primitiveClassFilename.<a class="code" href="a02402.html#NLMISC_1_1CConfigFile_1_1CVarz1933_3">asString</a> (); +00059 +00060 <span class="comment">// Clear the previous classes</span> +00061 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_14">_Contexts</a>.clear(); +00062 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.clear(); +00063 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a>.clear(); +00064 +00065 <span class="comment">// Read the primitive class name</span> +00066 <span class="keywordflow">if</span> (!<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_1">PrimitiveClassFilename</a>.empty()) +00067 { +00068 <span class="keywordflow">return</span> <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfiga1">readPrimitiveClass</a> (<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_1">PrimitiveClassFilename</a>.c_str()); +00069 } +00070 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00071 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfiga1" doxytag="NLLIGO::CLigoConfig::readPrimitiveClass" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NLLIGO::CLigoConfig::readPrimitiveClass </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>fileName</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This file will read the file ligo class description file (XML) using the LigoClass as file name. It will try first to load directly the file and then to lookup the file in <a class="el" href="a03072.html">NLMISC::CPath</a>. +<p> +Definition at line <a class="el" href="a05903.html#l00075">75</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05904.html#l00131">_ContextFilesLookup</a>, <a class="el" href="a05904.html#l00128">_Contexts</a>, <a class="el" href="a05904.html#l00125">_PrimitiveClasses</a>, <a class="el" href="a05904.html#l00134">_PrimitiveConfigurations</a>, <a class="el" href="a05903.html#l00346">errorMessage()</a>, <a class="el" href="a05538.html#l02654">file</a>, <a class="el" href="a05903.html#l00319">getPropertyString()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05903.html#l00333">syntaxError()</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00042">read()</a>. +<p> +<div class="fragment"><pre>00076 { +00077 <span class="comment">// File exist ?</span> +00078 string <a class="code" href="a05377.html#a2">filename</a> = _fileName; +00079 <a class="code" href="a05377.html#a2">filename</a> = CPath::lookup (_fileName, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>); +00080 <span class="keywordflow">if</span> (<a class="code" href="a05377.html#a2">filename</a>.empty()) +00081 <a class="code" href="a05377.html#a2">filename</a> = _fileName; +00082 +00083 <span class="comment">// The context strings</span> +00084 set<string> contextStrings; +00085 +00086 <span class="comment">// Read the document</span> +00087 <a class="code" href="a02653.html">CIFile</a> <a class="code" href="a04115.html#a95">file</a>; +00088 <span class="keywordflow">if</span> (<a class="code" href="a04115.html#a95">file</a>.open (filename)) +00089 { +00090 <span class="keywordflow">try</span> +00091 { +00092 <span class="comment">// XML stream</span> +00093 CIXml xml; +00094 xml.init (file); +00095 +00096 <span class="comment">// Get the root node</span> +00097 xmlNodePtr root = xml.getRootNode (); +00098 <a class="code" href="a04199.html#a6">nlassert</a> (root); +00099 +00100 <span class="comment">// Check the header</span> +00101 <span class="keywordflow">if</span> (strcmp ((<span class="keyword">const</span> <span class="keywordtype">char</span>*)root->name, <span class="stringliteral">"NEL_LIGO_PRIMITIVE_CLASS"</span>) == 0) +00102 { +00103 <span class="comment">// Get the first primitive description</span> +00104 xmlNodePtr primitive = CIXml::getFirstChildNode (root, <span class="stringliteral">"PRIMITIVE"</span>); +00105 <span class="keywordflow">if</span> (primitive) +00106 { +00107 <span class="keywordflow">do</span> +00108 { +00109 <span class="comment">// Get the primitive name</span> +00110 std::string name; +00111 <span class="keywordflow">if</span> (<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_8">getPropertyString</a> (name, <a class="code" href="a05377.html#a2">filename</a>.c_str(), primitive, <span class="stringliteral">"CLASS_NAME"</span>)) +00112 { +00113 <span class="comment">// Add the primitive</span> +00114 pair<std::map<std::string, CPrimitiveClass>::iterator, <span class="keywordtype">bool</span>> insertResult = +00115 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">_PrimitiveClasses</a>.insert (std::map<std::string, CPrimitiveClass>::value_type (name, CPrimitiveClass ())); +00116 <span class="keywordflow">if</span> (insertResult.second) +00117 { +00118 <span class="keywordflow">if</span> (!insertResult.first->second.read (primitive, <a class="code" href="a05377.html#a2">filename</a>.c_str(), name.c_str (), contextStrings, <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_13">_ContextFilesLookup</a>, *<span class="keyword">this</span>)) +00119 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00120 } +00121 <span class="keywordflow">else</span> +00122 { +00123 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_11">syntaxError</a> (<a class="code" href="a05377.html#a2">filename</a>.c_str(), root, <span class="stringliteral">"Class (%s) aready defined"</span>, name.c_str ()); +00124 } +00125 } +00126 <span class="keywordflow">else</span> +00127 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00128 } +00129 <span class="keywordflow">while</span> ((primitive = CIXml::getNextChildNode (primitive, <span class="stringliteral">"PRIMITIVE"</span>))); +00130 } +00131 +00132 <span class="comment">// Add the context strings</span> +00133 { +00134 set<string>::iterator ite = contextStrings.begin (); +00135 <span class="keywordflow">while</span> (ite != contextStrings.end ()) +00136 { +00137 <span class="keywordflow">if</span> (*ite != <span class="stringliteral">"default"</span>) +00138 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_14">_Contexts</a>.push_back (*ite); +00139 ite++; +00140 } +00141 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_14">_Contexts</a>.push_back (<span class="stringliteral">"default"</span>); +00142 } +00143 +00144 <span class="comment">// Get the first primitive configuration</span> +00145 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a>.reserve (CIXml::countChildren (root, <span class="stringliteral">"CONFIGURATION"</span>)); +00146 xmlNodePtr configuration = CIXml::getFirstChildNode (root, <span class="stringliteral">"CONFIGURATION"</span>); +00147 <span class="keywordflow">if</span> (configuration) +00148 { +00149 <span class="keywordflow">do</span> +00150 { +00151 <span class="comment">// Get the configuration name</span> +00152 std::string name; +00153 <span class="keywordflow">if</span> (<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_8">getPropertyString</a> (name, <a class="code" href="a05377.html#a2">filename</a>.c_str(), configuration, <span class="stringliteral">"NAME"</span>)) +00154 { +00155 <span class="comment">// Add the configuration</span> +00156 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a>.resize (<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a>.size()+1); +00157 <span class="keywordflow">if</span> (!<a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">_PrimitiveConfigurations</a>.back().read (configuration, <a class="code" href="a05377.html#a2">filename</a>.c_str(), name.c_str (), *<span class="keyword">this</span>)) +00158 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00159 } +00160 <span class="keywordflow">else</span> +00161 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00162 } +00163 <span class="keywordflow">while</span> ((configuration = CIXml::getNextChildNode (configuration, <span class="stringliteral">"CONFIGURATION"</span>))); +00164 } +00165 +00166 <span class="comment">// Ok</span> +00167 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00168 } +00169 <span class="keywordflow">else</span> +00170 { +00171 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_11">syntaxError</a> (<a class="code" href="a05377.html#a2">filename</a>.c_str(), root, <span class="stringliteral">"Wrong root node, should be NEL_LIGO_PRIMITIVE_CLASS"</span>); +00172 } +00173 } +00174 <span class="keywordflow">catch</span> (<a class="code" href="a02482.html">Exception</a> &e) +00175 { +00176 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_2">errorMessage</a> (<span class="stringliteral">"File read error (%s):%s"</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str(), e.what ()); +00177 } +00178 } +00179 <span class="keywordflow">else</span> +00180 { +00181 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_2">errorMessage</a> (<span class="stringliteral">"Can't open the file %s for reading."</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str()); +00182 } +00183 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00184 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_11" doxytag="NLLIGO::CLigoConfig::syntaxError" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLLIGO::CLigoConfig::syntaxError </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>filename</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>xmlNodePtr </td> + <td class="mdname" nowrap> <em>xmlNode</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>format</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>... </td> + <td class="mdname" nowrap></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05903.html#l00333">333</a> of file <a class="el" href="a05903.html">ligo_config.cpp</a>. +<p> +References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05903.html#l00346">errorMessage()</a>, and <a class="el" href="a05646.html#l01016">format</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00319">getPropertyString()</a>, <a class="el" href="a06203.html#l00039">NLLIGO::CPrimitiveConfigurations::read()</a>, <a class="el" href="a06201.html#l00193">NLLIGO::CPrimitiveClass::read()</a>, and <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>. +<p> +<div class="fragment"><pre>00334 { +00335 va_list args; +00336 va_start( args, format ); +00337 <span class="keywordtype">char</span> <a class="code" href="a04223.html#a589">buffer</a>[1024]; +00338 vsnprintf( buffer, 1024, format, args ); +00339 va_end( args ); +00340 +00341 <a class="code" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_2">errorMessage</a> (<span class="stringliteral">"(%s), node (%s), line (%d) :\n%s"</span>, filename, xmlNode->name, (<span class="keywordtype">int</span>)xmlNode->content, buffer); +00342 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_13" doxytag="NLLIGO::CLigoConfig::_ContextFilesLookup" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::map<std::string, std::string> <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_13">NLLIGO::CLigoConfig::_ContextFilesLookup</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00131">131</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_14" doxytag="NLLIGO::CLigoConfig::_Contexts" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<std::string> <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_14">NLLIGO::CLigoConfig::_Contexts</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00128">128</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00360">getContextString()</a>, <a class="el" href="a05903.html#l00042">read()</a>, and <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_15" doxytag="NLLIGO::CLigoConfig::_PrimitiveClasses" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::map<std::string, <a class="el" href="a03107.html">CPrimitiveClass</a>> <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_15">NLLIGO::CLigoConfig::_PrimitiveClasses</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00125">125</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00367">getPrimitiveClass()</a>, <a class="el" href="a05903.html#l00188">getPrimitiveColor()</a>, <a class="el" href="a05903.html#l00224">isPrimitiveDeletable()</a>, <a class="el" href="a05903.html#l00206">isPrimitiveLinked()</a>, <a class="el" href="a05903.html#l00042">read()</a>, and <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1898_16" doxytag="NLLIGO::CLigoConfig::_PrimitiveConfigurations" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03113.html">CPrimitiveConfigurations</a>> <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1898_16">NLLIGO::CLigoConfig::_PrimitiveConfigurations</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00134">134</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a05904.html#l00114">getPrimitiveConfiguration()</a>, <a class="el" href="a05903.html#l00042">read()</a>, and <a class="el" href="a05903.html#l00075">readPrimitiveClass()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1897_0" doxytag="NLLIGO::CLigoConfig::CellSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> float <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_0">NLLIGO::CLigoConfig::CellSize</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Size of a cell of the ligoscape in meter. +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00069">69</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a06780.html#l00107">NLLIGO::CZoneTemplate::build()</a>, <a class="el" href="a06766.html#l00041">NLLIGO::CZoneEdge::build()</a>, <a class="el" href="a06766.html#l00212">NLLIGO::CZoneEdge::buildMatrix()</a>, <a class="el" href="a06766.html#l00195">NLLIGO::CZoneEdge::invert()</a>, and <a class="el" href="a06766.html#l00089">NLLIGO::CZoneEdge::isSymetrical()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1897_1" doxytag="NLLIGO::CLigoConfig::PrimitiveClassFilename" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::string <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_1">NLLIGO::CLigoConfig::PrimitiveClassFilename</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +The ligo class file. +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00078">78</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00042">read()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1897_2" doxytag="NLLIGO::CLigoConfig::Snap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> float <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_2">NLLIGO::CLigoConfig::Snap</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Snap precision for vertex position checking in meter. +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00072">72</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a06780.html#l00107">NLLIGO::CZoneTemplate::build()</a>, <a class="el" href="a06766.html#l00041">NLLIGO::CZoneEdge::build()</a>, <a class="el" href="a06766.html#l00089">NLLIGO::CZoneEdge::isSymetrical()</a>, <a class="el" href="a06766.html#l00138">NLLIGO::CZoneEdge::isTheSame()</a>, and <a class="el" href="a05903.html#l00042">read()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CLigoConfigz1897_3" doxytag="NLLIGO::CLigoConfig::ZoneSnapShotRes" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02756.html#NLLIGO_1_1CLigoConfigz1897_3">NLLIGO::CLigoConfig::ZoneSnapShotRes</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Zone snap shot resolution. +<p> + +<p> +Definition at line <a class="el" href="a05904.html#l00075">75</a> of file <a class="el" href="a05904.html">ligo_config.h</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00042">read()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05904.html">ligo_config.h</a><li><a class="el" href="a05903.html">ligo_config.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 12:47:30 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |