diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03123.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a03123.html | 2385 |
1 files changed, 2385 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03123.html b/docs/doxygen/nel/a03123.html new file mode 100644 index 00000000..ef525db6 --- /dev/null +++ b/docs/doxygen/nel/a03123.html @@ -0,0 +1,2385 @@ +<!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::IPrimitive 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::IPrimitive Class Reference</h1><code>#include <<a class="el" href="a06196.html">primitive.h</a>></code> +<p> +<p>Inheritance diagram for NLLIGO::IPrimitive: +<p><center><img src="a03123.png" usemap="#NLLIGO::IPrimitive_map" border="0" alt=""></center> +<map name="NLLIGO::IPrimitive_map"> +<area href="a02540.html" alt="NLMISC::IClassable" shape="rect" coords="205,0,332,24"> +<area href="a03122.html" alt="NLLIGO::CPrimNode" shape="rect" coords="0,112,127,136"> +<area href="a03124.html" alt="NLLIGO::CPrimPath" shape="rect" coords="137,112,264,136"> +<area href="a03125.html" alt="NLLIGO::CPrimPoint" shape="rect" coords="274,112,401,136"> +<area href="a03129.html" alt="NLLIGO::CPrimZone" shape="rect" coords="411,112,538,136"> +</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>virtual <a class="el" href="a03123.html">IPrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_1">copy</a> () const=0</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 <a class="el" href="a03127.html">CPrimVector</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_4">getPrimVector</a> ()=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>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_15">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 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 class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_20">updateChildId</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><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_21">_ChildId</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03123.html">IPrimitive</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03123.html">IPrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_23">_Parent</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::map< std::string, <a class="el" href="a03131.html">IProperty</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a></td></tr> + +<tr><td colspan=2><br><h2>Hierarchy</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_1IPrimitivez1899_0">getChild</a> (<a class="el" href="a03123.html">IPrimitive</a> *&result, <a class="el" href="a04558.html#a15">uint</a> childId)</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_1IPrimitivez1899_1">getChild</a> (const <a class="el" href="a03123.html">IPrimitive</a> *&result, <a class="el" href="a04558.html#a15">uint</a> childId) 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_1IPrimitivez1899_2">getChildId</a> (<a class="el" href="a04558.html#a15">uint</a> &childId, const <a class="el" href="a03123.html">IPrimitive</a> *child) const </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_1IPrimitivez1899_3">getNumChildren</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03123.html">IPrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1899_4">getParent</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03123.html">IPrimitive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1899_5">getParent</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_1IPrimitivez1899_6">insertChild</a> (<a class="el" href="a03123.html">IPrimitive</a> *primitive, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>=AtTheEnd)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1899_7">IPrimitive</a> (const <a class="el" href="a03123.html">IPrimitive</a> &node)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1899_8">IPrimitive</a> ()</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_1IPrimitivez1899_9">operator=</a> (const <a class="el" href="a03123.html">IPrimitive</a> &node)</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_1IPrimitivez1899_10">removeChild</a> (<a class="el" href="a04558.html#a15">uint</a> childId)</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_1IPrimitivez1899_11">removeChildren</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1899_12">~IPrimitive</a> ()</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 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 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>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::IPrimitive::@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 + </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>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_8" doxytag="NLLIGO::IPrimitive::IPrimitive" ></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"> NLLIGO::IPrimitive::IPrimitive </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]</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#l00172">172</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +<div class="fragment"><pre>00173 { +00174 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_23">_Parent</a> = NULL; +00175 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_12" doxytag="NLLIGO::IPrimitive::~IPrimitive" ></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"> NLLIGO::IPrimitive::~<a class="el" href="a03123.html">IPrimitive</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> +Get a child primitive +<p> +Definition at line <a class="el" href="a06195.html#l01373">1373</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01337">removeChildren()</a>, and <a class="el" href="a06195.html#l01274">removeProperties()</a>. +<p> +<div class="fragment"><pre>01374 { +01375 <span class="comment">// Remove children</span> +01376 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_11">removeChildren</a> (); +01377 +01378 <span class="comment">// Erase properties</span> +01379 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_16">removeProperties</a> (); +01380 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_7" doxytag="NLLIGO::IPrimitive::IPrimitive" ></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"> NLLIGO::IPrimitive::IPrimitive </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="mdname1" valign="top" nowrap> <em>node</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> +Get a child primitive +<p> +Definition at line <a class="el" href="a06195.html#l00976">976</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +<div class="fragment"><pre>00977 { +00978 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_23">_Parent</a> = NULL; +00979 IPrimitive::operator= (node); +00980 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_0" doxytag="NLLIGO::IPrimitive::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"></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">_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">read()</a>. +<p> +<div class="fragment"><pre>01385 { +01386 <span class="keywordtype">bool</span> inserted = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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_1IPrimitivez1900_1" doxytag="NLLIGO::IPrimitive::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"> virtual <a class="el" href="a03123.html">IPrimitive</a>* NLLIGO::IPrimitive::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> [pure 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> +Implemented in <a class="el" href="a03122.html#NLLIGO_1_1CPrimNodea0">NLLIGO::CPrimNode</a>, <a class="el" href="a03125.html#NLLIGO_1_1CPrimPointd0">NLLIGO::CPrimPoint</a>, <a class="el" href="a03124.html#NLLIGO_1_1CPrimPathd0">NLLIGO::CPrimPath</a>, and <a class="el" href="a03129.html#NLLIGO_1_1CPrimZoned0">NLLIGO::CPrimZone</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_0" doxytag="NLLIGO::IPrimitive::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"></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 < <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size ()) +01306 { +01307 result = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[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, <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.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::IPrimitive::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</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 < <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size ()) +01290 { +01291 result = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[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, <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.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::IPrimitive::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</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">_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::IPrimitive::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::IPrimitive::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]</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> <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size (); +00186 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_2" doxytag="NLLIGO::IPrimitive::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</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">_Properties</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>01722 { +01723 <span class="keywordflow">return</span> <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.size (); +01724 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_3" doxytag="NLLIGO::IPrimitive::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]</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::IPrimitive::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]</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> <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_23">_Parent</a>; +00202 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_5" doxytag="NLLIGO::IPrimitive::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]</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> <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_23">_Parent</a>; +00198 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_4" doxytag="NLLIGO::IPrimitive::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>* 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><code> [pure 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> +Implemented in <a class="el" href="a03122.html#NLLIGO_1_1CPrimNodea2">NLLIGO::CPrimNode</a>, <a class="el" href="a03125.html#NLLIGO_1_1CPrimPointd2">NLLIGO::CPrimPoint</a>, <a class="el" href="a03124.html#NLLIGO_1_1CPrimPathd2">NLLIGO::CPrimPath</a>, and <a class="el" href="a03129.html#NLLIGO_1_1CPrimZoned2">NLLIGO::CPrimZone</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_5" doxytag="NLLIGO::IPrimitive::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]</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_1IPrimitivez1900_6" doxytag="NLLIGO::IPrimitive::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"></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">_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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.begin (); +01085 <span class="keywordflow">while</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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, <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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::IPrimitive::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</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">_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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.begin (); +01064 <span class="keywordflow">while</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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, <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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::IPrimitive::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</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">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::IPrimitive::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</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">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::IPrimitive::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</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">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::IPrimitive::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</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">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::IPrimitive::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</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">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::IPrimitive::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</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">_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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.find (property_name); +01120 <span class="keywordflow">if</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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::IPrimitive::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</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">_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">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">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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.find (property_name); +01106 <span class="keywordflow">if</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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::IPrimitive::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"></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">_Parent</a>, <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivew0NLLIGO_1_1IPrimitivew1">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">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">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> = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size (); +01354 +01355 <span class="comment">// Index valid ?</span> +01356 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a>><a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size ()) +01357 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01358 +01359 <span class="comment">// Insert</span> +01360 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.insert (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.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_1IPrimitivez1899_9" doxytag="NLLIGO::IPrimitive::operator=" ></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::operator= </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="mdname1" valign="top" nowrap> <em>node</em> </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> +Get a child primitive +<p> +Definition at line <a class="el" href="a06195.html#l00994">994</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00317">_ChildId</a>, <a class="el" href="a06196.html#l00323">_Children</a>, <a class="el" href="a06196.html#l00326">_Properties</a>, <a class="el" href="a06196.html#l00163">Expanded</a>, <a class="el" href="a06196.html#l00159">Layer</a>, <a class="el" href="a06196.html#l00160">Name</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a06195.html#l01337">removeChildren()</a>, <a class="el" href="a06195.html#l01274">removeProperties()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00995 { +00996 <span class="comment">// Clean dest</span> +00997 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_11">removeChildren</a> (); +00998 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_16">removeProperties</a> (); +00999 +01000 <span class="comment">// copy deprecated param</span> +01001 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitiveo1">Layer</a> = node.Layer; +01002 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitiveo2">Name</a> = node.Name; +01003 +01004 <span class="comment">// Copy the flags</span> +01005 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitiveo0">Expanded</a> = node.Expanded; +01006 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_21">_ChildId</a> = node._ChildId; +01007 +01008 <span class="comment">// Copy children</span> +01009 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.resize (node._Children.size ()); +01010 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> child = 0; child < node._Children.size (); child++) +01011 { +01012 <span class="comment">// Copy the child</span> +01013 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[child] = node._Children[child]->copy (); +01014 +01015 <span class="comment">// Set the parent</span> +01016 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[child]->_Parent = <span class="keyword">this</span>; +01017 } +01018 +01019 <span class="comment">// Copy properties</span> +01020 std::map<std::string, IProperty*>::const_iterator ite = node._Properties.begin (); +01021 <span class="keywordflow">while</span> (ite != node._Properties.end ()) +01022 { +01023 <span class="comment">// Get the property</span> +01024 <a class="code" href="a03132.html">CPropertyString</a> *propString = dynamic_cast<CPropertyString *>(ite->second); +01025 <span class="keywordflow">if</span> (propString) +01026 { +01027 <span class="comment">// New property</span> +01028 <a class="code" href="a03132.html">CPropertyString</a> *newProp = <span class="keyword">new</span> <a class="code" href="a03132.html">CPropertyString</a> (); +01029 *newProp = *propString; +01030 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.insert (std::map<std::string, IProperty*>::value_type (ite->first, newProp)); +01031 } +01032 <span class="keywordflow">else</span> +01033 { +01034 <a class="code" href="a03133.html">CPropertyStringArray</a> *propStringArray = dynamic_cast<CPropertyStringArray *>(ite->second); +01035 <span class="keywordflow">if</span> (propStringArray) +01036 { +01037 <span class="comment">// New property</span> +01038 <a class="code" href="a03133.html">CPropertyStringArray</a> *newProp = <span class="keyword">new</span> <a class="code" href="a03133.html">CPropertyStringArray</a> (); +01039 *newProp = *propStringArray; +01040 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.insert (std::map<std::string, IProperty*>::value_type (ite->first, newProp)); +01041 } +01042 <span class="keywordflow">else</span> +01043 { +01044 CPropertyColor *propColor = dynamic_cast<CPropertyColor *>(ite->second); +01045 <a class="code" href="a04199.html#a9">nlverify</a> (propColor); +01046 +01047 <span class="comment">// New property</span> +01048 CPropertyColor *newProp = <span class="keyword">new</span> CPropertyColor (); +01049 *newProp = *propColor; +01050 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.insert (std::map<std::string, IProperty*>::value_type (ite->first, newProp)); +01051 } +01052 } +01053 +01054 ite++; +01055 } +01056 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_15" doxytag="NLLIGO::IPrimitive::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::IPrimitive::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 in <a class="el" href="a03122.html#NLLIGO_1_1CPrimNodea3">NLLIGO::CPrimNode</a>, <a class="el" href="a03125.html#NLLIGO_1_1CPrimPointd4">NLLIGO::CPrimPoint</a>, <a class="el" href="a03124.html#NLLIGO_1_1CPrimPathd4">NLLIGO::CPrimPath</a>, and <a class="el" href="a03129.html#NLLIGO_1_1CPrimZoned4">NLLIGO::CPrimZone</a>. +<p> +Definition at line <a class="el" href="a06195.html#l01396">1396</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00326">_Properties</a>, <a class="el" href="a06195.html#l01384">addPropertyByName()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a06196.html#l00070">NLLIGO::IProperty::Default</a>, <a class="el" href="a06196.html#l00163">Expanded</a>, <a class="el" href="a06195.html#l00184">NLLIGO::GetContentString()</a>, <a class="el" href="a06201.html#l00694">NLLIGO::CPrimitiveClass::CParameter::getDefaultValue()</a>, <a class="el" href="a06195.html#l00162">NLLIGO::GetNodeString()</a>, <a class="el" href="a05903.html#l00367">NLLIGO::CLigoConfig::getPrimitiveClass()</a>, <a class="el" href="a06195.html#l01102">getPropertyByName()</a>, <a class="el" href="a06195.html#l00089">NLLIGO::GetPropertyString()</a>, <a class="el" href="a06195.html#l01349">insertChild()</a>, <a class="el" href="a06202.html#l00125">NLLIGO::CPrimitiveClass::CInitParameters::Name</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a06202.html#l00201">NLLIGO::CPrimitiveClass::Parameters</a>, <a class="el" href="a05981.html#l00099">sint32</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="a03111.html#NLLIGO_1_1CPrimitiveClass_1_1CParametero11">NLLIGO::CPrimitiveClass::CParameter::Type</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06195.html#l00057">NLLIGO::XMLError()</a>. +<p> +<div class="fragment"><pre>01397 { +01398 <span class="comment">// Erase old properties</span> +01399 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.clear (); +01400 +01401 <span class="comment">// Read the expanded flag</span> +01402 string expanded; +01403 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitiveo0">Expanded</a> = <span class="keyword">true</span>; +01404 <span class="keywordflow">if</span> (CIXml::getPropertyString (expanded, xmlNode, <span class="stringliteral">"EXPANDED"</span>)) +01405 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitiveo0">Expanded</a> = (expanded != <span class="stringliteral">"false"</span>); +01406 +01407 <span class="comment">// Read the properties</span> +01408 xmlNodePtr propNode; +01409 propNode = CIXml::getFirstChildNode (xmlNode, <span class="stringliteral">"PROPERTY"</span>); +01410 <span class="keywordflow">if</span> (propNode) +01411 { +01412 <span class="keywordflow">do</span> +01413 { +01414 <span class="comment">// Read the name</span> +01415 string name; +01416 <span class="keywordflow">if</span> (<a class="code" href="a05375.html#a10">GetNodeString</a> (name, filename, propNode, <span class="stringliteral">"NAME"</span>)) +01417 { +01418 <span class="comment">// Get the property type</span> +01419 string <a class="code" href="a04223.html#a581">type</a>; +01420 <span class="keywordflow">if</span> (<a class="code" href="a05375.html#a5">GetPropertyString</a> (type, filename, propNode, <span class="stringliteral">"TYPE"</span>)) +01421 { +01422 <span class="comment">// The property</span> +01423 <a class="code" href="a03131.html">IProperty</a> *property = NULL; +01424 +01425 <span class="comment">// Check the type</span> +01426 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a> == <span class="stringliteral">"string"</span>) +01427 { +01428 <span class="comment">// Create a new property</span> +01429 <a class="code" href="a03132.html">CPropertyString</a> *propertyString = <span class="keyword">new</span> <a class="code" href="a03132.html">CPropertyString</a>; +01430 property = propertyString; +01431 +01432 <span class="comment">// Read it</span> +01433 <span class="keywordflow">if</span> (!<a class="code" href="a05375.html#a10">GetNodeString</a> (propertyString->String, filename, propNode, <span class="stringliteral">"STRING"</span>)) +01434 { +01435 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01436 } +01437 } +01438 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a> == <span class="stringliteral">"string_array"</span>) +01439 { +01440 <span class="comment">// Create a new property</span> +01441 <a class="code" href="a03133.html">CPropertyStringArray</a> *propertyStringArray = <span class="keyword">new</span> <a class="code" href="a03133.html">CPropertyStringArray</a>; +01442 property = propertyStringArray; +01443 +01444 <span class="comment">// Read strings</span> +01445 xmlNodePtr stringNode; +01446 propertyStringArray-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>.reserve (CIXml::countChildren (propNode, <span class="stringliteral">"STRING"</span>)); +01447 stringNode = CIXml::getFirstChildNode (propNode, <span class="stringliteral">"STRING"</span>); +01448 <span class="keywordflow">if</span> (stringNode) +01449 { +01450 <span class="keywordflow">do</span> +01451 { +01452 <span class="comment">// Add the string</span> +01453 string content; +01454 <a class="code" href="a05375.html#a11">GetContentString</a> (content, filename, stringNode); +01455 propertyStringArray->StringArray.push_back (content); +01456 } +01457 <span class="keywordflow">while</span> ((stringNode = CIXml::getNextChildNode (stringNode, <span class="stringliteral">"STRING"</span>))); +01458 } +01459 } +01460 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a> == <span class="stringliteral">"color"</span>) +01461 { +01462 <span class="comment">// Create a new property</span> +01463 CPropertyColor *propertyColor= <span class="keyword">new</span> CPropertyColor; +01464 property = propertyColor; +01465 +01466 <span class="comment">// Read strings</span> +01467 xmlNodePtr colorNode; +01468 colorNode = CIXml::getFirstChildNode (xmlNode, <span class="stringliteral">"COLOR"</span>); +01469 string R, G, B, A; +01470 <span class="keywordflow">if</span> (<a class="code" href="a05375.html#a5">GetPropertyString</a> (R, filename, colorNode, <span class="stringliteral">"R"</span>) && +01471 <a class="code" href="a05375.html#a5">GetPropertyString</a> (G, filename, colorNode, <span class="stringliteral">"G"</span>) && +01472 <a class="code" href="a05375.html#a5">GetPropertyString</a> (B, filename, colorNode, <span class="stringliteral">"B"</span>) && +01473 <a class="code" href="a05375.html#a5">GetPropertyString</a> (A, filename, colorNode, <span class="stringliteral">"A"</span>)) +01474 { +01475 <a class="code" href="a04558.html#a10">sint32</a> sR=0, sG=0, sB=0, sA=255; +01476 sR = atoi (R.c_str ()); +01477 <a class="code" href="a05378.html#a374">clamp</a> (sR, 0, 255); +01478 sG = atoi (G.c_str ()); +01479 <a class="code" href="a05378.html#a374">clamp</a> (sG, 0, 255); +01480 sB = atoi (B.c_str ()); +01481 <a class="code" href="a05378.html#a374">clamp</a> (sB, 0, 255); +01482 sA = atoi (A.c_str ()); +01483 <a class="code" href="a05378.html#a374">clamp</a> (sR, 0, 255); +01484 propertyColor->Color.R = (<a class="code" href="a04558.html#a7">uint8</a>)sR; +01485 propertyColor->Color.G = (<a class="code" href="a04558.html#a7">uint8</a>)sG; +01486 propertyColor->Color.B = (<a class="code" href="a04558.html#a7">uint8</a>)sB; +01487 propertyColor->Color.A = (<a class="code" href="a04558.html#a7">uint8</a>)sA; +01488 } +01489 <span class="keywordflow">else</span> +01490 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01491 } +01492 +01493 <span class="comment">// Property found ?</span> +01494 <span class="keywordflow">if</span> (property == NULL) +01495 { +01496 <a class="code" href="a05375.html#a3">XMLError</a> (propNode, filename, <span class="stringliteral">"IPrimitive::read : Unknown property type (%s)"</span>, <a class="code" href="a04223.html#a581">type</a>.c_str ()); +01497 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01498 } +01499 +01500 <span class="comment">// Add it</span> +01501 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.insert (std::map<std::string, IProperty*>::value_type (name, property)); +01502 } +01503 <span class="keywordflow">else</span> +01504 { +01505 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01506 } +01507 } +01508 <span class="keywordflow">else</span> +01509 { +01510 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01511 } +01512 } +01513 <span class="keywordflow">while</span> ((propNode = CIXml::getNextChildNode (propNode, <span class="stringliteral">"PROPERTY"</span>))); +01514 } +01515 +01516 <span class="comment">// Get the primitive class</span> +01517 <span class="keyword">const</span> CPrimitiveClass *primitiveClass = config.getPrimitiveClass (*<span class="keyword">this</span>); +01518 <span class="keywordflow">if</span> (primitiveClass) +01519 { +01520 <span class="comment">// For each properties</span> +01521 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = primitiveClass->Parameters.size (); +01522 <a class="code" href="a04558.html#a15">uint</a> i; +01523 <span class="keywordflow">for</span> (i=0; i<<a class="code" href="a04223.html#a577">count</a>; i++) +01524 { +01525 <span class="keyword">const</span> CPrimitiveClass::CParameter &parameter = primitiveClass->Parameters[i]; +01526 +01527 <span class="comment">// Get the property</span> +01528 <a class="code" href="a03131.html">IProperty</a> *result; +01529 <span class="keywordflow">if</span> (!<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a> (parameter.Name.c_str(), result)) +01530 { +01531 <span class="comment">// Create the property</span> +01532 <span class="keywordflow">if</span> ((parameter.Type == CPrimitiveClass::CParameter::StringArray) || (parameter.Type == CPrimitiveClass::CParameter::ConstStringArray)) +01533 result = <span class="keyword">new</span> <a class="code" href="a03133.html">CPropertyStringArray</a>(); +01534 <span class="keywordflow">else</span> +01535 result = <span class="keyword">new</span> <a class="code" href="a03132.html">CPropertyString</a>(); +01536 <a class="code" href="a04199.html#a9">nlverify</a> (addPropertyByName (parameter.Name.c_str(), result)); +01537 } +01538 } +01539 +01540 <span class="comment">// Set the default values</span> +01541 <span class="keywordflow">for</span> (i=0; i<<a class="code" href="a04223.html#a577">count</a>; i++) +01542 { +01543 <span class="keyword">const</span> CPrimitiveClass::CParameter &parameter = primitiveClass->Parameters[i]; +01544 +01545 <a class="code" href="a03132.html">CPropertyString</a> *pString = NULL; +01546 <a class="code" href="a03133.html">CPropertyStringArray</a> *pStringArray = NULL; +01547 +01548 <a class="code" href="a03131.html">IProperty</a> *result; +01549 <a class="code" href="a04199.html#a9">nlverify</a> (getPropertyByName (parameter.Name.c_str(), result)); +01550 pString = dynamic_cast<CPropertyString*>(result); +01551 <span class="keywordflow">if</span> (!pString) +01552 pStringArray = dynamic_cast<CPropertyStringArray*>(result); +01553 +01554 <span class="comment">// Property have default values ?</span> +01555 <span class="keywordflow">if</span> (pString) +01556 { +01557 <span class="comment">// Empty string ?</span> +01558 <span class="keywordflow">if</span> (pString-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a>.empty()) +01559 { +01560 <span class="comment">// Set as default</span> +01561 pString-><a class="code" href="a03131.html#NLLIGO_1_1IPropertyo0">Default</a> = <span class="keyword">true</span>; +01562 parameter.getDefaultValue (pString-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a>, *<span class="keyword">this</span>, *primitiveClass); +01563 } +01564 } +01565 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pStringArray) +01566 { +01567 <span class="comment">// Empty string array ?</span> +01568 <span class="keywordflow">if</span> (pStringArray-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>.empty()) +01569 { +01570 <span class="comment">// Set as default</span> +01571 pStringArray-><a class="code" href="a03131.html#NLLIGO_1_1IPropertyo0">Default</a> = <span class="keyword">true</span>; +01572 parameter.getDefaultValue (pStringArray-><a class="code" href="a03133.html#NLLIGO_1_1CPropertyStringArrayo1">StringArray</a>, *<span class="keyword">this</span>, *primitiveClass); +01573 } +01574 } +01575 } +01576 } +01577 +01578 <span class="comment">// Read children</span> +01579 xmlNodePtr childNode; +01580 childNode = CIXml::getFirstChildNode (xmlNode, <span class="stringliteral">"CHILD"</span>); +01581 <span class="keywordflow">if</span> (childNode) +01582 { +01583 <span class="keywordflow">do</span> +01584 { +01585 <span class="comment">// Get the property class</span> +01586 string <a class="code" href="a04223.html#a581">type</a>; +01587 <span class="keywordflow">if</span> (<a class="code" href="a05375.html#a5">GetPropertyString</a> (type, filename, childNode, <span class="stringliteral">"TYPE"</span>)) +01588 { +01589 <span class="comment">// Primitive</span> +01590 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==<span class="stringliteral">"node"</span>) +01591 <a class="code" href="a04223.html#a581">type</a>=<span class="stringliteral">"CPrimNode"</span>; +01592 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==<span class="stringliteral">"point"</span>) +01593 <a class="code" href="a04223.html#a581">type</a>=<span class="stringliteral">"CPrimPoint"</span>; +01594 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==<span class="stringliteral">"path"</span>) +01595 <a class="code" href="a04223.html#a581">type</a>=<span class="stringliteral">"CPrimPath"</span>; +01596 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==<span class="stringliteral">"zone"</span>) +01597 <a class="code" href="a04223.html#a581">type</a>=<span class="stringliteral">"CPrimZone"</span>; +01598 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_8">IPrimitive</a> *primitive = static_cast<IPrimitive *> (CClassRegistry::create (type)); +01599 +01600 <span class="comment">// Primitive type not found ?</span> +01601 <span class="keywordflow">if</span> (primitive == NULL) +01602 { +01603 <a class="code" href="a05375.html#a3">XMLError</a> (childNode, filename, <span class="stringliteral">"IPrimitive::read : Unknown primitive type (%s)"</span>, <a class="code" href="a04223.html#a581">type</a>.c_str ()); +01604 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01605 } +01606 +01607 <span class="comment">// Read it</span> +01608 primitive->read (childNode, filename, version, config); +01609 +01610 <span class="comment">// Add it</span> +01611 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_6">insertChild</a> (primitive); +01612 } +01613 <span class="keywordflow">else</span> +01614 { +01615 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01616 } +01617 } +01618 <span class="keywordflow">while</span> ((childNode = CIXml::getNextChildNode (childNode, <span class="stringliteral">"CHILD"</span>))); +01619 } +01620 +01621 <span class="comment">// Done</span> +01622 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01623 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1899_10" doxytag="NLLIGO::IPrimitive::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></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">updateChildId()</a>. +<p> +<div class="fragment"><pre>01320 { +01321 <span class="keywordflow">if</span> (childId < <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size ()) +01322 { +01323 <span class="keyword">delete</span> <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[childId]; +01324 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.erase (<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.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, <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.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::IPrimitive::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></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">operator=()</a>, <a class="el" href="a06195.html#l01759">NLLIGO::CPrimitives::read()</a>, and <a class="el" href="a06195.html#l01373">~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<<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size (); i++) +01341 { +01342 <span class="keyword">delete</span> <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[i]; +01343 } +01344 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.clear (); +01345 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_16" doxytag="NLLIGO::IPrimitive::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></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">_Properties</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01959">NLLIGO::CPrimitives::convert()</a>, <a class="el" href="a06195.html#l00994">operator=()</a>, <a class="el" href="a06195.html#l01759">NLLIGO::CPrimitives::read()</a>, and <a class="el" href="a06195.html#l01373">~IPrimitive()</a>. +<p> +<div class="fragment"><pre>01275 { +01276 std::map<std::string, IProperty*>::iterator ite = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.begin (); +01277 <span class="keywordflow">while</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.end ()) +01278 { +01279 <span class="keyword">delete</span> ite->second; +01280 ite++; +01281 } +01282 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.clear (); +01283 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_17" doxytag="NLLIGO::IPrimitive::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></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">_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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.begin (); +01244 <span class="keywordflow">while</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.end ()) +01245 { +01246 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a> == 0) +01247 { +01248 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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, <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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::IPrimitive::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></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">_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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.find (property_name); +01264 <span class="keywordflow">if</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.end ()) +01265 { +01266 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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_20" doxytag="NLLIGO::IPrimitive::updateChildId" ></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::updateChildId </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> [private]</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#l00984">984</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a05646.html#l00225">index</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01349">insertChild()</a>, and <a class="el" href="a06195.html#l01319">removeChild()</a>. +<p> +<div class="fragment"><pre>00985 { +00986 <a class="code" href="a04558.html#a15">uint</a> i; +00987 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.size (); +00988 <span class="keywordflow">for</span> (i=<a class="code" href="a04223.html#a566">index</a>; i<<a class="code" href="a04223.html#a577">count</a>; i++) +00989 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[i]->_ChildId = i; +00990 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_19" doxytag="NLLIGO::IPrimitive::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]</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">_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">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 = <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.begin (); +01638 <span class="keywordflow">while</span> (ite != <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">_Properties</a>.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<<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>.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 <a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">_Children</a>[i]->write (childNode, filename); +01708 } +01709 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_21" doxytag="NLLIGO::IPrimitive::_ChildId" ></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="a03123.html#NLLIGO_1_1IPrimitivez1900_21">NLLIGO::IPrimitive::_ChildId</a><code> [private]</code> + </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="a06196.html#l00317">317</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01713">getChildId()</a>, and <a class="el" href="a06195.html#l00994">operator=()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_22" doxytag="NLLIGO::IPrimitive::_Children" ></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="a03123.html">IPrimitive</a>*> <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_22">NLLIGO::IPrimitive::_Children</a><code> [private]</code> + </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="a06196.html#l00323">323</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l00994">operator=()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_23" doxytag="NLLIGO::IPrimitive::_Parent" ></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>* <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_23">NLLIGO::IPrimitive::_Parent</a><code> [private]</code> + </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="a06196.html#l00320">320</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01349">insertChild()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitivez1900_24" doxytag="NLLIGO::IPrimitive::_Properties" ></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="a03131.html">IProperty</a>*> <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_24">NLLIGO::IPrimitive::_Properties</a><code> [private]</code> + </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="a06196.html#l00326">326</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01384">addPropertyByName()</a>, <a class="el" href="a06195.html#l01721">getNumProperty()</a>, <a class="el" href="a06195.html#l01060">getProperty()</a>, <a class="el" href="a06195.html#l01102">getPropertyByName()</a>, <a class="el" href="a06195.html#l00994">operator=()</a>, <a class="el" href="a06195.html#l01396">read()</a>, <a class="el" href="a06195.html#l01274">removeProperties()</a>, <a class="el" href="a06195.html#l01240">removeProperty()</a>, <a class="el" href="a06195.html#l01260">removePropertyByName()</a>, and <a class="el" href="a06195.html#l01627">write()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitiveo0" doxytag="NLLIGO::IPrimitive::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> + </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">operator=()</a>, <a class="el" href="a06195.html#l01396">read()</a>, and <a class="el" href="a06195.html#l01627">write()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitiveo1" doxytag="NLLIGO::IPrimitive::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> + </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">operator=()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1IPrimitiveo2" doxytag="NLLIGO::IPrimitive::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> + </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">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:52:39 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> |