Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 3973

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Common/vtkXMLDataElement.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Common/vtkXMLDataElement.h</h1><a href="a02175.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: vtkXMLDataElement.h,v $</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef __vtkXMLDataElement_h</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __vtkXMLDataElement_h</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="a02079.html">vtkObject.h</a>"</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">class </span><a class="code" href="a01903.html" title="Used by vtkXMLReader to parse VTK XML files.">vtkXMLDataParser</a>;
<a name="l00033"></a>00033 
<a name="l00034"></a><a class="code" href="a01902.html">00034</a> <span class="keyword">class </span><a class="code" href="a02170.html#873ca0b83d0838a1df577536068a1730">VTK_COMMON_EXPORT</a> <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a> : <span class="keyword">public</span> <a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036 <span class="keyword">public</span>:
<a name="l00037"></a><a class="code" href="a01902.html#c20c45b97c886fa60aee3bfe841da2ba">00037</a>   vtkTypeRevisionMacro(<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>,<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>);
<a name="l00038"></a>00038   <span class="keywordtype">void</span> <a class="code" href="a01084.html#bf3dbb4154289b56a12483eee3866263">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00039"></a>00039   <span class="keyword">static</span> <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* <a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00040"></a>00040 
<a name="l00042"></a>00042 
<a name="l00043"></a>00043   vtkGetStringMacro(Name);
<a name="l00044"></a>00044   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetName (<span class="keyword">const</span> <span class="keywordtype">char</span>* _arg);
<a name="l00046"></a>00046 
<a name="l00048"></a>00048 
<a name="l00049"></a>00049   vtkGetStringMacro(Id);
<a name="l00050"></a>00050   vtkSetStringMacro(Id);
<a name="l00052"></a>00052 
<a name="l00055"></a>00055   <span class="keyword">const</span> <span class="keywordtype">char</span>* GetAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>);
<a name="l00056"></a>00056 
<a name="l00059"></a>00059   <span class="keywordtype">void</span> SetAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00060"></a>00060  
<a name="l00062"></a>00062 
<a name="l00063"></a>00063   <span class="keywordtype">void</span> SetCharacterData(<span class="keyword">const</span> <span class="keywordtype">char</span>* c, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>);
<a name="l00064"></a>00064   <span class="keywordtype">void</span> AddCharacterData(<span class="keyword">const</span> <span class="keywordtype">char</span>* c, <span class="keywordtype">size_t</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>);
<a name="l00065"></a>00065   vtkGetStringMacro(CharacterData);
<a name="l00067"></a>00067 
<a name="l00069"></a>00069 
<a name="l00071"></a>00071   <span class="keywordtype">int</span> GetScalarAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span>&amp; <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00072"></a>00072   <span class="keywordtype">int</span> GetScalarAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">float</span>&amp; <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00073"></a>00073   <span class="keywordtype">int</span> GetScalarAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">double</span>&amp; <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00074"></a>00074   <span class="keywordtype">int</span> GetScalarAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00076"></a>00076 
<a name="l00078"></a>00078 
<a name="l00082"></a>00082   <span class="keywordtype">void</span> SetIntAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00083"></a>00083   <span class="keywordtype">void</span> SetFloatAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">float</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00084"></a>00084   <span class="keywordtype">void</span> SetDoubleAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00085"></a>00085   <span class="keywordtype">void</span> SetUnsignedLongAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00087"></a>00087 
<a name="l00089"></a>00089 
<a name="l00091"></a>00091   <span class="keywordtype">int</span> GetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keywordtype">int</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00092"></a>00092   <span class="keywordtype">int</span> GetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keywordtype">float</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00093"></a>00093   <span class="keywordtype">int</span> GetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keywordtype">double</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00094"></a>00094   <span class="keywordtype">int</span> GetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00096"></a>00096 
<a name="l00098"></a>00098 
<a name="l00099"></a>00099   <span class="keywordtype">void</span> SetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keyword">const</span> <span class="keywordtype">int</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00100"></a>00100   <span class="keywordtype">void</span> SetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00101"></a>00101   <span class="keywordtype">void</span> SetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keyword">const</span> <span class="keywordtype">double</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00102"></a>00102   <span class="keywordtype">void</span> SetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00104"></a>00104 
<a name="l00105"></a>00105 <span class="preprocessor">#ifdef VTK_USE_64BIT_IDS</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span>  <span class="comment">//BTX</span>
<a name="l00107"></a>00107   <span class="keywordtype">int</span>  GetScalarAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a>&amp; <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00108"></a>00108   <span class="keywordtype">void</span> SetIdTypeAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00109"></a>00109   <span class="keywordtype">int</span>  GetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00110"></a>00110   <span class="keywordtype">void</span> SetVectorAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>, <span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00111"></a>00111   <span class="comment">//ETX</span>
<a name="l00112"></a>00112 <span class="preprocessor">#endif</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span>
<a name="l00116"></a>00116   <span class="keywordtype">int</span> GetWordTypeAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span>&amp; <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00117"></a>00117 
<a name="l00119"></a>00119 
<a name="l00120"></a>00120   vtkGetMacro(NumberOfAttributes, <span class="keywordtype">int</span>);
<a name="l00122"></a>00122 
<a name="l00124"></a>00124   <span class="keyword">const</span> <span class="keywordtype">char</span>* GetAttributeName(<span class="keywordtype">int</span> idx);
<a name="l00125"></a>00125 
<a name="l00128"></a>00128   <span class="keyword">const</span> <span class="keywordtype">char</span>* GetAttributeValue(<span class="keywordtype">int</span> idx);
<a name="l00129"></a>00129 
<a name="l00131"></a>00131 
<a name="l00132"></a>00132   <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveAttribute(<span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>);
<a name="l00133"></a>00133   <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveAllAttributes();
<a name="l00135"></a>00135 
<a name="l00137"></a>00137 
<a name="l00138"></a>00138   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* GetParent();
<a name="l00139"></a>00139   <span class="keywordtype">void</span> SetParent(<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* parent);
<a name="l00141"></a>00141 
<a name="l00143"></a>00143   <span class="keyword">virtual</span> <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* GetRoot();
<a name="l00144"></a>00144 
<a name="l00146"></a>00146   <span class="keywordtype">int</span> GetNumberOfNestedElements();
<a name="l00147"></a>00147 
<a name="l00149"></a>00149   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* GetNestedElement(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>);
<a name="l00150"></a>00150 
<a name="l00152"></a>00152   <span class="keywordtype">void</span> AddNestedElement(<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* element);
<a name="l00153"></a>00153 
<a name="l00155"></a>00155   <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveNestedElement(<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a> *);
<a name="l00156"></a>00156 
<a name="l00158"></a>00158   <span class="keyword">virtual</span> <span class="keywordtype">void</span> RemoveAllNestedElements();
<a name="l00159"></a>00159 
<a name="l00161"></a>00161 
<a name="l00164"></a>00164   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* FindNestedElement(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">id</span>);
<a name="l00165"></a>00165   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* FindNestedElementWithName(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>);
<a name="l00166"></a>00166   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* FindNestedElementWithNameAndId(
<a name="l00167"></a>00167     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">id</span>);
<a name="l00168"></a>00168   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* FindNestedElementWithNameAndAttribute(
<a name="l00169"></a>00169     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* att_name, <span class="keyword">const</span> <span class="keywordtype">char</span>* att_value);
<a name="l00171"></a>00171 
<a name="l00174"></a>00174   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* LookupElementWithName(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>);
<a name="l00175"></a>00175 
<a name="l00177"></a>00177   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* LookupElement(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">id</span>);
<a name="l00178"></a>00178 
<a name="l00180"></a>00180 
<a name="l00182"></a>00182   vtkGetMacro(XMLByteIndex, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
<a name="l00183"></a>00183   vtkSetMacro(XMLByteIndex, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
<a name="l00185"></a>00185 
<a name="l00190"></a>00190   <span class="keyword">virtual</span> <span class="keywordtype">int</span> IsEqualTo(<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a> *elem);
<a name="l00191"></a>00191 
<a name="l00195"></a>00195   <span class="keyword">virtual</span> <span class="keywordtype">void</span> DeepCopy(<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a> *elem);
<a name="l00196"></a>00196 
<a name="l00198"></a>00198 
<a name="l00203"></a>00203   vtkSetClampMacro(AttributeEncoding,<span class="keywordtype">int</span>,<a class="code" href="a02139.html#fe76470c081d74a2f44f24dfb5b737f5">VTK_ENCODING_NONE</a>,<a class="code" href="a02139.html#9031d61f4a0934a953f6645f08773265">VTK_ENCODING_UNKNOWN</a>);
<a name="l00204"></a>00204   vtkGetMacro(AttributeEncoding, <span class="keywordtype">int</span>);
<a name="l00206"></a>00206 
<a name="l00208"></a>00208 
<a name="l00209"></a>00209   <span class="keywordtype">void</span> PrintXML(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00210"></a>00210   <span class="keywordtype">void</span> PrintXML(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname);
<a name="l00212"></a>00212 
<a name="l00214"></a>00214 
<a name="l00219"></a>00219   vtkGetMacro(CharacterDataWidth,<span class="keywordtype">int</span>);
<a name="l00220"></a>00220   vtkSetMacro(CharacterDataWidth,<span class="keywordtype">int</span>);
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 <span class="keyword">protected</span>:
<a name="l00224"></a>00224   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>();
<a name="l00225"></a>00225   ~<a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>();
<a name="l00226"></a>00226 
<a name="l00227"></a>00227   <span class="comment">// The name of the element from the XML file.</span>
<a name="l00228"></a><a class="code" href="a01902.html#eadccd035d6ffa15aa6f765c0651a375">00228</a>   <span class="keywordtype">char</span>* Name;
<a name="l00229"></a>00229   <span class="comment">// The value of the "id" attribute, if any was given.</span>
<a name="l00230"></a><a class="code" href="a01902.html#6149b0e9760a781a9f770f812d2988c1">00230</a>   <span class="keywordtype">char</span>* Id;
<a name="l00231"></a>00231 
<a name="l00232"></a><a class="code" href="a01902.html#b72c336ced04f8393b6d0b69b801b559">00232</a>   <span class="keywordtype">int</span> CharacterDataWidth;
<a name="l00233"></a>00233 
<a name="l00234"></a>00234   <span class="comment">// Data inside of the tag's open and close. ie &lt;X&gt; character data &lt;/X&gt;</span>
<a name="l00235"></a><a class="code" href="a01902.html#9e79524e5f409d798c2023d6b5526d62">00235</a>   <span class="keywordtype">char</span>* CharacterData;            <span class="comment">// Null terminated buffer.</span>
<a name="l00236"></a><a class="code" href="a01902.html#a3d9e34ac7c77d6c885c625059fb0c28">00236</a>   <span class="keywordtype">size_t</span> CharacterDataBlockSize;  <span class="comment">// Allocation size if buffer needs expand</span>
<a name="l00237"></a><a class="code" href="a01902.html#b9686420b66d7ffbf62768132ccc950c">00237</a>   <span class="keywordtype">size_t</span> CharacterDataBufferSize; <span class="comment">// Allocated size.</span>
<a name="l00238"></a><a class="code" href="a01902.html#87f6748d723f3ffe0ba159eb0fece241">00238</a>   <span class="keywordtype">size_t</span> EndOfCharacterData;      <span class="comment">// Number of bytes used.</span>
<a name="l00239"></a>00239 
<a name="l00240"></a>00240   <span class="comment">// Tags that have specialized character data handlers</span>
<a name="l00241"></a>00241   <span class="comment">// can set this flag to improve performance. The default is unset.</span>
<a name="l00242"></a><a class="code" href="a01902.html#b619d453b7be3cc60ad3a077d853cb93">00242</a>   <span class="keywordtype">int</span> IgnoreCharacterData;
<a name="l00243"></a>00243 
<a name="l00244"></a>00244   <span class="comment">// Get/Set the stream position of the elements inline data.</span>
<a name="l00245"></a>00245   vtkGetMacro(InlineDataPosition,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
<a name="l00246"></a><a class="code" href="a01902.html#5aed559dea65a3e022a836eb358fad09">00246</a>   vtkSetMacro(InlineDataPosition,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
<a name="l00247"></a>00247   <span class="comment">// The offset into the XML stream where the inline data begins.</span>
<a name="l00248"></a>00248   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> InlineDataPosition;
<a name="l00249"></a>00249   <span class="comment">// The offset into the XML stream where the element begins.</span>
<a name="l00250"></a><a class="code" href="a01902.html#cb7548eee4b298a0d40b4acd3b1c4a77">00250</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> XMLByteIndex;
<a name="l00251"></a>00251 
<a name="l00252"></a>00252   <span class="comment">// The raw property name/value pairs read from the XML attributes.</span>
<a name="l00253"></a><a class="code" href="a01902.html#2bf1ad7dcde9e5712148f14d26989b87">00253</a>   <span class="keywordtype">char</span>** AttributeNames;
<a name="l00254"></a><a class="code" href="a01902.html#d4a1e5f398fa5d0d7c20d90e75616d82">00254</a>   <span class="keywordtype">char</span>** AttributeValues;
<a name="l00255"></a><a class="code" href="a01902.html#6cbe4df1d50953aeab97d4fd69924d86">00255</a>   <span class="keywordtype">int</span> NumberOfAttributes;
<a name="l00256"></a><a class="code" href="a01902.html#4c608d52e46ade8538ece86cc10fd5d2">00256</a>   <span class="keywordtype">int</span> AttributesSize;
<a name="l00257"></a><a class="code" href="a01902.html#6486dde3fcad76fecd21f71d8284b8a0">00257</a>   <span class="keywordtype">int</span> AttributeEncoding;
<a name="l00258"></a>00258 
<a name="l00259"></a>00259   <span class="comment">// The set of nested elements.</span>
<a name="l00260"></a><a class="code" href="a01902.html#640081ff74f92a30f2008d3ff75e7fb9">00260</a>   <span class="keywordtype">int</span> NumberOfNestedElements;
<a name="l00261"></a><a class="code" href="a01902.html#6ee4bb5d2658ae7f6a839aad90a021b1">00261</a>   <span class="keywordtype">int</span> NestedElementsSize;
<a name="l00262"></a><a class="code" href="a01902.html#20ad0cac054319384f899c097d12ce53">00262</a>   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>** NestedElements;
<a name="l00263"></a>00263   <span class="comment">// The parent of this element.</span>
<a name="l00264"></a><a class="code" href="a01902.html#bf4d83336152df443a99247c22347655">00264</a>   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* Parent;
<a name="l00265"></a>00265 
<a name="l00266"></a>00266   <span class="comment">// Internal utility methods.</span>
<a name="l00267"></a>00267   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* LookupElementInScope(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">id</span>);
<a name="l00268"></a>00268   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* LookupElementUpScope(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">id</span>);
<a name="l00269"></a>00269   <span class="keyword">static</span> <span class="keywordtype">int</span> IsSpace(<span class="keywordtype">char</span> c);
<a name="l00270"></a>00270   <span class="keywordtype">void</span> PrintCharacterData(ostream &amp;os,<a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00271"></a>00271 
<a name="l00272"></a>00272   <span class="comment">//BTX</span>
<a name="l00273"></a><a class="code" href="a01902.html#db9748ee94dc501d1ba852804e2354ba">00273</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a01903.html" title="Used by vtkXMLReader to parse VTK XML files.">vtkXMLDataParser</a>;
<a name="l00274"></a><a class="code" href="a01902.html#a74ebc626e599b046d02644d6557a757">00274</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a01916.html" title="Parses VTK Material file.">vtkXMLMaterialParser</a>;
<a name="l00275"></a>00275   <span class="comment">//ETX</span>
<a name="l00276"></a>00276 
<a name="l00277"></a>00277 <span class="keyword">private</span>:
<a name="l00278"></a>00278   <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>(<span class="keyword">const</span> <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00279"></a>00279   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00280"></a>00280 };
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00283"></a>00283 <span class="keyword">inline</span>
<a name="l00284"></a><a class="code" href="a01902.html#b17d66df79e372588004668946b01043">00284</a> <span class="keywordtype">void</span> <a class="code" href="a01902.html#b17d66df79e372588004668946b01043">vtkXMLDataElement::AddCharacterData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210eb708a412c0730a6b5f3215b36474a1e">data</a>, <span class="keywordtype">size_t</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21042c5d76c3275f5d17bc1b329d83ab003">length</a>)
<a name="l00285"></a>00285 {
<a name="l00286"></a>00286   <span class="keywordflow">if</span> (this-&gt;<a class="code" href="a01902.html#b619d453b7be3cc60ad3a077d853cb93">IgnoreCharacterData</a>){ <span class="keywordflow">return</span>; }
<a name="l00287"></a>00287   <span class="comment">// This is the index where we start to put the new data at.</span>
<a name="l00288"></a>00288   <span class="keywordtype">size_t</span> eod=this-&gt;<a class="code" href="a01902.html#87f6748d723f3ffe0ba159eb0fece241">EndOfCharacterData</a>-1;
<a name="l00289"></a>00289   <span class="comment">// Check if the new data will write off the end. If it does</span>
<a name="l00290"></a>00290   <span class="comment">// resize the character data buffer.</span>
<a name="l00291"></a>00291   this-&gt;<a class="code" href="a01902.html#87f6748d723f3ffe0ba159eb0fece241">EndOfCharacterData</a>+=length;
<a name="l00292"></a>00292   <span class="keywordflow">if</span> (this-&gt;<a class="code" href="a01902.html#87f6748d723f3ffe0ba159eb0fece241">EndOfCharacterData</a>&gt;=this-&gt;<a class="code" href="a01902.html#b9686420b66d7ffbf62768132ccc950c">CharacterDataBufferSize</a>)
<a name="l00293"></a>00293     {
<a name="l00294"></a>00294     <span class="keywordflow">while</span>(this-&gt;<a class="code" href="a01902.html#87f6748d723f3ffe0ba159eb0fece241">EndOfCharacterData</a>&gt;=this-&gt;<a class="code" href="a01902.html#b9686420b66d7ffbf62768132ccc950c">CharacterDataBufferSize</a>)
<a name="l00295"></a>00295       {
<a name="l00296"></a>00296       this-&gt;<a class="code" href="a01902.html#b9686420b66d7ffbf62768132ccc950c">CharacterDataBufferSize</a>+=this-&gt;<a class="code" href="a01902.html#a3d9e34ac7c77d6c885c625059fb0c28">CharacterDataBlockSize</a>;
<a name="l00297"></a>00297       }
<a name="l00298"></a>00298     this-&gt;<a class="code" href="a01902.html#9e79524e5f409d798c2023d6b5526d62">CharacterData</a> 
<a name="l00299"></a>00299       = <span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span> *<span class="keyword">&gt;</span>(realloc(this-&gt;<a class="code" href="a01902.html#9e79524e5f409d798c2023d6b5526d62">CharacterData</a>,this-&gt;<a class="code" href="a01902.html#b9686420b66d7ffbf62768132ccc950c">CharacterDataBufferSize</a>));
<a name="l00300"></a>00300     }
<a name="l00301"></a>00301   <span class="comment">// put the new data at the end of the buffer, and null terminate.</span>
<a name="l00302"></a>00302   <span class="keywordtype">char</span> *pCD=this-&gt;<a class="code" href="a01902.html#9e79524e5f409d798c2023d6b5526d62">CharacterData</a>+eod;
<a name="l00303"></a>00303   memmove(pCD,data,length);
<a name="l00304"></a>00304   pCD[length]=<span class="charliteral">'\0'</span>;
<a name="l00305"></a>00305   <span class="keywordflow">return</span>;
<a name="l00306"></a>00306 }
<a name="l00307"></a>00307 
<a name="l00308"></a>00308 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:13 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>