VTK  9.0.1
vtkSocketCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSocketCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
24 #ifndef vtkSocketCollection_h
25 #define vtkSocketCollection_h
26 
27 #include "vtkCollection.h"
28 #include "vtkCommonSystemModule.h" // For export macro
29 
30 class vtkSocket;
31 class VTKCOMMONSYSTEM_EXPORT vtkSocketCollection : public vtkCollection
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38  // Add Socket to the collection.
39  void AddItem(vtkSocket* soc);
40 
47  int SelectSockets(unsigned long msec = 0);
48 
53  vtkSocket* GetLastSelectedSocket() { return this->SelectedSocket; }
54 
56 
59  void ReplaceItem(int i, vtkObject*);
60  void RemoveItem(int i);
64 
65 protected:
68 
70 
71 private:
72  // Hide the standard AddItem.
73  void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
74 
75 private:
77  void operator=(const vtkSocketCollection&) = delete;
78 };
79 
80 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
void AddItem(vtkObject *)
Add an object to the bottom of the list.
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
a collection for sockets.
void RemoveItem(int i)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSocket * GetLastSelectedSocket()
Returns the socket selected during the last SelectSockets(), if any.
void RemoveItem(vtkObject *)
static vtkSocketCollection * New()
void AddItem(vtkSocket *soc)
void ReplaceItem(int i, vtkObject *)
Overridden to unset SelectedSocket.
~vtkSocketCollection() override
int SelectSockets(unsigned long msec=0)
Select all Connected sockets in the collection.
BSD socket encapsulation.
Definition: vtkSocket.h:31