VTK  9.3.20240425
vtkSocketCollection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
12#ifndef vtkSocketCollection_h
13#define vtkSocketCollection_h
14
15#include "vtkCollection.h"
16#include "vtkCommonSystemModule.h" // For export macro
17
18VTK_ABI_NAMESPACE_BEGIN
19class vtkSocket;
20class VTKCOMMONSYSTEM_EXPORT vtkSocketCollection : public vtkCollection
21{
22public:
25 void PrintSelf(ostream& os, vtkIndent indent) override;
26
27 // Add Socket to the collection.
28 void AddItem(vtkSocket* soc);
29
36 int SelectSockets(unsigned long msec = 0);
37
42 vtkSocket* GetLastSelectedSocket() { return this->SelectedSocket; }
43
45
48 void ReplaceItem(int i, vtkObject*);
49 void RemoveItem(int i);
53
54protected:
57
59
60private:
61 // Hide the standard AddItem.
62 void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
63
65 void operator=(const vtkSocketCollection&) = delete;
66};
67
68VTK_ABI_NAMESPACE_END
69#endif
create and manipulate ordered lists of objects
void AddItem(vtkObject *)
Add an object to the bottom of the list.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
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:20