VTK  9.7.1
vtkOpenXRManagerConnection.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkOpenXRManagerConnection_h
17 #define vtkOpenXRManagerConnection_h
18 
19 #include "vtkObject.h"
20 #include "vtkRenderingOpenXRModule.h" // For export macro
21 
22 namespace vtk::detail
23 {
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkOpenXRManager;
26 VTK_ABI_NAMESPACE_END
27 }
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRManagerConnection : public vtkObject
31 {
32 public:
35 
39  virtual bool Initialize() { return true; }
40 
44  virtual bool EndInitialize() { return true; }
45 
49  virtual const char* GetExtensionName() { return ""; }
50 
52 
55  void SetIPAddress(std::string ip) { this->IPAddress = std::move(ip); }
56  std::string const& GetIPAddress() const { return this->IPAddress; }
58 
59 protected:
60  vtkOpenXRManagerConnection() = default;
61  ~vtkOpenXRManagerConnection() override = default;
62 
63  // IP Address to connect to
65 
66  virtual bool ConnectToRemote(vtk::detail::vtkOpenXRManager& vtkNotUsed(manager)) { return true; }
67 
68  friend class vtk::detail::vtkOpenXRManager; // for vtkOpenXRManager::Initialize
69 
70 private:
72  void operator=(const vtkOpenXRManagerConnection&) = delete;
73 };
74 
75 VTK_ABI_NAMESPACE_END
76 #endif
Singleton class that holds a collection of utility functions and member variables to communicate with...
abstract base class for most VTK objects
Definition: vtkObject.h:52
void SetIPAddress(std::string ip)
Specify the address to connect to.
virtual bool ConnectToRemote(vtk::detail::vtkOpenXRManager &manager)
std::string const & GetIPAddress() const
Specify the address to connect to.
virtual bool Initialize()
Function called by vtkOpenXRManager before OpenXR initialization.
virtual bool EndInitialize()
Function called by vtkOpenXRManager after OpenXR initialization.
OpenXR manager connection no-op implementation.
virtual const char * GetExtensionName()
Return the OpenXR extension name that corresponds to this connection strategy.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...