VTK
vtkUnicodeStringArray.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUnicodeStringArray.h
5 
6 -------------------------------------------------------------------------
7  Copyright 2008 Sandia Corporation.
8  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9  the U.S. Government retains certain rights in this software.
10 -------------------------------------------------------------------------
11 
12  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13  All rights reserved.
14  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15 
16  This software is distributed WITHOUT ANY WARRANTY; without even
17  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  PURPOSE. See the above copyright notice for more information.
19 
20 =========================================================================*/
21 
34 #ifndef __vtkUnicodeStringArray_h
35 #define __vtkUnicodeStringArray_h
36 
37 #include "vtkAbstractArray.h"
38 #include "vtkUnicodeString.h" // For value type
39 
41  public vtkAbstractArray
42 {
43 public:
44  static vtkUnicodeStringArray* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
48  virtual int Allocate(vtkIdType sz, vtkIdType ext=1000);
49  virtual void Initialize();
50  virtual int GetDataType();
51  virtual int GetDataTypeSize();
52  virtual int GetElementComponentSize();
53  virtual void SetNumberOfTuples(vtkIdType number);
54  virtual void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source);
55  virtual void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source);
57  virtual void* GetVoidPointer(vtkIdType id);
58  virtual void DeepCopy(vtkAbstractArray* da);
59  virtual void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
60  vtkAbstractArray* source, double* weights);
61  virtual void InterpolateTuple(vtkIdType i,
62  vtkIdType id1, vtkAbstractArray* source1,
63  vtkIdType id2, vtkAbstractArray* source2, double t);
64  virtual void Squeeze();
65  virtual int Resize(vtkIdType numTuples);
66  virtual void SetVoidArray(void *array, vtkIdType size, int save);
67  virtual unsigned long GetActualMemorySize();
68  virtual int IsNumeric();
69  virtual vtkArrayIterator* NewIterator();
71  virtual vtkIdType LookupValue(vtkVariant value);
72  virtual void LookupValue(vtkVariant value, vtkIdList* ids);
73 
74  virtual void SetVariantValue(vtkIdType idx, vtkVariant value);
75  virtual void DataChanged();
76  virtual void ClearLookup();
77 
78  vtkIdType InsertNextValue(const vtkUnicodeString&);
79  void InsertValue(vtkIdType idx, const vtkUnicodeString&); // Ranged checked
80  void SetValue(vtkIdType i, const vtkUnicodeString&); // Not ranged checked
81  vtkUnicodeString& GetValue(vtkIdType i);
82 
83  void InsertNextUTF8Value(const char*);
84  void SetUTF8Value(vtkIdType i, const char*);
85  const char* GetUTF8Value(vtkIdType i);
86 
87 protected:
88  vtkUnicodeStringArray(vtkIdType numComp = 1);
90 
91 private:
92  vtkUnicodeStringArray(const vtkUnicodeStringArray&); // Not implemented.
93  void operator=(const vtkUnicodeStringArray&); // Not implemented.
94 
95 //BTX
96  class Implementation;
97  Implementation* Internal;
98 //ETX
99 };
100 
101 #endif
102 
void PrintSelf(ostream &os, vtkIndent indent)
virtual int IsNumeric()=0
virtual void DataChanged()=0
virtual void DeepCopy(vtkAbstractArray *da)
Subclass of vtkAbstractArray that holds vtkUnicodeStrings.
virtual vtkVariant GetVariantValue(vtkIdType idx)
Abstract superclass for all arrays.
virtual vtkIdType LookupValue(vtkVariant value)=0
virtual int GetDataTypeSize()=0
virtual void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)=0
virtual void SetNumberOfTuples(vtkIdType number)=0
virtual int GetDataType()=0
int vtkIdType
Definition: vtkType.h:255
virtual void SetVoidArray(void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save))=0
virtual void Initialize()=0
A atomic type representing the union of many types.
Definition: vtkVariant.h:72
virtual int Allocate(vtkIdType sz, vtkIdType ext=1000)=0
virtual void ClearLookup()=0
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
virtual void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)=0
virtual int Resize(vtkIdType numTuples)=0
virtual vtkArrayIterator * NewIterator()=0
#define VTK_COMMON_EXPORT
Abstract superclass to iterate over elements in an vtkAbstractArray.
virtual void * GetVoidPointer(vtkIdType id)=0
virtual void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0
virtual vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source)=0
void save(Archiver &ar, const vtkVariant &variant, const unsigned int vtkNotUsed(version))
virtual unsigned long GetActualMemorySize()=0
virtual void Squeeze()=0
virtual void SetVariantValue(vtkIdType idx, vtkVariant value)=0
static vtkObject * New()
virtual int GetElementComponentSize()=0
String class that stores Unicode text.