VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSocketCollection.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00023 #ifndef __vtkSocketCollection_h 00024 #define __vtkSocketCollection_h 00025 00026 #include "vtkCommonSystemModule.h" // For export macro 00027 #include "vtkCollection.h" 00028 00029 class vtkSocket; 00030 class VTKCOMMONSYSTEM_EXPORT vtkSocketCollection : public vtkCollection 00031 { 00032 public: 00033 static vtkSocketCollection* New(); 00034 vtkTypeMacro(vtkSocketCollection, vtkCollection); 00035 void PrintSelf(ostream& os, vtkIndent indent); 00036 00037 // Add Socket to the collection. 00038 void AddItem(vtkSocket* soc); 00039 00044 int SelectSockets(unsigned long msec =0); 00045 00047 00049 vtkSocket* GetLastSelectedSocket() 00050 {return this->SelectedSocket; } 00052 00054 00055 void ReplaceItem(int i, vtkObject *); 00056 void RemoveItem(int i); 00057 void RemoveItem(vtkObject *); 00058 void RemoveAllItems(); 00059 protected: 00060 vtkSocketCollection(); 00061 ~vtkSocketCollection(); 00063 00064 vtkSocket* SelectedSocket; 00065 private: 00066 // Hide the standard AddItem. 00067 void AddItem(vtkObject* o) { this->Superclass::AddItem(o); } 00068 00069 private: 00070 vtkSocketCollection(const vtkSocketCollection&); // Not implemented. 00071 void operator=(const vtkSocketCollection&); // Not implemented. 00072 }; 00073 00074 #endif 00075