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 
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 
44  vtkOStreamWrapper& os, const vtkClientServerID& id);
45 
46 #endif
47 // VTK-HeaderTest-Exclude: vtkClientServerID.h
bool operator!=(const vtkClientServerID &i) const
VTKREMOTINGCLIENTSERVERSTREAM_EXPORT ostream & operator<<(ostream &os, const vtkClientServerID &id)
bool operator<(const vtkClientServerID &i) const
#define VTKREMOTINGCLIENTSERVERSTREAM_EXPORT
Identifier for a ClientServer object.
vtkClientServerID(vtkTypeUInt32 id)
bool operator==(const vtkClientServerID &i) const