Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::strmod::SocketModuleChunk Class Reference

A special 'zero length' chunk that contains a SocketModule. More...

#include <StrMod/SockListenModule.h>

Inheritance diagram for strmod::strmod::SocketModuleChunk:

Inheritance graph
[legend]
List of all members.

Public Methods

 SocketModuleChunk (SocketModule *mod)
 Creates a SocketModule chunk wrapping SocketModule 'mod'.

virtual ~SocketModuleChunk ()
 If 'ReleaseModule' hasn't been called, also deletes wrapped SocketModule.

virtual int AreYouA (const lcore::ClassIdent &cid) const
 Asks if a class is of a particular type, or publicly derived from that type.

virtual unsigned int Length () const
 Number of octets this chunk takes up. May be deprecated.

SocketModule * getModule (bool release=true)
 Returns the wrapped SocketModule, and possibly forget about its existence.


Static Public Attributes

const STR_ClassIdent identifier
 A unique identifier for this class.


Protected Methods

virtual const lcore::ClassIdent * i_GetIdent () const
 See class Protocol.

virtual void acceptVisitor (ChunkVisitor &visitor) throw (ChunkVisitor::halt_visitation)
 Accept a ChunkVisitor, and maybe lead it through your children.


Detailed Description

A special 'zero length' chunk that contains a SocketModule.

This class is sort of a fake class to shove the listening socket into the standard StreamModule framework. The SockListenModule mints SocketModule instances, but all the plug definitions require that instances of StrChunk be passed between the plugs. This class wraps a SocketModule in a StrChunk. SocketModule's really can't be passed to anywhere outside the process, so all the methods for this class are going to act like this SockModuleChunk is empty.

Definition at line 73 of file SockListenModule.h.


Member Function Documentation

int strmod::strmod::SocketModuleChunk::AreYouA const lcore::ClassIdent &    cid const [inline, virtual]
 

Asks if a class is of a particular type, or publicly derived from that type.

Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.

Parameters:
cid Usually <class>::identifier for the class you want to ask if the object is an instance of.

Reimplemented from strmod::strmod::StrChunk.

Definition at line 250 of file SockListenModule.h.

SocketModule* strmod::strmod::SocketModuleChunk::getModule bool    release = true [inline]
 

Returns the wrapped SocketModule, and possibly forget about its existence.

Parameters:
release If this parameter is true, the SocketModuleChunk forgets the wrapped SocketModule and you become responsible for managing its existence (ie you must delete it at the proper time).

Definition at line 92 of file SockListenModule.h.


The documentation for this class was generated from the following files:
Generated on Wed Jan 29 00:32:54 2003 for libNet by doxygen1.3-rc1