<!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/IO/vtkXMLCompositeDataWriter.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 Page</span></a></li> <li><a href="pages.html"><span>Related 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/IO/vtkXMLCompositeDataWriter.h</h1><a href="a03218.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: ParaView</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: vtkXMLCompositeDataWriter.h,v $</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Copyright (c) Kitware, Inc.</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.paraview.org/HTML/Copyright.html 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="l00025"></a>00025 <span class="preprocessor">#ifndef __vtkXMLCompositeDataWriter_h</span> <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define __vtkXMLCompositeDataWriter_h</span> <a name="l00027"></a>00027 <span class="preprocessor"></span> <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="a03269.html">vtkXMLWriter.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="a02135.html">vtkStdString.h</a>"</span> <span class="comment">// needed for vtkStdString.</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">class </span><a class="code" href="a00226.html" title="supports function callbacks">vtkCallbackCommand</a>; <a name="l00032"></a>00032 <span class="keyword">class </span><a class="code" href="a00303.html" title="abstact superclass for composite (multi-block or AMR) datasets">vtkCompositeDataSet</a>; <a name="l00033"></a>00033 <span class="keyword">class </span><a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>; <a name="l00034"></a>00034 <span class="keyword">class </span>vtkXMLCompositeDataWriterInternals; <a name="l00035"></a>00035 <a name="l00036"></a><a class="code" href="a01901.html">00036</a> <span class="keyword">class </span><a class="code" href="a02170.html#aab695c81fb47ab75c91e111e17cbe2c">VTK_IO_EXPORT</a> <a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a> : <span class="keyword">public</span> <a class="code" href="a01957.html" title="Superclass for VTK&#39;s XML file writers.">vtkXMLWriter</a> <a name="l00037"></a>00037 { <a name="l00038"></a>00038 <span class="keyword">public</span>: <a name="l00039"></a><a class="code" href="a01901.html#699c7c172be7356af6f5aa34f551e60d">00039</a> vtkTypeRevisionMacro(<a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a>,<a class="code" href="a01957.html" title="Superclass for VTK&#39;s XML file writers.">vtkXMLWriter</a>); <a name="l00040"></a>00040 <span class="keywordtype">void</span> <a class="code" href="a01957.html#1568a01e09deb35640a895612007b3b1">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00041"></a>00041 <a name="l00043"></a>00043 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a01957.html#bdd8242d500041cea23ce0af45dba7ad">GetDefaultFileExtension</a>(); <a name="l00044"></a>00044 <a name="l00046"></a>00046 <a name="l00048"></a>00048 vtkGetMacro(Piece, <span class="keywordtype">int</span>); <a name="l00049"></a>00049 vtkSetMacro(Piece, <span class="keywordtype">int</span>); <a name="l00051"></a>00051 <a name="l00053"></a>00053 <a name="l00054"></a>00054 vtkGetMacro(NumberOfPieces, <span class="keywordtype">int</span>); <a name="l00055"></a>00055 vtkSetMacro(NumberOfPieces, <span class="keywordtype">int</span>); <a name="l00057"></a>00057 <a name="l00059"></a>00059 <a name="l00060"></a>00060 vtkGetMacro(GhostLevel, <span class="keywordtype">int</span>); <a name="l00061"></a>00061 vtkSetMacro(GhostLevel, <span class="keywordtype">int</span>); <a name="l00063"></a>00063 <a name="l00065"></a>00065 <a name="l00066"></a>00066 vtkGetMacro(WriteMetaFile, <span class="keywordtype">int</span>); <a name="l00067"></a>00067 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetWriteMetaFile(<span class="keywordtype">int</span> flag); <a name="l00069"></a>00069 <a name="l00070"></a>00070 <span class="comment">// See the vtkAlgorithm for a desciption of what these do</span> <a name="l00071"></a>00071 <span class="keywordtype">int</span> <a class="code" href="a01957.html#4bb056e66a591a934e7ae90d63de72f8">ProcessRequest</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>*, <a name="l00072"></a>00072 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>**, <a name="l00073"></a>00073 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>*); <a name="l00074"></a>00074 <a name="l00075"></a>00075 <span class="keyword">protected</span>: <a name="l00076"></a>00076 <a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a>(); <a name="l00077"></a>00077 ~<a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a>(); <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="comment">// Methods to define the file's major and minor version numbers.</span> <a name="l00080"></a>00080 <span class="comment">// Major version incremented since v0.1 composite data readers cannot read </span> <a name="l00081"></a>00081 <span class="comment">// the files written by this new reader.</span> <a name="l00082"></a><a class="code" href="a01901.html#78194ee02d7ab699aeddfadcf60e903a">00082</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01957.html#0038d58aa19c8a733fc6003746aabc9b">GetDataSetMajorVersion</a>() { <span class="keywordflow">return</span> 1; } <a name="l00083"></a><a class="code" href="a01901.html#4df1a6f3f4b717692323b004ed5cef68">00083</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01957.html#1a994f68316b462ff9335f32c9b7d568">GetDataSetMinorVersion</a>() { <span class="keywordflow">return</span> 0; } <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="comment">// Create a filename for the given index.</span> <a name="l00086"></a>00086 <a class="code" href="a01607.html" title="Wrapper around vtkstd::string to keep symbols short.">vtkStdString</a> CreatePieceFileName(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>); <a name="l00087"></a>00087 <a name="l00088"></a>00088 <span class="comment">// see algorithm for more info</span> <a name="l00089"></a>00089 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00101.html#aad069877868b9c2e8035a946a5d0538">FillInputPortInformation</a>(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210710cb6d12e418b21e8fb3d79ac32f51c">port</a>, <a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21023da246d4a744e861548382bb79fad81">info</a>); <a name="l00090"></a>00090 <a name="l00091"></a>00091 <span class="keywordtype">int</span> <a class="code" href="a01957.html#fc070abb6e0930053b767af197b01224">RequestData</a>( <a name="l00092"></a>00092 <a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>* , <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>** , <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>*); <a name="l00093"></a>00093 <span class="keywordtype">int</span> RequestUpdateExtent( <a name="l00094"></a>00094 <a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>* , <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>** , <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>*); <a name="l00095"></a>00095 <a name="l00096"></a>00096 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01957.html#595eed2d39e586f50a03ad0763b6ef15">WriteData</a>(); <a name="l00097"></a>00097 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a01957.html#b78543871afac1e08246e15d24411149">GetDataSetName</a>(); <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="comment">// Create a default executive.</span> <a name="l00100"></a>00100 <span class="keyword">virtual</span> <a class="code" href="a00472.html" title="Superclass for all pipeline executives in VTK.">vtkExecutive</a>* <a class="code" href="a00101.html#ec53f380c0394cc319670735d74251f9">CreateDefaultExecutive</a>(); <a name="l00101"></a>00101 <a name="l00102"></a><a class="code" href="a01901.html#a8d009b5f645b8c7f4380fbbc5e1308a">00102</a> <a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>* InputInformation; <a name="l00103"></a>00103 <a name="l00105"></a>00105 <span class="keyword">virtual</span> <span class="keywordtype">void</span> FillDataTypes(<a class="code" href="a00303.html" title="abstact superclass for composite (multi-block or AMR) datasets">vtkCompositeDataSet</a>*); <a name="l00106"></a>00106 <a name="l00107"></a>00107 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetNumberOfDataTypes(); <a name="l00108"></a>00108 <span class="keywordtype">int</span>* GetDataTypesPointer(); <a name="l00109"></a>00109 <a name="l00110"></a>00110 <span class="comment">// Methods to create the set of writers matching the set of inputs.</span> <a name="l00111"></a>00111 <span class="keywordtype">void</span> CreateWriters(<a class="code" href="a00303.html" title="abstact superclass for composite (multi-block or AMR) datasets">vtkCompositeDataSet</a>*); <a name="l00112"></a>00112 <a class="code" href="a01957.html" title="Superclass for VTK&#39;s XML file writers.">vtkXMLWriter</a>* GetWriter(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>); <a name="l00113"></a>00113 <a name="l00114"></a>00114 <span class="comment">// Methods to help construct internal file names.</span> <a name="l00115"></a>00115 <span class="keywordtype">void</span> SplitFileName(); <a name="l00116"></a>00116 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetFilePrefix(); <a name="l00117"></a>00117 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetFilePath(); <a name="l00118"></a>00118 <a name="l00122"></a>00122 <span class="keywordtype">int</span> WriteMetaFileIfRequested(); <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="comment">// Make a directory.</span> <a name="l00125"></a>00125 <span class="keywordtype">void</span> MakeDirectory(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>); <a name="l00126"></a>00126 <a name="l00127"></a>00127 <span class="comment">// Remove a directory.</span> <a name="l00128"></a>00128 <span class="keywordtype">void</span> RemoveADirectory(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>); <a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="comment">// Internal implementation details.</span> <a name="l00131"></a><a class="code" href="a01901.html#b378fe6a427b4f6f14d8a9a0d9c76971">00131</a> vtkXMLCompositeDataWriterInternals* Internal; <a name="l00132"></a>00132 <a name="l00133"></a>00133 <span class="comment">// The piece number to write.</span> <a name="l00134"></a><a class="code" href="a01901.html#0af5e0e097f4ee93bea9ccf26ec83177">00134</a> <span class="keywordtype">int</span> Piece; <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="comment">// The number of pieces into which the inputs are split.</span> <a name="l00137"></a><a class="code" href="a01901.html#45e74cd7f1156aa78784b939d6ba889f">00137</a> <span class="keywordtype">int</span> NumberOfPieces; <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="comment">// The number of ghost levels to write for unstructured data.</span> <a name="l00140"></a><a class="code" href="a01901.html#8996b7feb2fa24d7552721cf9a78d435">00140</a> <span class="keywordtype">int</span> GhostLevel; <a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="comment">// Whether to write the collection file on this node.</span> <a name="l00143"></a><a class="code" href="a01901.html#b5ced3f194237a9f1a7a5668f9357f55">00143</a> <span class="keywordtype">int</span> WriteMetaFile; <a name="l00144"></a><a class="code" href="a01901.html#97f3766c1c139ba2b1edbed37f9f0530">00144</a> <span class="keywordtype">int</span> WriteMetaFileInitialized; <a name="l00145"></a>00145 <a name="l00146"></a>00146 <span class="comment">// Callback registered with the ProgressObserver.</span> <a name="l00147"></a>00147 <span class="keyword">static</span> <span class="keywordtype">void</span> ProgressCallbackFunction(<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>, <span class="keywordtype">void</span>*, <a name="l00148"></a>00148 <span class="keywordtype">void</span>*); <a name="l00149"></a>00149 <span class="comment">// Progress callback from internal writer.</span> <a name="l00150"></a>00150 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ProgressCallback(<a class="code" href="a00101.html" title="Superclass for all sources, filters, and sinks in VTK.">vtkAlgorithm</a>* w); <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="comment">// The observer to report progress from the internal writer.</span> <a name="l00153"></a><a class="code" href="a01901.html#24340493f618adc816d59a4ab1c6539d">00153</a> <a class="code" href="a00226.html" title="supports function callbacks">vtkCallbackCommand</a>* ProgressObserver; <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="comment">// Garbage collection support.</span> <a name="l00156"></a>00156 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00101.html#2640547007328b99cfb851143f0f706d">ReportReferences</a>(<a class="code" href="a00572.html" title="Detect and break reference loops.">vtkGarbageCollector</a>*); <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="comment">// Internal method called recursively to create the xml tree for the children</span> <a name="l00159"></a>00159 <span class="comment">// of compositeData.</span> <a name="l00160"></a>00160 <span class="keyword">virtual</span> <span class="keywordtype">int</span> WriteComposite(<a class="code" href="a00303.html" title="abstact superclass for composite (multi-block or AMR) datasets">vtkCompositeDataSet</a>* compositeData, <a name="l00161"></a>00161 <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* element, <span class="keywordtype">int</span> &writerIdx)=0; <a name="l00162"></a>00162 <a name="l00163"></a>00163 <span class="comment">// Internal method to write non vtkCompositeDataSet subclass.</span> <a name="l00164"></a>00164 <span class="keyword">virtual</span> <span class="keywordtype">int</span> WriteNonCompositeData(<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>* dObj, <a name="l00165"></a>00165 <a class="code" href="a01902.html" title="Represents an XML element and those nested inside.">vtkXMLDataElement</a>* element, <span class="keywordtype">int</span>& writerIdx); <a name="l00166"></a>00166 <span class="keyword">private</span>: <a name="l00167"></a>00167 <a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a>(<span class="keyword">const</span> <a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a>&); <span class="comment">// Not implemented.</span> <a name="l00168"></a>00168 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01901.html" title="Writer for multi-group datasets.">vtkXMLCompositeDataWriter</a>&); <span class="comment">// Not implemented.</span> <a name="l00169"></a>00169 }; <a name="l00170"></a>00170 <a name="l00171"></a>00171 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:41 2009 for VTK by <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>