Anope IRC Services  Version 2.0
Public Types | Public Member Functions | Private Attributes | Friends
Configuration::Block Class Reference

#include <config.h>

Inheritance diagram for Configuration::Block:
Inheritance graph
[legend]
Collaboration diagram for Configuration::Block:
Collaboration graph
[legend]

Public Types

typedef Anope::map< Anope::stringitem_map
 
typedef Anope::multimap< Blockblock_map
 

Public Member Functions

 Block (const Anope::string &)
 
const Anope::stringGetName () const
 
int CountBlock (const Anope::string &name)
 
BlockGetBlock (const Anope::string &name, int num=0)
 
template<typename T >
Get (const Anope::string &tag)
 
template<typename T >
Get (const Anope::string &tag, const Anope::string &def) const
 
bool Set (const Anope::string &tag, const Anope::string &value)
 
const item_mapGetItems () const
 
template<>
CoreExport const Anope::string Get (const Anope::string &tag, const Anope::string &def) const
 
template<>
CoreExport time_t Get (const Anope::string &tag, const Anope::string &def) const
 
template<>
CoreExport bool Get (const Anope::string &tag, const Anope::string &def) const
 
template<>
const Anope::string Get (const Anope::string &tag, const Anope::string &def) const
 
template<>
time_t Get (const Anope::string &tag, const Anope::string &def) const
 
template<>
bool Get (const Anope::string &tag, const Anope::string &def) const
 

Private Attributes

Anope::string name
 
item_map items
 
block_map blocks
 
int linenum
 

Friends

struct Conf
 

Detailed Description

Definition at line 24 of file config.h.

Member Typedef Documentation

◆ block_map

Definition at line 30 of file config.h.

◆ item_map

Definition at line 29 of file config.h.

Constructor & Destructor Documentation

◆ Block()

Block::Block ( const Anope::string n)

Definition at line 26 of file config.cpp.

Member Function Documentation

◆ CountBlock()

int Block::CountBlock ( const Anope::string name)

◆ Get() [1/8]

template<typename T >
T Configuration::Block::Get ( const Anope::string tag)
inline

◆ Get() [2/8]

template<typename T >
T Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const
inline

Definition at line 51 of file config.h.

References CoreExport, Anope::string::empty(), and Get().

◆ Get() [3/8]

template<>
CoreExport const Anope::string Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const

◆ Get() [4/8]

template<>
CoreExport time_t Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const

◆ Get() [5/8]

template<>
CoreExport bool Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const

◆ Get() [6/8]

template<>
const Anope::string Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const

Definition at line 73 of file config.cpp.

References items.

◆ Get() [7/8]

template<>
time_t Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const

Definition at line 85 of file config.cpp.

References Anope::DoTime().

◆ Get() [8/8]

template<>
bool Configuration::Block::Get ( const Anope::string tag,
const Anope::string def 
) const

Definition at line 90 of file config.cpp.

References Anope::string::empty(), and Anope::string::equals_ci().

◆ GetBlock()

Block * Block::GetBlock ( const Anope::string name,
int  num = 0 
)

◆ GetItems()

const Block::item_map * Block::GetItems ( ) const

Definition at line 65 of file config.cpp.

References items.

Referenced by CommandOSConfig::Execute().

◆ GetName()

const Anope::string & Block::GetName ( ) const

Definition at line 30 of file config.cpp.

References name.

Referenced by Configuration::Conf::Conf(), and CommandOSConfig::Execute().

◆ Set()

bool Block::Set ( const Anope::string tag,
const Anope::string value 
)

Definition at line 56 of file config.cpp.

References items.

Referenced by CommandOSConfig::Execute().

Friends And Related Function Documentation

◆ Conf

friend struct Conf
friend

Definition at line 26 of file config.h.

Field Documentation

◆ blocks

block_map Configuration::Block::blocks
private

◆ items

item_map Configuration::Block::items
private

Definition at line 34 of file config.h.

Referenced by Get(), GetItems(), and Set().

◆ linenum

int Configuration::Block::linenum
private

Definition at line 36 of file config.h.

Referenced by Configuration::Conf::LoadConf().

◆ name

Anope::string Configuration::Block::name
private

Definition at line 33 of file config.h.

Referenced by Configuration::Conf::Conf(), and GetName().


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