vtkStringList.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkStringList_h
12 #define vtkStringList_h
13 
14 #include "vtkObject.h"
15 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export macro
16 #include <memory> // for std::unique_ptr
17 
19 {
20 public:
21  static vtkStringList* New();
22  vtkTypeMacro(vtkStringList, vtkObject);
23  void PrintSelf(ostream& os, vtkIndent indent) override;
24 
26 
29  void AddString(const char* str);
30  void AddUniqueString(const char* str);
32 
36  void AddFormattedString(const char* EventString, ...);
37 
41  void RemoveAllItems();
42 
46  void SetString(int idx, const char* str);
47 
51  int GetLength() { return this->GetNumberOfStrings(); }
52 
56  int GetIndex(const char* str);
57 
61  const char* GetString(int idx);
62 
66  int GetNumberOfStrings();
67 
68 protected:
69  vtkStringList();
70  ~vtkStringList() override;
71 
72 private:
73  class vtkInternals;
74  std::unique_ptr<vtkInternals> Internals;
75 
76  vtkStringList(const vtkStringList&) = delete;
77  void operator=(const vtkStringList&) = delete;
78 };
79 
80 #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:51
void operator=(const vtkObjectBase &)
Manages allocation and freeing for a string list.
Definition: vtkStringList.h:18