vtkStringList.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkStringList.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkStringList_h
24 #define vtkStringList_h
25 
26 #include "vtkObject.h"
27 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export macro
28 #include <memory> // for std::unique_ptr
29 
31 {
32 public:
33  static vtkStringList* New();
34  vtkTypeMacro(vtkStringList, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  void AddString(const char* str);
42  void AddUniqueString(const char* str);
44 
48  void AddFormattedString(const char* EventString, ...);
49 
53  void RemoveAllItems();
54 
58  void SetString(int idx, const char* str);
59 
63  int GetLength() { return this->GetNumberOfStrings(); }
64 
68  int GetIndex(const char* str);
69 
73  const char* GetString(int idx);
74 
78  int GetNumberOfStrings();
79 
80 protected:
81  vtkStringList();
82  ~vtkStringList() override;
83 
84 private:
85  class vtkInternals;
86  std::unique_ptr<vtkInternals> Internals;
87 
88  vtkStringList(const vtkStringList&) = delete;
89  void operator=(const vtkStringList&) = delete;
90 };
91 
92 #endif
#define VTKPVVTKEXTENSIONSCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
static vtkObject * New()
int GetLength()
Get the length of the list.
Definition: vtkStringList.h:63
void operator=(const vtkObjectBase &)
Manages allocation and freeing for a string list.
Definition: vtkStringList.h:30