VTK  9.1.0
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
30class vtkSocket;
31class VTKCOMMONSYSTEM_EXPORT vtkSocketCollection : public vtkCollection
32{
33public:
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
65protected:
68
70
71private:
72 // Hide the standard AddItem.
73 void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
74
75private:
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:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
a collection for sockets.
void RemoveItem(int i)
Overridden to unset SelectedSocket.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RemoveItem(vtkObject *)
Overridden to unset SelectedSocket.
static vtkSocketCollection * New()
void AddItem(vtkSocket *soc)
void ReplaceItem(int i, vtkObject *)
Overridden to unset SelectedSocket.
~vtkSocketCollection() override
vtkSocket * GetLastSelectedSocket()
Returns the socket selected during the last SelectSockets(), if any.
int SelectSockets(unsigned long msec=0)
Select all Connected sockets in the collection.
void RemoveAllItems()
Overridden to unset SelectedSocket.
BSD socket encapsulation.
Definition: vtkSocket.h:31