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 =========================================================================*/
23 #ifndef vtkSocketCollection_h
24 #define vtkSocketCollection_h
25 
26 #include "vtkCommonSystemModule.h" // For export macro
27 #include "vtkCollection.h"
28 
29 class vtkSocket;
31 {
32 public:
33  static vtkSocketCollection* New();
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
37  // Add Socket to the collection.
38  void AddItem(vtkSocket* soc);
39 
44  int SelectSockets(unsigned long msec =0);
45 
47 
50  {return this->SelectedSocket; }
52 
54 
55  void ReplaceItem(int i, vtkObject *);
56  void RemoveItem(int i);
57  void RemoveItem(vtkObject *);
58  void RemoveAllItems();
59 protected:
63 
65 private:
66  // Hide the standard AddItem.
67  void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
68 
69 private:
70  vtkSocketCollection(const vtkSocketCollection&); // Not implemented.
71  void operator=(const vtkSocketCollection&); // Not implemented.
72 };
73 
74 #endif
75 
void ReplaceItem(int i, vtkObject *)
abstract base class for most VTK objects
Definition: vtkObject.h:61
void PrintSelf(ostream &os, vtkIndent indent)
void RemoveAllItems()
a collection for sockets.
vtkSocket * GetLastSelectedSocket()
#define VTKCOMMONSYSTEM_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkCollection * New()
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
BSD socket encapsulation.
Definition: vtkSocket.h:29
void RemoveItem(int i)