InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Protected Attributes | List of all members
XLineFactory Class Referenceabstract

#include <xline.h>

Inheritance diagram for XLineFactory:
ELineFactory GLineFactory KLineFactory QLineFactory ZLineFactory

Public Member Functions

 XLineFactory (const std::string &t)
 
virtual const std::string & GetType ()
 
virtual XLineGenerate (time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)=0
 
virtual bool AutoApplyToUserList (XLine *x)
 
virtual ~XLineFactory ()
 

Protected Attributes

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.

Constructor & Destructor Documentation

XLineFactory::XLineFactory ( const std::string &  t)
inline

Create an XLine factory

Parameters
tType of XLine this factory generates
virtual XLineFactory::~XLineFactory ( )
inlinevirtual

Destructor

Member Function Documentation

virtual XLine* XLineFactory::Generate ( time_t  set_time,
long  duration,
std::string  source,
std::string  reason,
std::string  xline_specific_mask 
)
pure virtual

Generate a specialized XLine*.

Parameters
set_timeTime this line was created
durationDuration of the line
sourceThe sender of the line, nickname or server
reasonThe reason for the line
xline_specific_maskThe 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 ZLineFactory, QLineFactory, KLineFactory, ELineFactory, and GLineFactory.

virtual const std::string& XLineFactory::GetType ( )
inlinevirtual

Return the type of XLine this factory generates

Returns
The type of XLine this factory generates

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