<!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/vtkTypedArray.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/Common/vtkTypedArray.h</h1><a href="a02150.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: vtkTypedArray.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> </span> <a name="l00006"></a>00006 <span class="comment">-------------------------------------------------------------------------</span> <a name="l00007"></a>00007 <span class="comment"> Copyright 2008 Sandia Corporation.</span> <a name="l00008"></a>00008 <span class="comment"> Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,</span> <a name="l00009"></a>00009 <span class="comment"> the U.S. Government retains certain rights in this software.</span> <a name="l00010"></a>00010 <span class="comment">-------------------------------------------------------------------------</span> <a name="l00011"></a>00011 <span class="comment"></span> <a name="l00012"></a>00012 <span class="comment"> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span> <a name="l00013"></a>00013 <span class="comment"> All rights reserved.</span> <a name="l00014"></a>00014 <span class="comment"> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span> <a name="l00015"></a>00015 <span class="comment"></span> <a name="l00016"></a>00016 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00017"></a>00017 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00018"></a>00018 <span class="comment"> PURPOSE. See the above copyright notice for more information.</span> <a name="l00019"></a>00019 <span class="comment"></span> <a name="l00020"></a>00020 <span class="comment">=========================================================================*/</span> <a name="l00021"></a>00021 <a name="l00049"></a>00049 <span class="preprocessor">#ifndef __vtkTypedArray_h</span> <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define __vtkTypedArray_h</span> <a name="l00051"></a>00051 <span class="preprocessor"></span> <a name="l00052"></a>00052 <span class="preprocessor">#include "<a class="code" href="a01973.html">vtkArray.h</a>"</span> <a name="l00053"></a>00053 <span class="preprocessor">#include "<a class="code" href="a02151.html">vtkTypeTemplate.h</a>"</span> <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>; <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="keyword">template</span><<span class="keyword">typename</span> T> <a name="l00058"></a><a class="code" href="a01771.html">00058</a> <span class="keyword">class </span><a class="code" href="a01771.html" title="Provides a type-specific interface to N-way arrays.">vtkTypedArray</a> : <span class="keyword">public</span> <a class="code" href="a01772.html" title="Provides the equivalent of vtkTypeRevisionMacro for use with template classes.">vtkTypeTemplate</a><vtkTypedArray<T>, vtkArray> <a name="l00059"></a>00059 { <a name="l00060"></a>00060 <span class="keyword">public</span>: <a name="l00061"></a>00061 <span class="keyword">using</span> <a class="code" href="a01772.html" title="Provides the equivalent of vtkTypeRevisionMacro for use with template classes.">vtkTypeTemplate<vtkTypedArray<T></a>, <a class="code" href="a00124.html" title="Abstract interface for N-dimensional arrays.">vtkArray</a>><a class="code" href="a01771.html#18aede40c3455ac9a9b945efef41e260">::GetVariantValue</a>; <a name="l00062"></a>00062 <span class="keyword">using</span> <a class="code" href="a01772.html" title="Provides the equivalent of vtkTypeRevisionMacro for use with template classes.">vtkTypeTemplate<vtkTypedArray<T></a>, <a class="code" href="a00124.html" title="Abstract interface for N-dimensional arrays.">vtkArray</a>><a class="code" href="a01771.html#249c0a5aa510780e9bb859cc07cc0e9f">::SetVariantValue</a>; <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="a01771.html#c8d6c0e13870061fe616c9a7d9b761b3">PrintSelf</a>(ostream &os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00065"></a>00065 <a name="l00066"></a>00066 <span class="comment">// vtkArray API</span> <a name="l00067"></a>00067 <span class="keyword">virtual</span> <a class="code" href="a01810.html" title="A atomic type representing the union of many types.">vtkVariant</a> <a class="code" href="a01771.html#18aede40c3455ac9a9b945efef41e260">GetVariantValue</a>(<span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& coordinates); <a name="l00068"></a>00068 <span class="keyword">virtual</span> <a class="code" href="a01810.html" title="A atomic type representing the union of many types.">vtkVariant</a> <a class="code" href="a01771.html#834162ec33a3dfaf17daf37787450593">GetVariantValueN</a>(<span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> n); <a name="l00069"></a>00069 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#249c0a5aa510780e9bb859cc07cc0e9f">SetVariantValue</a>(<span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& coordinates, <span class="keyword">const</span> <a class="code" href="a01810.html" title="A atomic type representing the union of many types.">vtkVariant</a>& <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>); <a name="l00070"></a>00070 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#a13c9f77dfa3030e86e823d9339a91ac">SetVariantValueN</a>(<span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> n, <span class="keyword">const</span> <a class="code" href="a01810.html" title="A atomic type representing the union of many types.">vtkVariant</a>& value); <a name="l00071"></a>00071 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#af2df1553975fbe4e628fac5a83336ad">CopyValue</a>(<a class="code" href="a00124.html" title="Abstract interface for N-dimensional arrays.">vtkArray</a>* <a class="code" href="a02995.html#7c22aa18a4e42c330618a6410d133551">source</a>, <span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& source_coordinates, <span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& target_coordinates); <a name="l00072"></a>00072 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#af2df1553975fbe4e628fac5a83336ad">CopyValue</a>(<a class="code" href="a00124.html" title="Abstract interface for N-dimensional arrays.">vtkArray</a>* source, <span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> source_index, <span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& target_coordinates); <a name="l00073"></a>00073 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#af2df1553975fbe4e628fac5a83336ad">CopyValue</a>(<a class="code" href="a00124.html" title="Abstract interface for N-dimensional arrays.">vtkArray</a>* source, <span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& source_coordinates, <span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> target_index); <a name="l00074"></a>00074 <a name="l00076"></a>00076 <a name="l00079"></a>00079 <span class="keyword">inline</span> <span class="keyword">const</span> T& <a class="code" href="a01771.html#12a1631b0ff1c663086b1daf6a00be3f">GetValue</a>(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> i); <a name="l00080"></a>00080 <span class="keyword">inline</span> <span class="keyword">const</span> T& <a class="code" href="a01771.html#12a1631b0ff1c663086b1daf6a00be3f">GetValue</a>(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> i, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> j); <a name="l00081"></a>00081 <span class="keyword">inline</span> <span class="keyword">const</span> T& <a class="code" href="a01771.html#12a1631b0ff1c663086b1daf6a00be3f">GetValue</a>(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> i, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> j, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> k); <a name="l00082"></a>00082 <span class="keyword">virtual</span> <span class="keyword">const</span> T& <a class="code" href="a01771.html#12a1631b0ff1c663086b1daf6a00be3f">GetValue</a>(<span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& coordinates) = 0; <a name="l00084"></a>00084 <a name="l00090"></a>00090 <span class="keyword">virtual</span> <span class="keyword">const</span> T& <a class="code" href="a01771.html#6aa80097eff83159898849ea08a0aaa6">GetValueN</a>(<span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> n) = 0; <a name="l00091"></a>00091 <a name="l00093"></a>00093 <a name="l00096"></a>00096 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#859b72ad357f7d4ef8c44f5678379fe5">SetValue</a>(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> i, <span class="keyword">const</span> T& value); <a name="l00097"></a>00097 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#859b72ad357f7d4ef8c44f5678379fe5">SetValue</a>(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> i, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> j, <span class="keyword">const</span> T& value); <a name="l00098"></a>00098 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#859b72ad357f7d4ef8c44f5678379fe5">SetValue</a>(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> i, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> j, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> k, <span class="keyword">const</span> T& value); <a name="l00099"></a>00099 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#859b72ad357f7d4ef8c44f5678379fe5">SetValue</a>(<span class="keyword">const</span> <a class="code" href="a00127.html" title="Stores coordinate into an N-way array.">vtkArrayCoordinates</a>& coordinates, <span class="keyword">const</span> T& value) = 0; <a name="l00101"></a>00101 <a name="l00107"></a>00107 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01771.html#93fd77dcb32f7589513adbf092fb1983">SetValueN</a>(<span class="keyword">const</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> n, <span class="keyword">const</span> T& value) = 0; <a name="l00108"></a>00108 <a name="l00109"></a>00109 <span class="keyword">protected</span>: <a name="l00110"></a><a class="code" href="a01771.html#91e90c0a4198776f53de19766befebf7">00110</a> <a class="code" href="a01771.html#91e90c0a4198776f53de19766befebf7">vtkTypedArray</a>() {} <a name="l00111"></a><a class="code" href="a01771.html#c1009149ed1629d5459b1928fbccb20c">00111</a> <a class="code" href="a01771.html#c1009149ed1629d5459b1928fbccb20c">~vtkTypedArray</a>() {} <a name="l00112"></a>00112 <a name="l00113"></a>00113 <span class="keyword">private</span>: <a name="l00114"></a>00114 <a class="code" href="a01771.html#91e90c0a4198776f53de19766befebf7">vtkTypedArray</a>(<span class="keyword">const</span> <a class="code" href="a01771.html" title="Provides a type-specific interface to N-way arrays.">vtkTypedArray</a>&); <span class="comment">// Not implemented</span> <a name="l00115"></a>00115 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01771.html" title="Provides a type-specific interface to N-way arrays.">vtkTypedArray</a>&); <span class="comment">// Not implemented</span> <a name="l00116"></a>00116 }; <a name="l00117"></a>00117 <a name="l00118"></a>00118 <span class="preprocessor">#include "vtkTypedArray.txx"</span> <a name="l00119"></a>00119 <a name="l00120"></a>00120 <span class="preprocessor">#endif</span> <a name="l00121"></a>00121 <span class="preprocessor"></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 <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>