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 "vtkCollection.h"
27 
28 class vtkSocket;
30 {
31 public:
32  static vtkSocketCollection* New();
34  void PrintSelf(ostream& os, vtkIndent indent);
35 
36  // Add Socket to the collection.
37  void AddItem(vtkSocket* soc);
38 
43  int SelectSockets(unsigned long msec =0);
44 
46 
49  {return this->SelectedSocket; }
51 
53 
54  void ReplaceItem(int i, vtkObject *);
55  void RemoveItem(int i);
56  void RemoveItem(vtkObject *);
57  void RemoveAllItems();
58 protected:
62 
64 private:
65  // Hide the standard AddItem.
66  void AddItem(vtkObject* o) { this->Superclass::AddItem(o); }
67 
68 private:
69  vtkSocketCollection(const vtkSocketCollection&); // Not implemented.
70  void operator=(const vtkSocketCollection&); // Not implemented.
71 };
72 
73 #endif
74 
void ReplaceItem(int i, vtkObject *)
abstract base class for most VTK objects
Definition: vtkObject.h:60
void PrintSelf(ostream &os, vtkIndent indent)
void RemoveAllItems()
a collection for sockets.
vtkSocket * GetLastSelectedSocket()
a simple class to control print indentation
Definition: vtkIndent.h:37
static vtkCollection * New()
#define VTK_COMMON_EXPORT
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
BSD socket encapsulation.
Definition: vtkSocket.h:28
void RemoveItem(int i)