vtkXdmfDataArray.h 2.82 KB
Newer Older
Jerry Clarke's avatar
Jerry Clarke committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*******************************************************************/
/*                               XDMF                              */
/*                   eXtensible Data Model and Format              */
/*                                                                 */
/*  Id : Id  */
/*  Date : $Date$ */
/*  Version : $Revision$ */
/*                                                                 */
/*  Author:                                                        */
/*     Jerry A. Clarke                                             */
/*     clarke@arl.army.mil                                         */
/*     US Army Research Laboratory                                 */
/*     Aberdeen Proving Ground, MD                                 */
/*                                                                 */
/*     Copyright @ 2002 US Army Research Laboratory                */
/*     All Rights Reserved                                         */
/*     See Copyright.txt or http://www.arl.hpc.mil/ice for details */
/*                                                                 */
/*     This software is distributed WITHOUT ANY WARRANTY; without  */
/*     even the implied warranty of MERCHANTABILITY or FITNESS     */
/*     FOR A PARTICULAR PURPOSE.  See the above copyright notice   */
/*     for more information.                                       */
/*                                                                 */
/*******************************************************************/
#ifndef _vtkXdmfDataArray_h
#define _vtkXdmfDataArray_h

#include <vtkDataArray.h>
#include <vtkFloatArray.h>
30
#include <XdmfArray.h>
Jerry Clarke's avatar
Jerry Clarke committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44

class VTK_EXPORT vtkXdmfDataArray : public vtkObject
{
public:
  static vtkXdmfDataArray *New();
  vtkTypeMacro(vtkXdmfDataArray,vtkObject);

  
  vtkDataArray *FromArray( void ) {
    return( this->FromXdmfArray() );
    }
  char *ToArray( void ) {
    return( this->ToXdmfArray() );
    }
45
  vtkDataArray *FromXdmfArray( char *ArrayName = NULL, int CopyShape = 1, 
Jerry Clarke's avatar
Jerry Clarke committed
46
   int rank = 1, int Components = 1 , int MakeCopy = 1);
Jerry Clarke's avatar
Jerry Clarke committed
47
48
49
50
51
  char *ToXdmfArray( vtkDataArray *DataArray = NULL, int CopyShape = 1 );

  void SetArray( char *TagName ) {
    this->Array = TagNameToArray( TagName );
    if( this->Array ) {
52
      this->FromXdmfArray();
Jerry Clarke's avatar
Jerry Clarke committed
53
54
55
56
57
58
59
60
61
62
      }
    }

  char *GetArray( void ) {
    if ( this->Array != NULL ) {
      return( this->Array->GetTagName() );
    }
    return( NULL );
    }

63
64
65
  void SetVtkArray( vtkDataArray *array) {
    this->vtkArray = array;
    this->ToXdmfArray( array );
Jerry Clarke's avatar
Jerry Clarke committed
66
67
68
69
70
71
    }

  vtkDataArray *GetVtkArray( void ) {
    return( this->vtkArray );
    }

72
73
74
75
76
77
protected:
  vtkXdmfDataArray();

private:
  vtkDataArray  *vtkArray;
  XdmfArray  *Array;
78
79
  vtkXdmfDataArray(const vtkXdmfDataArray&); // Not implemented
  void operator=(const vtkXdmfDataArray&); // Not implemented
Jerry Clarke's avatar
Jerry Clarke committed
80
81
};
#endif /* _vtkXdmfDataArray_h */