VTK
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 "vtkCommonSystemModule.h" // For export macro
28#include "vtkCollection.h"
29
30class vtkSocket;
31class VTKCOMMONSYSTEM_EXPORT vtkSocketCollection : public vtkCollection
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
37
38 // Add Socket to the collection.
39 void AddItem(vtkSocket* soc);
40
47 int SelectSockets(unsigned long msec =0);
48
54 {return this->SelectedSocket; }
55
57
60 void ReplaceItem(int i, vtkObject *);
61 void RemoveItem(int i);
65
66protected:
68 ~vtkSocketCollection() VTK_OVERRIDE;
69
70 vtkSocket* SelectedSocket;
71private:
72 // Hide the standard AddItem.
73 void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
74
75private:
76 vtkSocketCollection(const vtkSocketCollection&) VTK_DELETE_FUNCTION;
77 void operator=(const vtkSocketCollection&) VTK_DELETE_FUNCTION;
78};
79
80#endif
81
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
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.
void RemoveItem(vtkObject *)
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.
BSD socket encapsulation.
Definition: vtkSocket.h:31