VTK  9.3.0
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 
18 VTK_ABI_NAMESPACE_BEGIN
19 class vtkSocket;
20 class VTKCOMMONSYSTEM_EXPORT vtkSocketCollection : public vtkCollection
21 {
22 public:
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 
54 protected:
57 
59 
60 private:
61  // Hide the standard AddItem.
62  void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
63 
65  void operator=(const vtkSocketCollection&) = delete;
66 };
67 
68 VTK_ABI_NAMESPACE_END
69 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
void AddItem(vtkObject *)
Add an object to the bottom of the list.
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
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.
vtkSocket * GetLastSelectedSocket()
Returns the socket selected during the last SelectSockets(), if any.
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
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