vtkClientServerID.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkClientServerID_h
14 #define vtkClientServerID_h
15 
16 #include "vtkIOStream.h" // Needed for operator <<
17 #include "vtkRemotingClientServerStreamModule.h" // Top-level vtkClientServer header.
18 #include "vtkSystemIncludes.h" // vtkTypeUInt32
19 
20 struct VTKREMOTINGCLIENTSERVERSTREAM_EXPORT vtkClientServerID
21 {
23  : ID(0)
24  {
25  }
26  explicit vtkClientServerID(vtkTypeUInt32 id)
27  : ID(id)
28  {
29  }
30 
31  bool IsNull() { return this->ID == 0; }
32  void SetToNull() { this->ID = 0; }
33 
34  // Convenience operators.
35  bool operator<(const vtkClientServerID& i) const { return this->ID < i.ID; }
36  bool operator==(const vtkClientServerID& i) const { return this->ID == i.ID; }
37  bool operator!=(const vtkClientServerID& i) const { return this->ID != i.ID; }
38  // The identifying integer.
39  vtkTypeUInt32 ID;
40 };
41 
42 VTKREMOTINGCLIENTSERVERSTREAM_EXPORT ostream& operator<<(ostream& os, const vtkClientServerID& id);
43 VTKREMOTINGCLIENTSERVERSTREAM_EXPORT vtkOStreamWrapper& operator<<(
44  vtkOStreamWrapper& os, const vtkClientServerID& id);
45 
46 #endif
47 // VTK-HeaderTest-Exclude: vtkClientServerID.h
operator<<
VTKREMOTINGCLIENTSERVERSTREAM_EXPORT ostream & operator<<(ostream &os, const vtkClientServerID &id)
vtkClientServerID
Identifier for a ClientServer object.
Definition: vtkClientServerID.h:20
vtkClientServerID::IsNull
bool IsNull()
Definition: vtkClientServerID.h:31
vtkClientServerID::operator<
bool operator<(const vtkClientServerID &i) const
Definition: vtkClientServerID.h:35
vtkOStreamWrapper
vtkClientServerID::SetToNull
void SetToNull()
Definition: vtkClientServerID.h:32
vtkClientServerID::ID
vtkTypeUInt32 ID
Definition: vtkClientServerID.h:39
vtkClientServerID::operator!=
bool operator!=(const vtkClientServerID &i) const
Definition: vtkClientServerID.h:37
vtkClientServerID::vtkClientServerID
vtkClientServerID()
Definition: vtkClientServerID.h:22
vtkIOStream.h
vtkClientServerID::vtkClientServerID
vtkClientServerID(vtkTypeUInt32 id)
Definition: vtkClientServerID.h:26
vtkClientServerID::operator==
bool operator==(const vtkClientServerID &i) const
Definition: vtkClientServerID.h:36
vtkSystemIncludes.h