The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

XLineFactory Class Reference

XLineFactory is used to generate an XLine pointer, given just the pattern, timing information and type of line to create. More...

#include <xline.h>

Inheritance diagram for XLineFactory:

Inheritance graph
[legend]
Collaboration diagram for XLineFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XLineFactory (InspIRCd *Instance, const std::string &t)
 Create an XLine factory.
virtual const std::stringGetType ()
 Return the type of XLine this factory generates.
virtual XLineGenerate (time_t set_time, long duration, const char *source, const char *reason, const char *xline_specific_mask)=0
 Generate a specialized XLine*.
virtual bool AutoApplyToUserList (XLine *x)
virtual ~XLineFactory ()
 Destructor.

Protected Attributes

InspIRCdServerInstance
std::string type

Detailed Description

XLineFactory is used to generate an XLine pointer, given just the pattern, timing information and type of line to create.

This is used for example in the spanningtree module which will call an XLineFactory to create a new XLine when it is inbound on a server link, so that it does not have to know the specifics of the internals of an XLine class and/or how to call its constructor.

Definition at line 388 of file xline.h.


Constructor & Destructor Documentation

XLineFactory::XLineFactory InspIRCd Instance,
const std::string t
[inline]
 

Create an XLine factory.

Parameters:
Instance creator
t Type of XLine this factory generates

Definition at line 401 of file xline.h.

virtual XLineFactory::~XLineFactory  )  [inline, virtual]
 

Destructor.

Definition at line 422 of file xline.h.


Member Function Documentation

virtual bool XLineFactory::AutoApplyToUserList XLine x  )  [inline, virtual]
 

Reimplemented in CBanFactory.

Definition at line 418 of file xline.h.

Referenced by XLineManager::AddLine().

virtual XLine* XLineFactory::Generate time_t  set_time,
long  duration,
const char *  source,
const char *  reason,
const char *  xline_specific_mask
[pure virtual]
 

Generate a specialized XLine*.

Parameters:
set_time Time this line was created
duration Duration of the line
source The sender of the line, nickname or server
reason The reason for the line
xline_specific_mask The mask string for the line, specific to the XLine type being created.
Returns:
A specialized XLine class of the given type for this factory.

Implemented in CBanFactory, ShunFactory, SVSHoldFactory, RLineFactory, GLineFactory, ELineFactory, KLineFactory, QLineFactory, and ZLineFactory.

Referenced by TreeSocket::AddLine(), and ModuleXLineDB::ReadDatabase().

virtual const std::string& XLineFactory::GetType  )  [inline, virtual]
 

Return the type of XLine this factory generates.

Returns:
The type of XLine this factory generates

Definition at line 406 of file xline.h.

Referenced by XLineManager::RegisterFactory(), and XLineManager::UnregisterFactory().


Member Data Documentation

InspIRCd* XLineFactory::ServerInstance [protected]
 

Definition at line 392 of file xline.h.

Referenced by SVSHoldFactory::Generate(), ShunFactory::Generate(), and CBanFactory::Generate().

std::string XLineFactory::type [protected]
 

Definition at line 393 of file xline.h.


The documentation for this class was generated from the following file: