SGCT master (487fac4)
Simple Graphics Cluster Toolkit
Loading...
Searching...
No Matches
node.h
Go to the documentation of this file.
1/*****************************************************************************************
2 * SGCT *
3 * Simple Graphics Cluster Toolkit *
4 * *
5 * Copyright (c) 2012-2026 *
6 * For conditions of distribution and use, see copyright notice in LICENSE.md *
7 ****************************************************************************************/
8
9#ifndef __SGCT__NODE__H__
10#define __SGCT__NODE__H__
11
12#include <sgct/sgctexports.h>
13
14#include <sgct/window.h>
15#include <cstdint>
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace sgct::config { struct Node; }
21
22namespace sgct {
23
24class SGCT_EXPORT Node {
25public:
26 Node(const config::Node& node, bool initializeWindows);
27
28 Node(const Node&) = delete;
29 Node(Node&&) = default;
30 Node& operator=(const Node&) = delete;
31 Node& operator=(Node&&) = delete;
32
36 void addWindow(std::unique_ptr<Window> window);
37
42
46 bool isUsingSwapGroups() const;
47
48 const std::vector<std::unique_ptr<Window>>& windows() const;
49
53 const std::string& address() const;
54
58 int syncPort() const;
59
63 int dataTransferPort() const;
64
65private:
66 const std::string _address;
67 const uint16_t _syncPort;
68 const uint16_t _dataTransferPort;
69 const bool _useSwapGroups;
70
71 std::vector<std::unique_ptr<Window>> _windows;
72};
73
74} // namespace sgct
75
76#endif // __SGCT__NODE__H__
Node(const config::Node &node, bool initializeWindows)
void addWindow(std::unique_ptr< Window > window)
Add a window to this node.
const std::vector< std::unique_ptr< Window > > & windows() const
Node & operator=(const Node &)=delete
int syncPort() const
bool isUsingSwapGroups() const
Is this node using nvidia swap groups for its windows?
Node(Node &&)=default
int dataTransferPort() const
Node(const Node &)=delete
const std::string & address() const
bool closeAllWindows()
Check if all windows are set to close and close them.
Node & operator=(Node &&)=delete
Definition clustermanager.h:22
Definition actions.h:16
Definition config.h:413