InspIRCd  4.0
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, unsigned long duration, const std::string &source, const std::string &reason, const std::string &xline_specific_mask)=0
virtual bool AutoApplyToUserList (XLine *x)
virtual ~XLineFactory ()=default

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::XLineFactory ( const std::string &  t)

Create an XLine factory

tType of XLine this factory generates

◆ ~XLineFactory()

virtual XLineFactory::~XLineFactory ( )


Member Function Documentation

◆ Generate()

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

Generate a specialized XLine*.

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.
A specialized XLine class of the given type for this factory.

Implemented in ZLineFactory, QLineFactory, KLineFactory, ELineFactory, and GLineFactory.

◆ GetType()

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

Return the type of XLine this factory generates

The type of XLine this factory generates

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