Pol  Rev 533
BStruct Class Reference

#include <bstruct.h>

+ Inheritance diagram for BStruct:
+ Collaboration diagram for BStruct:

List of all members.

Public Types

typedef map< std::string,
BObjectRef, ci_cmp_pred
Contents

Public Member Functions

 BStruct ()
 BStruct (std::istream &is, unsigned size, BObjectType type)
void addMember (const char *name, BObjectRef val)
void addMember (const char *name, BObjectImp *imp)
const Contentscontents () const
const BObjectImpFindMember (const char *name)
size_t mapcount () const

Static Public Member Functions

static BObjectImpunpack (std::istream &is)

Protected Member Functions

 BStruct (const BStruct &other, BObjectType type)
 BStruct (BObjectType type)
virtual BObjectImparray_assign (BObjectImp *idx, BObjectImp *target)
virtual BObjectImpcall_method (const char *methodname, Executor &ex)
virtual BObjectImpcall_method_id (const int id, Executor &ex, bool forcebuiltin=false)
virtual BObjectImpcopy () const
virtual ContIteratorcreateIterator (BObject *pIterVal)
virtual void FormatForStringRep (std::ostream &os, const std::string &key, const BObjectRef &bvalref) const
virtual BObjectRef get_member (const char *membername)
virtual std::string getStringRep () const
virtual BObjectRef operDotMinus (const char *name)
virtual BObjectRef operDotPlus (const char *name)
virtual BObjectRef operDotQMark (const char *name)
virtual BObjectRef OperSubscript (const BObject &obj)
virtual void packonto (std::ostream &os) const
virtual char packtype () const
virtual BObjectRef set_member (const char *membername, BObjectImp *value)
virtual size_t sizeEstimate () const
virtual const char * typeOf () const
virtual int typeOfInt () const
virtual const char * typetag () const

Private Member Functions

BStructoperator= (const BStruct &)

Private Attributes

Contents contents_

Friends

class BStructIterator

Detailed Description

Definition at line 18 of file bstruct.h.


Member Typedef Documentation

typedef map<std::string,BObjectRef, ci_cmp_pred> BStruct::Contents

Definition at line 32 of file bstruct.h.


Constructor & Destructor Documentation

Definition at line 25 of file bstruct.cpp.

Referenced by copy(), sizeEstimate(), and unpack().

+ Here is the caller graph for this function:

BStruct::BStruct ( std::istream &  is,
unsigned  size,
BObjectType  type 
)

Definition at line 45 of file bstruct.cpp.

References contents_, BObjectImp::isa(), BObjectImp::OTString, unpack(), and String::value().

+ Here is the call graph for this function:

BStruct::BStruct ( const BStruct other,
BObjectType  type 
) [explicit, protected]

Definition at line 33 of file bstruct.cpp.

References contents_.

BStruct::BStruct ( BObjectType  type) [explicit, protected]

Definition at line 29 of file bstruct.cpp.


Member Function Documentation

void BStruct::addMember ( const char *  name,
BObjectRef  val 
)

Definition at line 307 of file bstruct.cpp.

References contents_.

Referenced by BError::BError(), buyhandler(), DamageEvent::DamageEvent(), UMulti::footprint(), EClientRefObjImp::get_member_id(), Character::get_script_member_id(), Character::GetAggressorTo(), Client::getclientinfo(), GetCommandsInPackage(), GetIoStatsObj(), Character::GetLawFullyDamaged(), GetPktStatusObj(), Character::GetReportables(), GetScriptProfiles(), handle_coord_cursor(), handle_unicode_prompt(), ItemGivenEvent::ItemGivenEvent(), CustomHouseDesign::list_parts(), menu_selection_made(), UOExecutorModule::mf_FindPath(), UOExecutorModule::mf_GetCoordsInLine(), UOExecutorModule::mf_GetMapInfo(), UOExecutorModule::mf_GetMultiDimensions(), UOExecutorModule::mf_GetPosition(), UOExecutorModule::mf_GetStandingHeight(), UOExecutorModule::mf_GetStandingLayers(), DataFileExecutorModule::mf_ListDataFiles(), UOExecutorModule::mf_ListStaticsAtLocation(), UOExecutorModule::mf_ListStaticsInBox(), UOExecutorModule::mf_ListStaticsNearLocation(), UOExecutorModule::mf_SaveWorldState(), oldBuyHandler(), oldSellHandler(), EquipDesc::PopulateStruct(), ArmorDesc::PopulateStruct(), WeaponDesc::PopulateStruct(), ItemDesc::PopulateStruct(), ContainerDesc::PopulateStruct(), DoorDesc::PopulateStruct(), SpellbookDesc::PopulateStruct(), SpellScrollDesc::PopulateStruct(), MapDesc::PopulateStruct(), NPCExecutorModule::position(), Map::script_method_id(), sellhandler(), SetupRealmDetails(), SourcedEvent::SourcedEvent(), SpeechEvent::SpeechEvent(), BXMLAttributeIterator::step(), and UnicodeSpeechEvent::UnicodeSpeechEvent().

void BStruct::addMember ( const char *  name,
BObjectImp imp 
)

Definition at line 313 of file bstruct.cpp.

References contents_.

BObjectImp * BStruct::array_assign ( BObjectImp idx,
BObjectImp target 
) [protected, virtual]

Reimplemented from BObjectImp.

Reimplemented in BError.

Definition at line 278 of file bstruct.cpp.

References contents_, BObjectImp::isa(), BObjectImp::OTLong, BObjectImp::OTString, and String::value().

+ Here is the call graph for this function:

BObjectImp * BStruct::call_method ( const char *  methodname,
Executor ex 
) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 398 of file bstruct.cpp.

References call_method_id(), getKnownObjMethod(), and ObjMethod::id.

+ Here is the call graph for this function:

BObjectImp * BStruct::call_method_id ( const int  id,
Executor ex,
bool  forcebuiltin = false 
) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 319 of file bstruct.cpp.

References ObjArray::addElement(), contents_, BObjectImp::copy(), ref_counted::count(), Executor::getParamObj(), BObjectImp::isa(), MTH_ERASE, MTH_EXISTS, MTH_INSERT, MTH_KEYS, MTH_SIZE, Executor::numParams(), BObjectImp::OTString, and String::value().

Referenced by call_method().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 476 of file bstruct.cpp.

References contents_.

Referenced by BXMLfile::call_method_id(), BXmlNode::call_method_id(), CreateItemDescriptor(), and replace_properties().

+ Here is the caller graph for this function:

BObjectImp * BStruct::copy ( void  ) const [protected, virtual]

Implements BObjectImp.

Reimplemented in BError.

Definition at line 71 of file bstruct.cpp.

References BStruct(), BObjectImp::isa(), BObjectImp::OTStruct, and passert.

+ Here is the call graph for this function:

ContIterator * BStruct::createIterator ( BObject pIterVal) [protected, virtual]

Reimplemented from BObjectImp.

Reimplemented in BError.

Definition at line 178 of file bstruct.cpp.

References BStructIterator.

const BObjectImp * BStruct::FindMember ( const char *  name)

Definition at line 221 of file bstruct.cpp.

References contents_.

Referenced by ConfigFileExecutorModule::mf_AppendConfigFileElem().

+ Here is the caller graph for this function:

void BStruct::FormatForStringRep ( std::ostream &  os,
const std::string &  key,
const BObjectRef bvalref 
) const [protected, virtual]

Definition at line 115 of file bstruct.cpp.

Referenced by getStringRep().

+ Here is the caller graph for this function:

BObjectRef BStruct::get_member ( const char *  membername) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 236 of file bstruct.cpp.

References contents_, and UninitObject::create().

+ Here is the call graph for this function:

string BStruct::getStringRep ( ) const [protected, virtual]

Implements BObjectImp.

Definition at line 421 of file bstruct.cpp.

References contents_, FormatForStringRep(), OSTRINGSTREAM, OSTRINGSTREAM_STR, and typetag().

+ Here is the call graph for this function:

size_t BStruct::mapcount ( ) const

Definition at line 195 of file bstruct.cpp.

References contents_.

Referenced by BasicExecutorModule::len().

+ Here is the caller graph for this function:

BStruct& BStruct::operator= ( const BStruct ) [private]
BObjectRef BStruct::operDotMinus ( const char *  name) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 462 of file bstruct.cpp.

References contents_.

BObjectRef BStruct::operDotPlus ( const char *  name) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 447 of file bstruct.cpp.

References contents_.

BObjectRef BStruct::operDotQMark ( const char *  name) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 469 of file bstruct.cpp.

References contents_, and ref_counted::count().

+ Here is the call graph for this function:

BObjectRef BStruct::OperSubscript ( const BObject obj) [protected, virtual]

Reimplemented from BObjectImp.

Reimplemented in BError.

Definition at line 251 of file bstruct.cpp.

References contents_, UninitObject::create(), BObject::impptr(), BObjectImp::isa(), BObjectImp::OTLong, BObjectImp::OTString, and String::value().

+ Here is the call graph for this function:

void BStruct::packonto ( std::ostream &  os) const [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 407 of file bstruct.cpp.

References contents_, and packtype().

+ Here is the call graph for this function:

char BStruct::packtype ( ) const [protected, virtual]

Reimplemented in BError.

Definition at line 76 of file bstruct.cpp.

Referenced by packonto().

+ Here is the caller graph for this function:

BObjectRef BStruct::set_member ( const char *  membername,
BObjectImp value 
) [protected, virtual]

Reimplemented from BObjectImp.

Definition at line 201 of file bstruct.cpp.

References contents_.

size_t BStruct::sizeEstimate ( ) const [protected, virtual]

Implements BObjectImp.

Definition at line 183 of file bstruct.cpp.

References BStruct(), contents_, and BObjectRef::sizeEstimate().

+ Here is the call graph for this function:

const char * BStruct::typeOf ( ) const [protected, virtual]

Reimplemented from BObjectImp.

Reimplemented in BError.

Definition at line 86 of file bstruct.cpp.

int BStruct::typeOfInt ( ) const [protected, virtual]

Reimplemented from BObjectImp.

Reimplemented in BError.

Definition at line 90 of file bstruct.cpp.

References BObjectImp::OTStruct.

const char * BStruct::typetag ( ) const [protected, virtual]

Reimplemented in BError.

Definition at line 81 of file bstruct.cpp.

Referenced by getStringRep().

+ Here is the caller graph for this function:

BObjectImp * BStruct::unpack ( std::istream &  is) [static]

Reimplemented from BObjectImp.

Reimplemented in BError.

Definition at line 96 of file bstruct.cpp.

References BStruct(), and BObjectImp::OTStruct.

Referenced by BStruct(), and ItemGivenEvent::~ItemGivenEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Friends And Related Function Documentation

friend class BStructIterator [friend]

Definition at line 63 of file bstruct.h.

Referenced by createIterator().


Member Data Documentation


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