#include <vtkSocketCollection.h>
Apart from being vtkCollection subclass for sockets, this class provides means to wait for activity on all the sockets in the collection simultaneously.
Definition at line 29 of file vtkSocketCollection.h.
Public Types | |
typedef vtkCollection | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | AddItem (vtkSocket *soc) |
int | SelectSockets (unsigned long msec=0) |
vtkSocket * | GetLastSelectedSocket () |
void | ReplaceItem (int i, vtkObject *) |
void | RemoveItem (int i) |
void | RemoveItem (vtkObject *) |
void | RemoveAllItems () |
Static Public Member Functions | |
static vtkSocketCollection * | New () |
static int | IsTypeOf (const char *type) |
static vtkSocketCollection * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkSocketCollection () | |
~vtkSocketCollection () | |
Protected Attributes | |
vtkSocket * | SelectedSocket |
vtkSocketCollection::vtkSocketCollection | ( | ) | [protected] |
vtkSocketCollection::~vtkSocketCollection | ( | ) | [protected] |
static vtkSocketCollection* vtkSocketCollection::New | ( | ) | [static] |
Construct with empty list.
Reimplemented from vtkCollection.
virtual const char* vtkSocketCollection::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkCollection.
static int vtkSocketCollection::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkCollection.
virtual int vtkSocketCollection::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkCollection.
static vtkSocketCollection* vtkSocketCollection::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkCollection.
void vtkSocketCollection::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkCollection.
void vtkSocketCollection::AddItem | ( | vtkSocket * | soc | ) |
int vtkSocketCollection::SelectSockets | ( | unsigned long | msec = 0 |
) |
Select all Connected sockets in the collection. If msec is specified, it timesout after msec milliseconds on inactivity. Returns 0 on timeout, -1 on error; 1 is a socket was selected. The selected socket can be retrieved by GetLastSelectedSocket().
vtkSocket* vtkSocketCollection::GetLastSelectedSocket | ( | ) | [inline] |
Returns the socket selected during the last SelectSockets(), if any. NULL otherwise.
Definition at line 48 of file vtkSocketCollection.h.
void vtkSocketCollection::ReplaceItem | ( | int | i, | |
vtkObject * | ||||
) |
Overridden to unset SelectedSocket.
Reimplemented from vtkCollection.
void vtkSocketCollection::RemoveItem | ( | int | i | ) |
Overridden to unset SelectedSocket.
Reimplemented from vtkCollection.
void vtkSocketCollection::RemoveItem | ( | vtkObject * | ) |
Overridden to unset SelectedSocket.
Reimplemented from vtkCollection.
void vtkSocketCollection::RemoveAllItems | ( | ) |
Overridden to unset SelectedSocket.
Reimplemented from vtkCollection.
vtkSocket* vtkSocketCollection::SelectedSocket [protected] |
Definition at line 63 of file vtkSocketCollection.h.