IRC SERVER
The goal of this project is to make you write your own IRC server.
Command Class Referenceabstract

#include <Command.hpp>

Inheritance diagram for Command:
Inheritance graph
Collaboration diagram for Command:
Collaboration graph

Public Member Functions

std::string getName () const
 
std::string getDescription () const
 
std::string getUsage () const
 
std::map< size_t, std::string > getExample () const
 
ClientgetSender () const
 
void setSender (Client *sender)
 
void setServer (Server *server)
 
void setMessage (Message *message)
 
bool hasOpe (void)
 
bool needsAuth (void)
 
virtual void execute ()=0
 
virtual bool validate (void)
 
virtual std::vector< Messageparser (Message *message)
 
 Command ()
 
void missingOpe (void)
 
virtual ~Command ()
 

Protected Attributes

std::string _name
 
std::string _description
 
std::string _usage
 
bool _is_ope
 
bool _needs_auth
 
std::map< size_t, std::string > _example
 
Client_sender
 
Server_server
 
Message_message
 
size_t _sender_index
 

Constructor & Destructor Documentation

◆ Command()

Command::Command ( )
inline

◆ ~Command()

virtual Command::~Command ( )
inlinevirtual

Member Function Documentation

◆ execute()

virtual void Command::execute ( )
pure virtual

Implemented in Mode, Join, PrivMsg, Kick, Part, Notice, Nick, Whois, Invite, Topic, Pass, User, Names, List, Help, Quit, and Ping.

◆ getDescription()

std::string Command::getDescription ( ) const
inline

◆ getExample()

std::map<size_t, std::string> Command::getExample ( ) const
inline

◆ getName()

std::string Command::getName ( ) const
inline
Here is the caller graph for this function:

◆ getSender()

Client* Command::getSender ( ) const
inline

◆ getUsage()

std::string Command::getUsage ( ) const
inline

◆ hasOpe()

bool Command::hasOpe ( void  )
inline

◆ missingOpe()

void Command::missingOpe ( void  )
inline
Here is the call graph for this function:

◆ needsAuth()

bool Command::needsAuth ( void  )
inline

◆ parser()

virtual std::vector<Message> Command::parser ( Message message)
inlinevirtual

Reimplemented in Join, and PrivMsg.

◆ setMessage()

void Command::setMessage ( Message message)
inline

◆ setSender()

void Command::setSender ( Client sender)
inline

◆ setServer()

void Command::setServer ( Server server)
inline

◆ validate()

virtual bool Command::validate ( void  )
inlinevirtual

Reimplemented in Whois, Notice, Join, Kick, Pass, PrivMsg, User, Nick, Topic, Invite, Part, and Mode.

Member Data Documentation

◆ _description

std::string Command::_description
protected

◆ _example

std::map<size_t, std::string> Command::_example
protected

◆ _is_ope

bool Command::_is_ope
protected

◆ _message

Message* Command::_message
protected

◆ _name

std::string Command::_name
protected

◆ _needs_auth

bool Command::_needs_auth
protected

◆ _sender

Client* Command::_sender
protected

◆ _sender_index

size_t Command::_sender_index
protected

◆ _server

Server* Command::_server
protected

◆ _usage

std::string Command::_usage
protected

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