11 #ifndef vtkStringList_h 12 #define vtkStringList_h 16 #include "vtkStringFormatter.h" 31 void AddString(
const char* str);
32 void AddUniqueString(
const char* str);
38 template <
typename... T>
41 std::string format = EventString ? EventString :
"";
42 if (vtk::is_printf_format(format))
45 vtkWarningMacro(<<
"The given format " << format <<
" is a printf format. The format will be " 46 <<
"converted to std::format. This conversion has been deprecated in 6.1.0");
47 format = vtk::printf_to_std_format(format);
49 auto formatedString = vtk::format(format, std::forward<T>(args)...);
50 this->AddString(formatedString.c_str());
56 void RemoveAllItems();
61 void SetString(
int idx,
const char* str);
66 int GetLength() {
return this->GetNumberOfStrings(); }
71 int GetIndex(
const char* str);
76 const char* GetString(
int idx);
81 int GetNumberOfStrings();
89 std::unique_ptr<vtkInternals> Internals;
#define VTKPVVTKEXTENSIONSCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void AddFormattedString(const char *EventString, T &&... args)
Add a command and format it any way you like.
int GetLength()
Get the length of the list.
void operator=(const vtkObjectBase &)
Manages allocation and freeing for a string list.