diff options
Diffstat (limited to 'docs/doxygen/nel/a03122.html')
-rw-r--r-- | docs/doxygen/nel/a03122.html | 1802 |
1 files changed, 1802 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03122.html b/docs/doxygen/nel/a03122.html new file mode 100644 index 00000000..5cdce42a --- /dev/null +++ b/docs/doxygen/nel/a03122.html @@ -0,0 +1,1802 @@ +<!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::CPrimNode 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::CPrimNode Class Reference</h1><code>#include <<a class="el" href="a06196.html">primitive.h</a>></code> +<p> +<p>Inheritance diagram for NLLIGO::CPrimNode: +<p><center><img src="a03122.png" usemap="#NLLIGO::CPrimNode_map" border="0" alt=""></center> +<map name="NLLIGO::CPrimNode_map"> +<area href="a03123.html" alt="NLLIGO::IPrimitive" shape="rect" coords="0,56,127,80"> +<area href="a02540.html" alt="NLMISC::IClassable" shape="rect" coords="0,0,127,24"> +</map> +<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Properties</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_0">addPropertyByName</a> (const char *property_name, <a class="el" href="a03131.html">IProperty</a> *result)</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="a03123.html#NLLIGO_1_1IPrimitivez1900_2">getNumProperty</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_3">getNumVector</a> () const=0</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual const <a class="el" href="a03127.html">CPrimVector</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_5">getPrimVector</a> () const=0</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_6">getProperty</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>, std::string &property_name, <a class="el" href="a03131.html">IProperty</a> *&result)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_7">getProperty</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>, std::string &property_name, const <a class="el" href="a03131.html">IProperty</a> *&result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_8">getPropertyByName</a> (const char *property_name, <a class="el" href="a03337.html">NLMISC::CRGBA</a> &result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_9">getPropertyByName</a> (const char *property_name, const std::vector< std::string > *&result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_10">getPropertyByName</a> (const char *property_name, std::string &result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_11">getPropertyByName</a> (const char *property_name, std::vector< std::string > *&result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_12">getPropertyByName</a> (const char *property_name, std::string *&result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_13">getPropertyByName</a> (const char *property_name, <a class="el" href="a03131.html">IProperty</a> *&result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (const char *property_name, const <a class="el" href="a03131.html">IProperty</a> *&result) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_16">removeProperties</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_17">removeProperty</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_18">removePropertyByName</a> (const char *property_name)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_19">write</a> (xmlNodePtr xmlNode, const char *<a class="el" href="a04560.html#a1">filename</a>) const </td></tr> + +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom>{ <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew2">NotAnArray</a>, +<a class="el" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew1">AtTheEnd</a> = 0xffffffff + }</td></tr> + +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03123.html">IPrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03122.html#NLLIGO_1_1CPrimNodea0">copy</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a02540.html#NL3D_1_1ITrackKeyFramer_3_01CKeyVector_01_4a6">getClassName</a> ()=0</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03127.html">CPrimVector</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03122.html#NLLIGO_1_1CPrimNodea2">getPrimVector</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03122.html#NLLIGO_1_1CPrimNodea3">read</a> (xmlNodePtr xmlNode, const char *<a class="el" href="a04560.html#a1">filename</a>, <a class="el" href="a04558.html#a15">uint</a> version, <a class="el" href="a02756.html">CLigoConfig</a> &config)</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitiveo0">Expanded</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual NLMISC_DECLARE_CLASS(<a class="el" href="a03122.html">CPrimNode</a>) private const <br> +<a class="el" href="a03127.html">CPrimVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03122.html#NLLIGO_1_1CPrimNodeo1">getPrimVector</a> )() const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitiveo1">Layer</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitiveo2">Name</a></td></tr> + +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NLLIGO_1_1IPrimitivew0" doxytag="NLLIGO::CPrimNode::@66" ></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"> anonymous enum<code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew2" doxytag="NotAnArray" ></a>NotAnArray</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew1" doxytag="AtTheEnd" ></a>AtTheEnd</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06196.html#l00165">165</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +<div class="fragment"><pre>00166 { +00167 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew2">NotAnArray</a>, +00168 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew1">AtTheEnd</a> = 0xffffffff, +00169 }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_0" doxytag="NLLIGO::CPrimNode::addPropertyByName" ></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::IPrimitive::addPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03131.html">IProperty</a> * </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Definition at line <a class="el" href="a06195.html#l01384">1384</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01839">NLLIGO::CPrimitives::convertAddPrimitive()</a>, <a class="el" href="a06195.html#l01910">NLLIGO::CPrimitives::convertPrimitive()</a>, and <a class="el" href="a06195.html#l01396">NLLIGO::IPrimitive::read()</a>. +<p> +<div class="fragment"><pre>01385 { +01386 <span class="keywordtype">bool</span> inserted = _Properties.insert (std::map<std::string, IProperty*>::value_type (property_name, result)).second; +01387 <span class="keywordflow">if</span> (inserted) +01388 { +01389 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01390 } +01391 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01392 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimNodea0" doxytag="NLLIGO::CPrimNode::copy" ></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="a03123.html">NLLIGO::IPrimitive</a> * NLLIGO::CPrimNode::copy </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> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Implements <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_1">NLLIGO::IPrimitive</a>. +<p> +Definition at line <a class="el" href="a06195.html#l00398">398</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +<div class="fragment"><pre>00399 { +00400 <span class="keywordflow">return</span> <span class="keyword">new</span> CPrimNode (*<span class="keyword">this</span>); +00401 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_0" doxytag="NLLIGO::CPrimNode::getChild" ></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::IPrimitive::getChild </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03123.html">IPrimitive</a> *& </td> + <td class="mdname" nowrap> <em>result</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>childId</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a child primitive +<p> +Definition at line <a class="el" href="a06195.html#l01303">1303</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01304 { +01305 <span class="keywordflow">if</span> (childId < _Children.size ()) +01306 { +01307 result = _Children[childId]; +01308 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01309 } +01310 <span class="keywordflow">else</span> +01311 { +01312 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getChild : invalid index (index : %d, size %d)."</span>, childId, _Children.size ()); +01313 } +01314 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01315 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_1" doxytag="NLLIGO::CPrimNode::getChild" ></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::IPrimitive::getChild </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">IPrimitive</a> *& </td> + <td class="mdname" nowrap> <em>result</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>childId</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a child primitive +<p> +Definition at line <a class="el" href="a06195.html#l01287">1287</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01910">NLLIGO::CPrimitives::convertPrimitive()</a>, <a class="el" href="a05471.html#l00272">NLSOUND::CBackgroundSoundManager::loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00441">NLSOUND::CBackgroundSoundManager::loadEffectsFromPrimitives()</a>, <a class="el" href="a05471.html#l00410">NLSOUND::CBackgroundSoundManager::loadSamplesFromPrimitives()</a>, and <a class="el" href="a05471.html#l00334">NLSOUND::CBackgroundSoundManager::loadSoundsFromPrimitives()</a>. +<p> +<div class="fragment"><pre>01288 { +01289 <span class="keywordflow">if</span> (childId < _Children.size ()) +01290 { +01291 result = _Children[childId]; +01292 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01293 } +01294 <span class="keywordflow">else</span> +01295 { +01296 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getChild : invalid index (index : %d, size %d)."</span>, childId, _Children.size ()); +01297 } +01298 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01299 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_2" doxytag="NLLIGO::CPrimNode::getChildId" ></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::IPrimitive::getChildId </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> & </td> + <td class="mdname" nowrap> <em>childId</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03123.html">IPrimitive</a> * </td> + <td class="mdname" nowrap> <em>child</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the id of the child, return 0xffffffff if not found +<p> +Definition at line <a class="el" href="a06195.html#l01713">1713</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00317">NLLIGO::IPrimitive::_ChildId</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01714 { +01715 childId = child->_ChildId; +01716 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01717 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITrackKeyFramer_3_01CKeyVector_01_4a6" doxytag="NLLIGO::CPrimNode::getClassName" ></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 std::string NLMISC::IClassable::getClassName </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> [pure virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Implemented in <a class="el" href="a02995.html#NLAIAGENT_1_1CNumericIndexz1699_0">NLAIAGENT::CNumericIndex</a>, <a class="el" href="a02145.html#NLAIAGENT_1_1VectorTypez1764_0">NLAIC::IPointerGestion</a>, <a class="el" href="a02650.html#NLAIC_1_1CIdentTypez1766_0">NLAIC::CIdentType</a>, and <a class="el" href="a02241.html#CAutomataDescz1896_0">CAutomataDesc</a>. +<p> +Referenced by <a class="el" href="a05549.html#l00091">NLMISC::CClassRegistry::checkObject()</a>, and <a class="el" href="a06525.html#l00039">NL3D::GetTextureSize()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_3" doxytag="NLLIGO::CPrimNode::getNumChildren" ></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> NLLIGO::IPrimitive::getNumChildren </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, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the children primitive count +<p> +Definition at line <a class="el" href="a06196.html#l00183">183</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01910">NLLIGO::CPrimitives::convertPrimitive()</a>, <a class="el" href="a05471.html#l00272">NLSOUND::CBackgroundSoundManager::loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00441">NLSOUND::CBackgroundSoundManager::loadEffectsFromPrimitives()</a>, <a class="el" href="a05471.html#l00410">NLSOUND::CBackgroundSoundManager::loadSamplesFromPrimitives()</a>, and <a class="el" href="a05471.html#l00334">NLSOUND::CBackgroundSoundManager::loadSoundsFromPrimitives()</a>. +<p> +<div class="fragment"><pre>00184 { +00185 <span class="keywordflow">return</span> _Children.size (); +00186 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_2" doxytag="NLLIGO::CPrimNode::getNumProperty" ></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> NLLIGO::IPrimitive::getNumProperty </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a num properties +<p> +Definition at line <a class="el" href="a06195.html#l01721">1721</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01722 { +01723 <span class="keywordflow">return</span> _Properties.size (); +01724 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_3" doxytag="NLLIGO::CPrimNode::getNumVector" ></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 <a class="el" href="a04558.html#a15">uint</a> NLLIGO::IPrimitive::getNumVector </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> [pure virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Implemented in <a class="el" href="a03125.html#NLLIGO_1_1CPrimPointd1">NLLIGO::CPrimPoint</a>, <a class="el" href="a03124.html#NLLIGO_1_1CPrimPathd1">NLLIGO::CPrimPath</a>, and <a class="el" href="a03129.html#NLLIGO_1_1CPrimZoned1">NLLIGO::CPrimZone</a>. +<p> +Referenced by <a class="el" href="a05471.html#l00334">NLSOUND::CBackgroundSoundManager::loadSoundsFromPrimitives()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_4" doxytag="NLLIGO::CPrimNode::getParent" ></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="a03123.html">IPrimitive</a>* NLLIGO::IPrimitive::getParent </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, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a child primitive +<p> +Definition at line <a class="el" href="a06196.html#l00199">199</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +<div class="fragment"><pre>00200 { +00201 <span class="keywordflow">return</span> _Parent; +00202 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_5" doxytag="NLLIGO::CPrimNode::getParent" ></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="a03123.html">IPrimitive</a>* NLLIGO::IPrimitive::getParent </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, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the parent primtive +<p> +Definition at line <a class="el" href="a06196.html#l00195">195</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a05903.html#l00242">NLLIGO::CLigoConfig::canBeChild()</a>, and <a class="el" href="a05903.html#l00367">NLLIGO::CLigoConfig::getPrimitiveClass()</a>. +<p> +<div class="fragment"><pre>00196 { +00197 <span class="keywordflow">return</span> _Parent; +00198 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_5" doxytag="NLLIGO::CPrimNode::getPrimVector" ></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 const <a class="el" href="a03127.html">CPrimVector</a>* NLLIGO::IPrimitive::getPrimVector </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> [pure virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Implemented in <a class="el" href="a03125.html#NLLIGO_1_1CPrimPointd3">NLLIGO::CPrimPoint</a>, <a class="el" href="a03124.html#NLLIGO_1_1CPrimPathd3">NLLIGO::CPrimPath</a>, and <a class="el" href="a03129.html#NLLIGO_1_1CPrimZoned3">NLLIGO::CPrimZone</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimNodea2" doxytag="NLLIGO::CPrimNode::getPrimVector" ></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 <a class="el" href="a03127.html">CPrimVector</a>* <a class="el" href="a03122.html#NLLIGO_1_1CPrimNodeo1">NLLIGO::CPrimNode::getPrimVector</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> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Implements <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_4">NLLIGO::IPrimitive</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_6" doxytag="NLLIGO::CPrimNode::getProperty" ></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::IPrimitive::getProperty </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>index</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::string & </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03131.html">IProperty</a> *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a properties by its index This is method (iterate a list) is slower than getPropertyByName (look up in a map). +<p> +Definition at line <a class="el" href="a06195.html#l01081">1081</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01082 { +01083 <span class="comment">// Look for the property</span> +01084 std::map<std::string, IProperty*>::iterator ite = _Properties.begin (); +01085 <span class="keywordflow">while</span> (ite != _Properties.end ()) +01086 { +01087 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a> == 0) +01088 { +01089 property_name = ite->first; +01090 result = ite->second; +01091 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01092 } +01093 <a class="code" href="a04223.html#a566">index</a>--; +01094 ite ++; +01095 } +01096 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getProperty : invalid index (index : %d, size : %d)."</span>, index, _Properties.size ()); +01097 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01098 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_7" doxytag="NLLIGO::CPrimNode::getProperty" ></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::IPrimitive::getProperty </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>index</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::string & </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03131.html">IProperty</a> *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a properties by its index This is method (iterate a list) is slower than getPropertyByName (look up in a map). +<p> +Definition at line <a class="el" href="a06195.html#l01060">1060</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01061 { +01062 <span class="comment">// Look for the property</span> +01063 std::map<std::string, IProperty*>::const_iterator ite = _Properties.begin (); +01064 <span class="keywordflow">while</span> (ite != _Properties.end ()) +01065 { +01066 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a> == 0) +01067 { +01068 property_name = ite->first; +01069 result = ite->second; +01070 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01071 } +01072 <a class="code" href="a04223.html#a566">index</a>--; +01073 ite ++; +01074 } +01075 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getProperty : invalid index (index : %d, size : %d)."</span>, index, _Properties.size ()); +01076 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01077 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_8" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> & </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a color property with its name. Return false if the property is not found or is not a string array property. +<p> +Definition at line <a class="el" href="a06195.html#l01218">1218</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00122">NLLIGO::CPropertyColor::Color</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>. +<p> +<div class="fragment"><pre>01219 { +01220 <span class="comment">// Get the property</span> +01221 <a class="code" href="a03131.html">IProperty</a> *prop; +01222 <span class="keywordflow">if</span> (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (property_name, prop)) +01223 { +01224 <span class="keyword">const</span> CPropertyColor *colorProp = dynamic_cast<const CPropertyColor *> (prop); +01225 <span class="keywordflow">if</span> (colorProp) +01226 { +01227 result = colorProp->Color; +01228 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01229 } +01230 <span class="keywordflow">else</span> +01231 { +01232 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getPropertyByName : property (%s) in not a color."</span>, property_name); +01233 } +01234 } +01235 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01236 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_9" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const std::vector< std::string > *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a string array property with its name. Return false if the property is not found or is not a string array property. +<p> +Definition at line <a class="el" href="a06195.html#l01196">1196</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a06196.html#l00107">NLLIGO::CPropertyStringArray::StringArray</a>. +<p> +<div class="fragment"><pre>01197 { +01198 <span class="comment">// Get the property</span> +01199 <a class="code" href="a03131.html">IProperty</a> *prop; +01200 <span class="keywordflow">if</span> (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (property_name, prop)) +01201 { +01202 <span class="keyword">const</span> <a class="code" href="a03133.html">CPropertyStringArray</a> *strProp = dynamic_cast<const CPropertyStringArray *> (prop); +01203 <span class="keywordflow">if</span> (strProp) +01204 { +01205 result = &(strProp-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>); +01206 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01207 } +01208 <span class="keywordflow">else</span> +01209 { +01210 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getPropertyByName : property (%s) in not a string."</span>, property_name); +01211 } +01212 } +01213 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01214 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_10" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::string & </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a string property with its name. Return false if the property is not found or is not a string property. +<p> +Definition at line <a class="el" href="a06195.html#l01152">1152</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a06196.html#l00088">NLLIGO::CPropertyString::String</a>. +<p> +<div class="fragment"><pre>01153 { +01154 <span class="comment">// Get the property</span> +01155 <span class="keyword">const</span> <a class="code" href="a03131.html">IProperty</a> *prop; +01156 <span class="keywordflow">if</span> (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (property_name, prop)) +01157 { +01158 <span class="keyword">const</span> <a class="code" href="a03132.html">CPropertyString</a> *strProp = dynamic_cast<const CPropertyString *> (prop); +01159 <span class="keywordflow">if</span> (strProp) +01160 { +01161 result = strProp-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a>; +01162 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01163 } +01164 <span class="keywordflow">else</span> +01165 { +01166 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getPropertyByName : property (%s) in not a string."</span>, property_name); +01167 } +01168 } +01169 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01170 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_11" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< std::string > *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a string array property with its name. Return false if the property is not found or is not a string array property. +<p> +Definition at line <a class="el" href="a06195.html#l01174">1174</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a06196.html#l00107">NLLIGO::CPropertyStringArray::StringArray</a>. +<p> +<div class="fragment"><pre>01175 { +01176 <span class="comment">// Get the property</span> +01177 <a class="code" href="a03131.html">IProperty</a> *prop; +01178 <span class="keywordflow">if</span> (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (property_name, prop)) +01179 { +01180 <a class="code" href="a03133.html">CPropertyStringArray</a> *strProp = dynamic_cast<CPropertyStringArray *> (prop); +01181 <span class="keywordflow">if</span> (strProp) +01182 { +01183 result = &(strProp-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>); +01184 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01185 } +01186 <span class="keywordflow">else</span> +01187 { +01188 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getPropertyByName : property (%s) in not a string."</span>, property_name); +01189 } +01190 } +01191 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01192 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_12" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::string *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a string property with its name. Return false if the property is not found or is not a string property. +<p> +Definition at line <a class="el" href="a06195.html#l01130">1130</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a06196.html#l00088">NLLIGO::CPropertyString::String</a>. +<p> +<div class="fragment"><pre>01131 { +01132 <span class="comment">// Get the property</span> +01133 <a class="code" href="a03131.html">IProperty</a> *prop; +01134 <span class="keywordflow">if</span> (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (property_name, prop)) +01135 { +01136 <a class="code" href="a03132.html">CPropertyString</a> *strProp = dynamic_cast<CPropertyString *> (prop); +01137 <span class="keywordflow">if</span> (strProp) +01138 { +01139 result = &(strProp-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a>); +01140 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01141 } +01142 <span class="keywordflow">else</span> +01143 { +01144 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::getPropertyByName : property (%s) in not a string."</span>, property_name); +01145 } +01146 } +01147 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01148 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_13" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03131.html">IProperty</a> *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a property with its name +<p> +Definition at line <a class="el" href="a06195.html#l01116">1116</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>. +<p> +<div class="fragment"><pre>01117 { +01118 <span class="comment">// Look for the property</span> +01119 std::map<std::string, IProperty*>::const_iterator ite = _Properties.find (property_name); +01120 <span class="keywordflow">if</span> (ite != _Properties.end ()) +01121 { +01122 result = ite->second; +01123 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01124 } +01125 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01126 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_14" doxytag="NLLIGO::CPrimNode::getPropertyByName" ></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::IPrimitive::getPropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname" nowrap> <em>property_name</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03131.html">IProperty</a> *& </td> + <td class="mdname" nowrap> <em>result</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get a property with its name +<p> +Definition at line <a class="el" href="a06195.html#l01102">1102</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>. +<p> +Referenced by <a class="el" href="a06203.html#l00097">NLLIGO::CPrimitiveConfigurations::belong()</a>, <a class="el" href="a05903.html#l00242">NLLIGO::CLigoConfig::canBeChild()</a>, <a class="el" href="a05903.html#l00286">NLLIGO::CLigoConfig::canBeRoot()</a>, <a class="el" href="a06195.html#l01910">NLLIGO::CPrimitives::convertPrimitive()</a>, <a class="el" href="a05903.html#l00367">NLLIGO::CLigoConfig::getPrimitiveClass()</a>, <a class="el" href="a05903.html#l00188">NLLIGO::CLigoConfig::getPrimitiveColor()</a>, <a class="el" href="a06195.html#l01130">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05903.html#l00224">NLLIGO::CLigoConfig::isPrimitiveDeletable()</a>, <a class="el" href="a05903.html#l00206">NLLIGO::CLigoConfig::isPrimitiveLinked()</a>, <a class="el" href="a05471.html#l00272">NLSOUND::CBackgroundSoundManager::loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00441">NLSOUND::CBackgroundSoundManager::loadEffectsFromPrimitives()</a>, <a class="el" href="a05471.html#l00410">NLSOUND::CBackgroundSoundManager::loadSamplesFromPrimitives()</a>, <a class="el" href="a05471.html#l00334">NLSOUND::CBackgroundSoundManager::loadSoundsFromPrimitives()</a>, <a class="el" href="a06195.html#l01396">NLLIGO::IPrimitive::read()</a>, and <a class="el" href="a06201.html#l00599">NLLIGO::CPrimitiveClass::CParameter::translateAutoname()</a>. +<p> +<div class="fragment"><pre>01103 { +01104 <span class="comment">// Look for the property</span> +01105 std::map<std::string, IProperty*>::const_iterator ite = _Properties.find (property_name); +01106 <span class="keywordflow">if</span> (ite != _Properties.end ()) +01107 { +01108 result = ite->second; +01109 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01110 } +01111 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01112 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_6" doxytag="NLLIGO::CPrimNode::insertChild" ></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::IPrimitive::insertChild </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03123.html">IPrimitive</a> * </td> + <td class="mdname" nowrap> <em>primitive</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>index</em> = AtTheEnd</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Insert a child primitive before the index. The pointer will be deleted by the parent primitive using the ::delete operator. return false if the index is invalid +<p> +Definition at line <a class="el" href="a06195.html#l01349">1349</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00320">NLLIGO::IPrimitive::_Parent</a>, <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew1">NLLIGO::IPrimitive::AtTheEnd</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06195.html#l00984">NLLIGO::IPrimitive::updateChildId()</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01839">NLLIGO::CPrimitives::convertAddPrimitive()</a>, <a class="el" href="a06195.html#l01910">NLLIGO::CPrimitives::convertPrimitive()</a>, and <a class="el" href="a06195.html#l01396">NLLIGO::IPrimitive::read()</a>. +<p> +<div class="fragment"><pre>01350 { +01351 <span class="comment">// At the end ?</span> +01352 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a> == <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew1">AtTheEnd</a>) +01353 <a class="code" href="a04223.html#a566">index</a> = _Children.size (); +01354 +01355 <span class="comment">// Index valid ?</span> +01356 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a>>_Children.size ()) +01357 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01358 +01359 <span class="comment">// Insert</span> +01360 _Children.insert (_Children.begin () + <a class="code" href="a04223.html#a566">index</a>, primitive); +01361 +01362 <span class="comment">// Update child id</span> +01363 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_20">updateChildId</a> (index); +01364 +01365 <span class="comment">// Link to the parent</span> +01366 primitive->_Parent = <span class="keyword">this</span>; +01367 +01368 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01369 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimNodea3" doxytag="NLLIGO::CPrimNode::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::CPrimNode::read </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">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>filename</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>version</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02756.html">CLigoConfig</a> & </td> + <td class="mdname" nowrap> <em>config</em></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> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Reimplemented from <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_15">NLLIGO::IPrimitive</a>. +<p> +Definition at line <a class="el" href="a06195.html#l00370">370</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00371 { +00372 <span class="keywordflow">return</span> IPrimitive::read (xmlNode, filename, version, config); +00373 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_10" doxytag="NLLIGO::CPrimNode::removeChild" ></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::IPrimitive::removeChild </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>childId</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove a child primitive +<p> +Definition at line <a class="el" href="a06195.html#l01319">1319</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06195.html#l00984">NLLIGO::IPrimitive::updateChildId()</a>. +<p> +<div class="fragment"><pre>01320 { +01321 <span class="keywordflow">if</span> (childId < _Children.size ()) +01322 { +01323 <span class="keyword">delete</span> _Children[childId]; +01324 _Children.erase (_Children.begin()+childId); +01325 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_20">updateChildId</a> (childId); +01326 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01327 } +01328 <span class="keywordflow">else</span> +01329 { +01330 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::removeChild : invalid index (index : %d, size %d)."</span>, childId, _Children.size ()); +01331 } +01332 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01333 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_11" doxytag="NLLIGO::CPrimNode::removeChildren" ></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::IPrimitive::removeChildren </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove all children primitives +<p> +Definition at line <a class="el" href="a06195.html#l01337">1337</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01959">NLLIGO::CPrimitives::convert()</a>, <a class="el" href="a06195.html#l00994">NLLIGO::IPrimitive::operator=()</a>, <a class="el" href="a06195.html#l01759">NLLIGO::CPrimitives::read()</a>, and <a class="el" href="a06195.html#l01373">NLLIGO::IPrimitive::~IPrimitive()</a>. +<p> +<div class="fragment"><pre>01338 { +01339 <span class="comment">// Erase children</span> +01340 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<_Children.size (); i++) +01341 { +01342 <span class="keyword">delete</span> _Children[i]; +01343 } +01344 _Children.clear (); +01345 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_16" doxytag="NLLIGO::CPrimNode::removeProperties" ></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::IPrimitive::removeProperties </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove all the properties +<p> +Definition at line <a class="el" href="a06195.html#l01274">1274</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01959">NLLIGO::CPrimitives::convert()</a>, <a class="el" href="a06195.html#l00994">NLLIGO::IPrimitive::operator=()</a>, <a class="el" href="a06195.html#l01759">NLLIGO::CPrimitives::read()</a>, and <a class="el" href="a06195.html#l01373">NLLIGO::IPrimitive::~IPrimitive()</a>. +<p> +<div class="fragment"><pre>01275 { +01276 std::map<std::string, IProperty*>::iterator ite = _Properties.begin (); +01277 <span class="keywordflow">while</span> (ite != _Properties.end ()) +01278 { +01279 <span class="keyword">delete</span> ite->second; +01280 ite++; +01281 } +01282 _Properties.clear (); +01283 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_17" doxytag="NLLIGO::CPrimNode::removeProperty" ></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::IPrimitive::removeProperty </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>index</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove a property This is method (iterate a list) is slower than removePropertyByName (look up in a map). +<p> +Definition at line <a class="el" href="a06195.html#l01240">1240</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01241 { +01242 <span class="comment">// Look for the property</span> +01243 std::map<std::string, IProperty*>::iterator ite = _Properties.begin (); +01244 <span class="keywordflow">while</span> (ite != _Properties.end ()) +01245 { +01246 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a> == 0) +01247 { +01248 _Properties.erase (ite); +01249 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01250 } +01251 <a class="code" href="a04223.html#a566">index</a>--; +01252 ite ++; +01253 } +01254 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"NLLIGO::IPrimitive::removeProperty : invalid index (index : %d, size : %d)."</span>, index, _Properties.size ()); +01255 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01256 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_18" doxytag="NLLIGO::CPrimNode::removePropertyByName" ></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::IPrimitive::removePropertyByName </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>property_name</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Remove a property by its name +<p> +Definition at line <a class="el" href="a06195.html#l01260">1260</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>. +<p> +<div class="fragment"><pre>01261 { +01262 <span class="comment">// Look for the property</span> +01263 std::map<std::string, IProperty*>::iterator ite = _Properties.find (property_name); +01264 <span class="keywordflow">if</span> (ite != _Properties.end ()) +01265 { +01266 _Properties.erase (ite); +01267 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01268 } +01269 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01270 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_19" doxytag="NLLIGO::CPrimNode::write" ></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::IPrimitive::write </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">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>filename</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a property If the property already exist, the method does nothing and returns false. The pointer will be deleted by the primitive using the ::delete operator. +<p> +Reimplemented in <a class="el" href="a03125.html#NLLIGO_1_1CPrimPointd5">NLLIGO::CPrimPoint</a>, <a class="el" href="a03124.html#NLLIGO_1_1CPrimPathd5">NLLIGO::CPrimPath</a>, and <a class="el" href="a03129.html#NLLIGO_1_1CPrimZoned5">NLLIGO::CPrimZone</a>. +<p> +Definition at line <a class="el" href="a06195.html#l01627">1627</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">NLLIGO::IPrimitive::_Properties</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06196.html#l00122">NLLIGO::CPropertyColor::Color</a>, <a class="el" href="a06196.html#l00163">NLLIGO::IPrimitive::Expanded</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a06196.html#l00088">NLLIGO::CPropertyString::String</a>, <a class="el" href="a06196.html#l00107">NLLIGO::CPropertyStringArray::StringArray</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01628 { +01629 <span class="comment">// Save the expanded flag</span> +01630 <span class="keywordflow">if</span> (!<a class="code" href="a03123.html#NLLIGO_1_1IPrimitiveo0">Expanded</a>) +01631 xmlSetProp (xmlNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"EXPANDED"</span>, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"false"</span>); +01632 +01633 <span class="comment">// Set the type</span> +01634 xmlSetProp (xmlNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"TYPE"</span>, (<span class="keyword">const</span> xmlChar*)(const_cast<IPrimitive*> (<span class="keyword">this</span>)->getClassName ().c_str ())); +01635 +01636 <span class="comment">// Save the properties</span> +01637 std::map<std::string, IProperty*>::const_iterator ite = _Properties.begin (); +01638 <span class="keywordflow">while</span> (ite != _Properties.end ()) +01639 { +01640 <span class="comment">// Not a default property ?</span> +01641 <span class="keywordflow">if</span> (!ite->second->Default) +01642 { +01643 <span class="comment">// Create new nodes</span> +01644 xmlNodePtr propNode = xmlNewChild ( xmlNode, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"PROPERTY"</span>, NULL); +01645 xmlNodePtr nameNode = xmlNewChild ( propNode, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"NAME"</span>, NULL); +01646 xmlNodePtr textNode = xmlNewText ((<span class="keyword">const</span> xmlChar *)(ite->first.c_str ())); +01647 xmlAddChild (nameNode, textNode); +01648 +01649 <span class="comment">// Type</span> +01650 <span class="keyword">const</span> <a class="code" href="a03132.html">CPropertyString</a> *str = dynamic_cast<const CPropertyString *> (ite->second); +01651 <span class="keywordflow">if</span> (str) +01652 { +01653 <span class="comment">// Set the type</span> +01654 xmlSetProp (propNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"TYPE"</span>, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"string"</span>); +01655 +01656 <span class="comment">// Create new nodes</span> +01657 xmlNodePtr stringNode = xmlNewChild ( propNode, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"STRING"</span>, NULL); +01658 xmlNodePtr textNode = xmlNewText ((<span class="keyword">const</span> xmlChar *)(str-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a>.c_str ())); +01659 xmlAddChild (stringNode, textNode); +01660 } +01661 <span class="keywordflow">else</span> +01662 { +01663 <span class="comment">// Should be an array</span> +01664 <span class="keyword">const</span> <a class="code" href="a03133.html">CPropertyStringArray</a> *array = dynamic_cast<const CPropertyStringArray *> (ite->second); +01665 <span class="keywordflow">if</span> (array) +01666 { +01667 <span class="comment">// Set the type</span> +01668 xmlSetProp (propNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"TYPE"</span>, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"string_array"</span>); +01669 +01670 <span class="comment">// For each strings in the array</span> +01671 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<array-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>.size (); i++) +01672 { +01673 <span class="comment">// Create new nodes</span> +01674 xmlNodePtr stringNode = xmlNewChild ( propNode, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"STRING"</span>, NULL); +01675 xmlNodePtr textNode = xmlNewText ((<span class="keyword">const</span> xmlChar *)(array-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>[i].c_str ())); +01676 xmlAddChild (stringNode, textNode); +01677 } +01678 } +01679 <span class="keywordflow">else</span> +01680 { +01681 <span class="comment">// Should be a color</span> +01682 <span class="keyword">const</span> CPropertyColor *color = safe_cast<const CPropertyColor *> (ite->second); +01683 +01684 <span class="comment">// Set the type</span> +01685 xmlSetProp (propNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"TYPE"</span>, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"color"</span>); +01686 +01687 <span class="comment">// Create new nodes</span> +01688 xmlNodePtr colorNode = xmlNewChild ( propNode, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"COLOR"</span>, NULL); +01689 xmlSetProp (colorNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"R"</span>, (<span class="keyword">const</span> xmlChar*)toString (color->Color.R).c_str ()); +01690 xmlSetProp (colorNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"G"</span>, (<span class="keyword">const</span> xmlChar*)toString (color->Color.G).c_str ()); +01691 xmlSetProp (colorNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"B"</span>, (<span class="keyword">const</span> xmlChar*)toString (color->Color.B).c_str ()); +01692 xmlSetProp (colorNode, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"A"</span>, (<span class="keyword">const</span> xmlChar*)toString (color->Color.A).c_str ()); +01693 } +01694 } +01695 } +01696 +01697 ite++; +01698 } +01699 +01700 <span class="comment">// Save the children</span> +01701 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<_Children.size (); i++) +01702 { +01703 <span class="comment">// New node</span> +01704 xmlNodePtr childNode = xmlNewChild ( xmlNode, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"CHILD"</span>, NULL); +01705 +01706 <span class="comment">// Write it</span> +01707 _Children[i]->write (childNode, filename); +01708 } +01709 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLLIGO_1_1IPrimitiveo0" doxytag="NLLIGO::CPrimNode::Expanded" ></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 <a class="el" href="a03123.html#NLLIGO_1_1IPrimitiveo0">NLLIGO::IPrimitive::Expanded</a><code> [inherited]</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="a06196.html#l00163">163</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l00994">NLLIGO::IPrimitive::operator=()</a>, <a class="el" href="a06195.html#l01396">NLLIGO::IPrimitive::read()</a>, and <a class="el" href="a06195.html#l01627">NLLIGO::IPrimitive::write()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimNodeo1" doxytag="NLLIGO::CPrimNode::getPrimVector" ></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="a03127.html">CPrimVector</a> * <a class="el" href="a03122.html#NLLIGO_1_1CPrimNodeo1">NLLIGO::CPrimNode::getPrimVector</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l00391">391</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +<div class="fragment"><pre>00392 { +00393 <span class="keywordflow">return</span> NULL; +00394 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitiveo1" doxytag="NLLIGO::CPrimNode::Layer" ></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="a03123.html#NLLIGO_1_1IPrimitiveo1">NLLIGO::IPrimitive::Layer</a><code> [inherited]</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="a06196.html#l00159">159</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01910">NLLIGO::CPrimitives::convertPrimitive()</a>, and <a class="el" href="a06195.html#l00994">NLLIGO::IPrimitive::operator=()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitiveo2" doxytag="NLLIGO::CPrimNode::Name" ></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="a03123.html#NLLIGO_1_1IPrimitiveo2">NLLIGO::IPrimitive::Name</a><code> [inherited]</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="a06196.html#l00160">160</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01839">NLLIGO::CPrimitives::convertAddPrimitive()</a>, and <a class="el" href="a06195.html#l00994">NLLIGO::IPrimitive::operator=()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06196.html">primitive.h</a><li><a class="el" href="a06195.html">primitive.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 12:49:08 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> |