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 
36 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMLoadStateOptionsProxy : public vtkSMProxy
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
vtkSMSessionProxyManager
Definition: vtkSMSessionProxyManager.h:135
vtkSMProxy::New
static vtkSMProxy * New()
vtkSMProxy::Internals
vtkSMProxyInternals * Internals
Definition: vtkSMProxy.h:1002
vtkSMLoadStateOptionsProxy::DataFileOptions
int DataFileOptions
The three options for how to specify the data file locations.
Definition: vtkSMLoadStateOptionsProxy.h:122
vtkSMLoadStateOptionsProxy::PathMatchingThreshold
int PathMatchingThreshold
When the number of parent directories for a file series reaches this number assume it will match for ...
Definition: vtkSMLoadStateOptionsProxy.h:128
vtkSMProperty
superclass for all SM properties
Definition: vtkSMProperty.h:144
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkSMLoadStateOptionsProxy
proxy for state loading options
Definition: vtkSMLoadStateOptionsProxy.h:36
vtkSMProxy::operator=
void operator=(const vtkSMProxy &)=delete
vtkIndent
vtkSMLoadStateOptionsProxy::StateFileName
char * StateFileName
Definition: vtkSMLoadStateOptionsProxy.h:116
vtkSMProxy.h
vtkNew.h
vtkSMProxy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSMLoadStateOptionsProxy::OnlyUseFilesInDataDirectory
bool OnlyUseFilesInDataDirectory
When this is set to true, USE_DATA_DIRECTORY mode will fail when a file is not in the data directory ...
Definition: vtkSMLoadStateOptionsProxy.h:134