vtkClientServerID.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkClientServerID.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkClientServerID_h
26 #define vtkClientServerID_h
27 
28 #include "vtkIOStream.h" // Needed for operator <<
29 #include "vtkRemotingClientServerStreamModule.h" // Top-level vtkClientServer header.
30 #include "vtkSystemIncludes.h" // vtkTypeUInt32
31 
33 {
35  : ID(0)
36  {
37  }
38  explicit vtkClientServerID(vtkTypeUInt32 id)
39  : ID(id)
40  {
41  }
42 
43  bool IsNull() { return this->ID == 0; }
44  void SetToNull() { this->ID = 0; }
45 
46  // Convenience operators.
47  bool operator<(const vtkClientServerID& i) const { return this->ID < i.ID; }
48  bool operator==(const vtkClientServerID& i) const { return this->ID == i.ID; }
49  bool operator!=(const vtkClientServerID& i) const { return this->ID != i.ID; }
50  // The identifying integer.
51  vtkTypeUInt32 ID;
52 };
53 
56  vtkOStreamWrapper& os, const vtkClientServerID& id);
57 
58 #endif
59 // 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