vtkSMLoadStateOptionsProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
25 #ifndef vtkSMLoadStateOptionsProxy_h
26 #define vtkSMLoadStateOptionsProxy_h
27 
28 #include "vtkNew.h" // for vtkNew
29 #include "vtkRemotingServerManagerModule.h" //needed for exports
30 #include "vtkSMProxy.h"
31 
32 #include <vector> // needed for std::vector
33 
35 
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  static bool PNGHasStateFile(const char* statefilename, std::string& contents,
48  vtkTypeUInt32 location = 0x10 /*vtkPVSession::CLIENT*/);
50 
55  virtual bool PrepareToLoad(
56  const char* statefilename, vtkTypeUInt32 location = 0x10 /*vtkPVSession::CLIENT*/);
57 
62  virtual bool HasDataFiles();
63 
68  virtual bool Load();
69 
70  enum
71  {
72  USE_FILES_FROM_STATE = 0,
73  USE_DATA_DIRECTORY = 1,
74  CHOOSE_FILES_EXPLICITLY = 2
75  };
76 
80  vtkSMProperty* FindProperty(const char* name, int id, const char* pname);
81 
86  vtkSMProperty* FindLegacyProperty(const char* sanitizedName);
87 
91  bool IsPropertyModified(int id, const char* pname);
92 
97  std::string GetReaderName(int id) const;
98 
99 protected:
101  ~vtkSMLoadStateOptionsProxy() override;
102 
113  bool LocateFilesInDirectory(
114  std::vector<std::string>& filepaths, int path, bool clearFilenameIfNotFound);
115 
116  vtkSetStringMacro(StateFileName);
117  char* StateFileName;
118 
123 
129 
135 
136 private:
137  class vtkInternals;
138  vtkInternals* Internals;
139 
141  void operator=(const vtkSMLoadStateOptionsProxy&) = delete;
142 };
143 
144 #endif
proxy for state loading options
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
superclass for all SM properties
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
static vtkSMProxy * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
void operator=(const vtkSMProxy &)=delete
vtkSMProxyInternals * Internals
Definition: vtkSMProxy.h:1002
bool OnlyUseFilesInDataDirectory
When this is set to true, USE_DATA_DIRECTORY mode will fail when a file is not in the data directory ...
int DataFileOptions
The three options for how to specify the data file locations.
int PathMatchingThreshold
When the number of parent directories for a file series reaches this number assume it will match for ...