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/a03117.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03117.html')
-rw-r--r-- | docs/doxygen/nel/a03117.html | 700 |
1 files changed, 700 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03117.html b/docs/doxygen/nel/a03117.html new file mode 100644 index 00000000..041ce475 --- /dev/null +++ b/docs/doxygen/nel/a03117.html @@ -0,0 +1,700 @@ +<!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::CPrimitives 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::CPrimitives Class Reference</h1><code>#include <<a class="el" href="a06196.html">primitive.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +This class is a ligo primitives set +<p> + +<p> +Definition at line <a class="el" href="a06196.html#l00520">520</a> of file <a class="el" href="a06196.html">primitive.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesa0">convert</a> (const <a class="el" href="a03126.html">CPrimRegion</a> &region)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesa1">CPrimitives</a> (const <a class="el" href="a03117.html">CPrimitives</a> &other)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesa2">CPrimitives</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03117.html">CPrimitives</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesa3">operator=</a> (const <a class="el" href="a03117.html">CPrimitives</a> &other)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesa4">read</a> (xmlNodePtr xmlNode, const char *<a class="el" href="a04560.html#a1">filename</a>, <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="a03117.html#NLLIGO_1_1CPrimitivesa5">write</a> (xmlNodePtr root, 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="a03117.html#NLLIGO_1_1CPrimitivesa6">write</a> (xmlDocPtr xmlNode, const char *<a class="el" href="a04560.html#a1">filename</a>) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesa7">~CPrimitives</a> ()</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03122.html">CPrimNode</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a></td></tr> + +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesd0">convertAddPrimitive</a> (<a class="el" href="a03123.html">IPrimitive</a> *child, const <a class="el" href="a03123.html">IPrimitive</a> *prim, bool hidden)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03117.html#NLLIGO_1_1CPrimitivesd1">convertPrimitive</a> (const <a class="el" href="a03123.html">IPrimitive</a> *prim, bool hidden)</td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa2" doxytag="NLLIGO::CPrimitives::CPrimitives" ></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::CPrimitives::CPrimitives </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> + +<p> +Definition at line <a class="el" href="a06195.html#l01730">1730</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +<div class="fragment"><pre>01731 { +01732 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a> = static_cast<CPrimNode *> (CClassRegistry::create (<span class="stringliteral">"CPrimNode"</span>)); +01733 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa1" doxytag="NLLIGO::CPrimitives::CPrimitives" ></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::CPrimitives::CPrimitives </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03117.html">CPrimitives</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>other</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01737">1737</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00535">RootNode</a>. +<p> +<div class="fragment"><pre>01738 { +01739 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a> = static_cast<CPrimNode *> (((IPrimitive*)other.RootNode)->copy ()); +01740 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa7" doxytag="NLLIGO::CPrimitives::~CPrimitives" ></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::CPrimitives::~<a class="el" href="a03117.html">CPrimitives</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></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01744">1744</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +<div class="fragment"><pre>01745 { +01746 <span class="keyword">delete</span> <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>; +01747 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa0" doxytag="NLLIGO::CPrimitives::convert" ></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::CPrimitives::convert </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03126.html">CPrimRegion</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>region</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01959">1959</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01910">convertPrimitive()</a>, <a class="el" href="a06195.html#l01337">NLLIGO::IPrimitive::removeChildren()</a>, <a class="el" href="a06195.html#l01274">NLLIGO::IPrimitive::removeProperties()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06196.html#l00508">NLLIGO::CPrimRegion::VHidePaths</a>, <a class="el" href="a06196.html#l00506">NLLIGO::CPrimRegion::VHidePoints</a>, <a class="el" href="a06196.html#l00507">NLLIGO::CPrimRegion::VHideZones</a>, <a class="el" href="a06196.html#l00504">NLLIGO::CPrimRegion::VPaths</a>, <a class="el" href="a06196.html#l00502">NLLIGO::CPrimRegion::VPoints</a>, and <a class="el" href="a06196.html#l00503">NLLIGO::CPrimRegion::VZones</a>. +<p> +<div class="fragment"><pre>01960 { +01961 <span class="comment">// Delete</span> +01962 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->removeChildren (); +01963 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->removeProperties (); +01964 +01965 <span class="comment">// For each primitives</span> +01966 <a class="code" href="a04558.html#a15">uint</a> i; +01967 <span class="keywordflow">for</span> (i=0; i<region.VPoints.size (); i++) +01968 { +01969 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesd1">convertPrimitive</a> (&(region.VPoints[i]), region.VHidePoints[i]); +01970 } +01971 <span class="keywordflow">for</span> (i=0; i<region.VPaths.size (); i++) +01972 { +01973 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesd1">convertPrimitive</a> (&(region.VPaths[i]), region.VHidePaths[i]); +01974 } +01975 <span class="keywordflow">for</span> (i=0; i<region.VZones.size (); i++) +01976 { +01977 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesd1">convertPrimitive</a> (&(region.VZones[i]), region.VHideZones[i]); +01978 } +01979 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesd0" doxytag="NLLIGO::CPrimitives::convertAddPrimitive" ></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::CPrimitives::convertAddPrimitive </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>child</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03123.html">IPrimitive</a> * </td> + <td class="mdname" nowrap> <em>prim</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>hidden</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01839">1839</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01384">NLLIGO::IPrimitive::addPropertyByName()</a>, <a class="el" href="a06195.html#l01349">NLLIGO::IPrimitive::insertChild()</a>, <a class="el" href="a06196.html#l00160">NLLIGO::IPrimitive::Name</a>, and <a class="el" href="a06196.html#l00088">NLLIGO::CPropertyString::String</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01910">convertPrimitive()</a>. +<p> +<div class="fragment"><pre>01840 { +01841 <span class="comment">// The primitve</span> +01842 IPrimitive *primitive = NULL; +01843 +01844 <span class="comment">// What kind of primitive ?</span> +01845 <span class="keyword">const</span> CPrimPoint *oldPoint = dynamic_cast<const CPrimPoint *>(prim); +01846 <span class="keywordflow">if</span> (oldPoint) +01847 { +01848 <span class="comment">// Create a primitive</span> +01849 CPrimPoint *point = static_cast<CPrimPoint *> (CClassRegistry::create (<span class="stringliteral">"CPrimPoint"</span>)); +01850 primitive = point; +01851 +01852 <span class="comment">// Copy it</span> +01853 *point = *oldPoint; +01854 } +01855 <span class="keywordflow">else</span> +01856 { +01857 <span class="comment">// Path ?</span> +01858 <span class="keyword">const</span> CPrimPath *oldPath = dynamic_cast<const CPrimPath *>(prim); +01859 <span class="keywordflow">if</span> (oldPath) +01860 { +01861 <span class="comment">// Create a primitive</span> +01862 CPrimPath *path = static_cast<CPrimPath *> (CClassRegistry::create (<span class="stringliteral">"CPrimPath"</span>)); +01863 primitive = path; +01864 +01865 <span class="comment">// Copy it</span> +01866 *path = *oldPath; +01867 } +01868 <span class="keywordflow">else</span> +01869 { +01870 <span class="keyword">const</span> CPrimZone *oldZone = safe_cast<const CPrimZone *>(prim); +01871 <span class="keywordflow">if</span> (oldZone) +01872 { +01873 <span class="comment">// Create a primitive</span> +01874 CPrimZone *zone = static_cast<CPrimZone *> (CClassRegistry::create (<span class="stringliteral">"CPrimZone"</span>)); +01875 primitive = zone; +01876 +01877 <span class="comment">// Copy it</span> +01878 *zone = *oldZone; +01879 } +01880 } +01881 } +01882 +01883 <span class="comment">// Primitive has been created ?</span> +01884 <span class="keywordflow">if</span> (primitive) +01885 { +01886 <span class="comment">// Create a property for the name</span> +01887 <a class="code" href="a03132.html">CPropertyString</a> *nameProp = <span class="keyword">new</span> <a class="code" href="a03132.html">CPropertyString</a>; +01888 nameProp-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a> = prim->Name; +01889 +01890 <span class="comment">// Add the property</span> +01891 primitive->addPropertyByName (<span class="stringliteral">"name"</span>, nameProp); +01892 +01893 <span class="comment">// The primitive is hidden ?</span> +01894 <span class="keywordflow">if</span> (hidden) +01895 { +01896 <span class="comment">// Create a property for hidden</span> +01897 nameProp = <span class="keyword">new</span> CPropertyString; +01898 +01899 <span class="comment">// Add the property</span> +01900 primitive->addPropertyByName (<span class="stringliteral">"hidden"</span>, nameProp); +01901 } +01902 +01903 <span class="comment">// Add the child</span> +01904 child->insertChild (primitive); +01905 } +01906 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesd1" doxytag="NLLIGO::CPrimitives::convertPrimitive" ></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::CPrimitives::convertPrimitive </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>prim</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>hidden</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01910">1910</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l01384">NLLIGO::IPrimitive::addPropertyByName()</a>, <a class="el" href="a06195.html#l01839">convertAddPrimitive()</a>, <a class="el" href="a06195.html#l01287">NLLIGO::IPrimitive::getChild()</a>, <a class="el" href="a06196.html#l00183">NLLIGO::IPrimitive::getNumChildren()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a06195.html#l01349">NLLIGO::IPrimitive::insertChild()</a>, <a class="el" href="a06196.html#l00159">NLLIGO::IPrimitive::Layer</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a06196.html#l00088">NLLIGO::CPropertyString::String</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01959">convert()</a>. +<p> +<div class="fragment"><pre>01911 { +01912 <span class="comment">// Look for the group</span> +01913 <a class="code" href="a04558.html#a15">uint</a> numChildren = <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->getNumChildren (); +01914 <a class="code" href="a04558.html#a15">uint</a> j; +01915 <span class="keywordflow">for</span> (j=0; j<numChildren; j++) +01916 { +01917 IPrimitive *child; +01918 <a class="code" href="a04199.html#a9">nlverify</a> (<a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->getChild (child, j)); +01919 <span class="keyword">const</span> <a class="code" href="a03131.html">IProperty</a> *prop; +01920 <span class="keywordflow">if</span> (child->getPropertyByName (<span class="stringliteral">"name"</span>, prop)) +01921 { +01922 <span class="comment">// Prop string</span> +01923 <span class="keyword">const</span> <a class="code" href="a03132.html">CPropertyString</a> *name = dynamic_cast<const CPropertyString *>(prop); +01924 <span class="keywordflow">if</span> (name) +01925 { +01926 <span class="comment">// This one ?</span> +01927 <span class="keywordflow">if</span> (name-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a> == prim->Layer) +01928 { +01929 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesd0">convertAddPrimitive</a> (child, prim, hidden); +01930 <span class="keywordflow">break</span>; +01931 } +01932 } +01933 } +01934 } +01935 +01936 <span class="comment">// Not found ?</span> +01937 <span class="keywordflow">if</span> (j==numChildren) +01938 { +01939 <span class="comment">// Create a node</span> +01940 CPrimNode *primNode = static_cast<CPrimNode *> (CClassRegistry::create (<span class="stringliteral">"CPrimNode"</span>)); +01941 +01942 <span class="comment">// Create a property for the layer</span> +01943 <a class="code" href="a03132.html">CPropertyString</a> *nameProp = <span class="keyword">new</span> <a class="code" href="a03132.html">CPropertyString</a>; +01944 nameProp-><a class="code" href="a03132.html#NLLIGO_1_1CPropertyStringo1">String</a> = prim->Layer; +01945 +01946 <span class="comment">// Add the property</span> +01947 primNode->addPropertyByName (<span class="stringliteral">"name"</span>, nameProp); +01948 +01949 <span class="comment">// Add the child</span> +01950 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->insertChild (primNode); +01951 +01952 <span class="comment">// Add the primitive</span> +01953 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesd0">convertAddPrimitive</a> (primNode, prim, hidden); +01954 } +01955 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa3" doxytag="NLLIGO::CPrimitives::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"> <a class="el" href="a03117.html">CPrimitives</a> & NLLIGO::CPrimitives::operator= </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03117.html">CPrimitives</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>other</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01751">1751</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06196.html#l00535">RootNode</a>. +<p> +<div class="fragment"><pre>01752 { +01753 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a> = static_cast<CPrimNode *> (((IPrimitive*)other.RootNode)->copy ()); +01754 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +01755 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa4" doxytag="NLLIGO::CPrimitives::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::CPrimitives::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="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"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01759">1759</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a06195.html#l00044">NLLIGO::Error()</a>, <a class="el" href="a06195.html#l00071">NLLIGO::GetFirstChildNode()</a>, <a class="el" href="a06195.html#l00089">NLLIGO::GetPropertyString()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06195.html#l00035">NLLIGO_PRIMITVE_VERSION</a>, <a class="el" href="a06195.html#l01337">NLLIGO::IPrimitive::removeChildren()</a>, <a class="el" href="a06195.html#l01274">NLLIGO::IPrimitive::removeProperties()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06195.html#l00057">NLLIGO::XMLError()</a>. +<p> +Referenced by <a class="el" href="a05471.html#l00618">NLSOUND::CBackgroundSoundManager::load()</a>. +<p> +<div class="fragment"><pre>01760 { +01761 <a class="code" href="a04199.html#a6">nlassert</a> (xmlNode); +01762 +01763 <span class="comment">// Clear the primitives</span> +01764 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->removeChildren (); +01765 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>->removeProperties (); +01766 +01767 <span class="comment">// Get the name</span> +01768 <span class="keywordflow">if</span> (strcmp ((<span class="keyword">const</span> <span class="keywordtype">char</span>*)xmlNode->name, <span class="stringliteral">"PRIMITIVES"</span>) == 0) +01769 { +01770 <span class="comment">// Get the version</span> +01771 string versionName = <span class="stringliteral">"0"</span>; +01772 <span class="keywordflow">if</span> (<a class="code" href="a05375.html#a5">GetPropertyString</a> (versionName, filename, xmlNode, <span class="stringliteral">"VERSION"</span>)) +01773 { +01774 <span class="comment">// Get the version</span> +01775 <a class="code" href="a04558.html#a15">uint</a> version = atoi (versionName.c_str ()); +01776 +01777 <span class="comment">// Check the version</span> +01778 <span class="keywordflow">if</span> (version <= <a class="code" href="a04772.html#a0">NLLIGO_PRIMITVE_VERSION</a>) +01779 { +01780 <span class="comment">// Read the primitives</span> +01781 xmlNode = <a class="code" href="a05375.html#a4">GetFirstChildNode</a> (xmlNode, filename, <span class="stringliteral">"ROOT_PRIMITIVE"</span>); +01782 <span class="keywordflow">if</span> (xmlNode) +01783 { +01784 <span class="comment">// Read the primitive tree</span> +01785 ((IPrimitive*)<a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>)->read (xmlNode, filename, version, config); +01786 } +01787 } +01788 <span class="keywordflow">else</span> +01789 { +01790 <a class="code" href="a05375.html#a2">Error</a> (filename, <span class="stringliteral">"CPrimitives::read : Unknown file version (%d)"</span>, version); +01791 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01792 } +01793 } +01794 <span class="keywordflow">else</span> +01795 { +01796 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01797 } +01798 } +01799 <span class="keywordflow">else</span> +01800 { +01801 <a class="code" href="a05375.html#a3">XMLError</a> (xmlNode, filename, <span class="stringliteral">"This XML document is not a NeL primitive file"</span>); +01802 <span class="keywordflow">return</span> <span class="keyword">false</span>; +01803 } +01804 +01805 <span class="keywordflow">return</span> <span class="keyword">true</span>; +01806 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa5" doxytag="NLLIGO::CPrimitives::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::CPrimitives::write </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">xmlNodePtr </td> + <td class="mdname" nowrap> <em>root</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</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01823">1823</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06195.html#l00035">NLLIGO_PRIMITVE_VERSION</a>, and <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>. +<p> +<div class="fragment"><pre>01824 { +01825 <a class="code" href="a04199.html#a6">nlassert</a> (root); +01826 +01827 <span class="comment">// Version node</span> +01828 xmlSetProp (root, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"VERSION"</span>, (<span class="keyword">const</span> xmlChar*)toString (NLLIGO_PRIMITVE_VERSION).c_str ()); +01829 +01830 <span class="comment">// The primitive root node</span> +01831 xmlNodePtr nameNode = xmlNewChild ( root, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"ROOT_PRIMITIVE"</span>, NULL); +01832 +01833 <span class="comment">// Write the primitive tree</span> +01834 ((IPrimitive*)<a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>)->write (nameNode, filename); +01835 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLLIGO_1_1CPrimitivesa6" doxytag="NLLIGO::CPrimitives::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::CPrimitives::write </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">xmlDocPtr </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</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06195.html#l01810">1810</a> of file <a class="el" href="a06195.html">primitive.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>. +<p> +<div class="fragment"><pre>01811 { +01812 <a class="code" href="a04199.html#a6">nlassert</a> (doc); +01813 +01814 <span class="comment">// Primitive node</span> +01815 xmlNodePtr primNode = xmlNewDocNode (doc, NULL, (<span class="keyword">const</span> xmlChar*)<span class="stringliteral">"PRIMITIVES"</span>, NULL); +01816 xmlDocSetRootElement (doc, primNode); +01817 +01818 <a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesa6">write</a> (primNode, filename); +01819 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLLIGO_1_1CPrimitiveso0" doxytag="NLLIGO::CPrimitives::RootNode" ></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="a03122.html">CPrimNode</a>* <a class="el" href="a03117.html#NLLIGO_1_1CPrimitiveso0">NLLIGO::CPrimitives::RootNode</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#l00535">535</a> of file <a class="el" href="a06196.html">primitive.h</a>. +<p> +Referenced by <a class="el" href="a06195.html#l01737">CPrimitives()</a>, <a class="el" href="a05471.html#l00618">NLSOUND::CBackgroundSoundManager::load()</a>, and <a class="el" href="a06195.html#l01751">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:48:50 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> |