VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkCommonCoreModule.h" // For export macro
38 #include "vtkAbstractArray.h"
39 #include "vtkUnicodeString.h" // For value type
40 
41 class VTKCOMMONCORE_EXPORT vtkUnicodeStringArray :
42  public vtkAbstractArray
43 {
44 public:
45  static vtkUnicodeStringArray* New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
49  virtual int Allocate(vtkIdType sz, vtkIdType ext=1000);
50  virtual void Initialize();
51  virtual int GetDataType();
52  virtual int GetDataTypeSize();
53  virtual int GetElementComponentSize();
54  virtual void SetNumberOfTuples(vtkIdType number);
55  virtual void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source);
58  virtual void* GetVoidPointer(vtkIdType id);
59  virtual void DeepCopy(vtkAbstractArray* da);
60  virtual void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
61  vtkAbstractArray* source, double* weights);
62  virtual void InterpolateTuple(vtkIdType i,
63  vtkIdType id1, vtkAbstractArray* source1,
64  vtkIdType id2, vtkAbstractArray* source2, double t);
65  virtual void Squeeze();
66  virtual int Resize(vtkIdType numTuples);
67  virtual void SetVoidArray(void *array, vtkIdType size, int save);
68  virtual unsigned long GetActualMemorySize();
69  virtual int IsNumeric();
70  virtual vtkArrayIterator* NewIterator();
72  virtual vtkIdType LookupValue(vtkVariant value);
73  virtual void LookupValue(vtkVariant value, vtkIdList* ids);
74 
75  virtual void SetVariantValue(vtkIdType idx, vtkVariant value);
76  virtual void DataChanged();
77  virtual void ClearLookup();
78 
79  vtkIdType InsertNextValue(const vtkUnicodeString&);
80  void InsertValue(vtkIdType idx, const vtkUnicodeString&); // Ranged checked
81  void SetValue(vtkIdType i, const vtkUnicodeString&); // Not ranged checked
82  vtkUnicodeString& GetValue(vtkIdType i);
83 
84  void InsertNextUTF8Value(const char*);
85  void SetUTF8Value(vtkIdType i, const char*);
86  const char* GetUTF8Value(vtkIdType i);
87 
88 protected:
89  vtkUnicodeStringArray(vtkIdType numComp = 1);
91 
92 private:
93  vtkUnicodeStringArray(const vtkUnicodeStringArray&); // Not implemented.
94  void operator=(const vtkUnicodeStringArray&); // Not implemented.
95 
96 //BTX
97  class Implementation;
98  Implementation* Internal;
99 //ETX
100 };
101 
102 #endif
103 
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:268
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:78
virtual int Allocate(vtkIdType sz, vtkIdType ext=1000)=0
virtual void ClearLookup()=0
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
virtual void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)=0
virtual int Resize(vtkIdType numTuples)=0
virtual vtkArrayIterator * NewIterator()=0
Abstract superclass to iterate over elements in an vtkAbstractArray.
virtual void * GetVoidPointer(vtkIdType id)=0
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
virtual void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source)=0
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.