Pol  Rev 533
ConfigElem Class Reference

#include <cfgelem.h>

+ Inheritance diagram for ConfigElem:
+ Collaboration diagram for ConfigElem:

List of all members.

Public Member Functions

 ConfigElem ()
 ~ConfigElem ()
void add_prop (const char *propname, const char *str)
void add_prop (const char *propname, unsigned int lval)
void add_prop (const char *propname, unsigned short sval)
void add_prop (const char *propname, short sval)
void clear_prop (const char *propname)
void get_prop (const char *propname, unsigned int *plong) const
bool has_prop (const char *propname) const
bool read_prop (const char *propname, std::string *value) const
std::string read_string (const char *propname) const
std::string read_string (const char *propname, const char *dflt) const
bool remove_bool (const char *propname)
bool remove_bool (const char *propname, bool dflt)
double remove_double (const char *propname, double dflt)
bool remove_first_prop (std::string *propname, std::string *value)
float remove_float (const char *propname, float dflt)
int remove_int (const char *propname)
int remove_int (const char *propname, int dflt)
bool remove_prop (const char *propname, std::string *value)
bool remove_prop (const char *propname, unsigned int *plong)
bool remove_prop (const char *propname, unsigned short *pushort)
std::string remove_string (const char *propname)
std::string remove_string (const char *propname, const char *dflt)
unsigned int remove_ulong (const char *propname)
unsigned int remove_ulong (const char *propname, unsigned int dflt)
unsigned remove_unsigned (const char *propname)
unsigned remove_unsigned (const char *propname, int dflt)
unsigned short remove_ushort (const char *propname)
unsigned short remove_ushort (const char *propname, unsigned short dflt)
void set_rest (const char *newrest)
void set_source (const ConfigElem &elem)
void set_source (const ConfigSource *source)
void set_type (const char *newtype)
void throw_error (const std::string &errmsg) const
void warn (const std::string &errmsg) const
void warn_with_line (const std::string &errmsg) const

Protected Types

typedef std::multimap
< std::string, std::string,
ci_cmp_pred
Props

Protected Member Functions

void prop_not_found (const char *propname) const

Protected Attributes

Props properties

Friends

class ConfigFile

Detailed Description

Definition at line 48 of file cfgelem.h.


Member Typedef Documentation

typedef std::multimap<std::string,std::string,ci_cmp_pred> ConfigElem::Props [protected]

Definition at line 110 of file cfgelem.h.


Constructor & Destructor Documentation

Definition at line 81 of file cfgfile.cpp.

Definition at line 86 of file cfgfile.cpp.


Member Function Documentation

void ConfigElem::add_prop ( const char *  propname,
unsigned int  lval 
)

Definition at line 577 of file cfgfile.cpp.

References OSTRINGSTREAM, OSTRINGSTREAM_STR, and properties.

void ConfigElem::add_prop ( const char *  propname,
unsigned short  sval 
)

Definition at line 551 of file cfgfile.cpp.

References OSTRINGSTREAM, OSTRINGSTREAM_STR, and properties.

void ConfigElem::add_prop ( const char *  propname,
short  sval 
)

Definition at line 558 of file cfgfile.cpp.

References OSTRINGSTREAM, OSTRINGSTREAM_STR, and properties.

void ConfigElem::clear_prop ( const char *  propname)

Definition at line 531 of file cfgfile.cpp.

References remove_prop().

Referenced by add_npc(), UOExecutorModule::mf_CreateNpcFromTemplate(), and replace_properties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConfigElem::get_prop ( const char *  propname,
unsigned int *  plong 
) const

Definition at line 217 of file cfgfile.cpp.

References properties, and throw_error().

Referenced by StorageArea::load_item(), read_character(), read_global_item(), read_multi(), and read_npc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ConfigElem::has_prop ( const char *  propname) const
void ConfigElem::prop_not_found ( const char *  propname) const [protected]

Definition at line 356 of file cfgfile.cpp.

References throw_error().

Referenced by read_string(), remove_string(), remove_ulong(), and remove_ushort().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ConfigElem::read_prop ( const char *  propname,
std::string *  value 
) const

Definition at line 188 of file cfgfile.cpp.

References properties.

Referenced by read_string().

+ Here is the caller graph for this function:

string ConfigElem::read_string ( const char *  propname) const

Definition at line 442 of file cfgfile.cpp.

References prop_not_found(), and read_prop().

Referenced by UOExecutorModule::mf_CreateNpcFromTemplate(), NpcTemplate::NpcTemplate(), and Package::Package().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string ConfigElem::read_string ( const char *  propname,
const char *  dflt 
) const

Definition at line 455 of file cfgfile.cpp.

References read_prop().

+ Here is the call graph for this function:

bool ConfigElem::remove_bool ( const char *  propname,
bool  dflt 
)

Definition at line 478 of file cfgfile.cpp.

References remove_ushort().

+ Here is the call graph for this function:

double ConfigElem::remove_double ( const char *  propname,
double  dflt 
)

Definition at line 495 of file cfgfile.cpp.

References remove_prop().

Referenced by read_movecost(), read_servspecopt(), Character::readCommonProperties(), and Equipment::readProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ConfigElem::remove_first_prop ( std::string *  propname,
std::string *  value 
)
float ConfigElem::remove_float ( const char *  propname,
float  dflt 
)

Definition at line 483 of file cfgfile.cpp.

References remove_prop().

+ Here is the call graph for this function:

int ConfigElem::remove_int ( const char *  propname)

Definition at line 387 of file cfgfile.cpp.

References remove_string().

Referenced by read_pol_config(), Character::readCommonProperties(), Equipment::readProperties(), UArmor::readProperties(), UWeapon::readProperties(), Item::readProperties(), UObject::readProperties(), and xmain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ConfigElem::remove_int ( const char *  propname,
int  dflt 
)

Definition at line 394 of file cfgfile.cpp.

References remove_prop().

+ Here is the call graph for this function:

bool ConfigElem::remove_prop ( const char *  propname,
unsigned int *  plong 
)

Definition at line 230 of file cfgfile.cpp.

References properties.

bool ConfigElem::remove_prop ( const char *  propname,
unsigned short *  pushort 
)

Definition at line 261 of file cfgfile.cpp.

References remove_prop(), and throw_error().

+ Here is the call graph for this function:

string ConfigElem::remove_string ( const char *  propname,
const char *  dflt 
)

Definition at line 464 of file cfgfile.cpp.

References remove_prop().

+ Here is the call graph for this function:

unsigned int ConfigElem::remove_ulong ( const char *  propname,
unsigned int  dflt 
)

Definition at line 522 of file cfgfile.cpp.

References remove_prop().

+ Here is the call graph for this function:

unsigned ConfigElem::remove_unsigned ( const char *  propname)

Definition at line 407 of file cfgfile.cpp.

References remove_string().

Referenced by read_extobj(), read_pol_config(), read_starting_locations(), and Character::readCommonProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned ConfigElem::remove_unsigned ( const char *  propname,
int  dflt 
)

Definition at line 414 of file cfgfile.cpp.

References remove_prop().

+ Here is the call graph for this function:

unsigned short ConfigElem::remove_ushort ( const char *  propname,
unsigned short  dflt 
)

Definition at line 378 of file cfgfile.cpp.

References remove_prop().

+ Here is the call graph for this function:

void ConfigElem::set_rest ( const char *  newrest)

Definition at line 101 of file cfgfile.cpp.

References ConfigElemBase::rest(), and ConfigElemBase::rest_.

Referenced by create_intrinsic_weapon_from_npctemplate(), CreateItemDescriptor(), and FindNpcTemplate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConfigElem::set_source ( const ConfigElem elem)

Definition at line 111 of file cfgfile.cpp.

References ConfigElemBase::_source.

Referenced by NpcTemplateElem::copyto(), create_intrinsic_weapon_from_npctemplate(), and CreateItemDescriptor().

+ Here is the caller graph for this function:

void ConfigElem::set_source ( const ConfigSource source)

Definition at line 115 of file cfgfile.cpp.

References ConfigElemBase::_source.

void ConfigElem::set_type ( const char *  newtype)

Definition at line 106 of file cfgfile.cpp.

References ConfigElemBase::type(), and ConfigElemBase::type_.

Referenced by CreateItemDescriptor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConfigElem::warn ( const std::string &  errmsg) const

Definition at line 344 of file cfgfile.cpp.

References ConfigElemBase::_source, and ConfigSource::display_error().

Referenced by UOSkill::UOSkill(), and WeaponDesc::WeaponDesc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConfigElem::warn_with_line ( const std::string &  errmsg) const

Definition at line 350 of file cfgfile.cpp.

References ConfigElemBase::_source, and ConfigSource::display_error().

Referenced by StorageArea::load_item(), read_global_item(), and read_shadow_realms().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ConfigFile [friend]

Definition at line 54 of file cfgelem.h.


Member Data Documentation


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