#include <UCList.h>
Public Member Functions | |
UCList (unsigned int elementsize_, unsigned int capacity=0) | |
~UCList () | |
const uint8 * | operator[] (uint32 index) |
uint16 | getuint16 (uint32 index) |
void | append (const uint8 *e) |
void | remove (const uint8 *e) |
bool | inList (const uint8 *e) |
void | appendList (UCList &l) |
void | unionList (UCList &l) |
void | substractList (UCList &l) |
void | free () |
uint32 | getSize () const |
unsigned int | getElementSize () const |
void | assign (uint32 index, const uint8 *e) |
void | copyList (UCList &l) |
void | freeStrings () |
void | copyStringList (UCList &l) |
void | unionStringList (UCList &l) |
void | substractStringList (UCList &l) |
bool | stringInList (uint16 str) |
void | assignString (uint32 index, uint16 str) |
void | removeString (uint16 str, bool nodel=false) |
uint16 | getStringIndex (uint32 index) |
void | save (ODataSource *ods) |
bool | load (IDataSource *ids, uint32 version) |
Private Member Functions | |
std::string & | getString (uint32 index) |
Private Attributes | |
std::vector< uint8 > | elements |
unsigned int | elementsize |
unsigned int | size |
Definition at line 38 of file UCList.h.
UCList::UCList | ( | unsigned int | elementsize_, | |
unsigned int | capacity = 0 | |||
) | [inline] |
void UCList::append | ( | const uint8 * | e | ) | [inline] |
Definition at line 71 of file UCList.h.
References elements, elementsize, and size.
Referenced by appendList(), CurrentMap::areaSearch(), Container::containerSearch(), copyStringList(), UCMachine::execProcess(), unionList(), and unionStringList().
void UCList::appendList | ( | UCList & | l | ) | [inline] |
Definition at line 105 of file UCList.h.
References append(), elements, elementsize, and size.
Referenced by copyList(), and UCMachine::execProcess().
Definition at line 128 of file UCList.h.
References elements, and elementsize.
Referenced by UCMachine::execProcess().
Definition at line 92 of file UCList.cpp.
References elements, elementsize, UCMachine::freeString(), UCMachine::get_instance(), and getStringIndex().
void UCList::copyList | ( | UCList & | l | ) | [inline] |
Definition at line 134 of file UCList.h.
References appendList(), and free().
Referenced by UCMachine::execProcess().
void UCList::copyStringList | ( | UCList & | l | ) |
Definition at line 47 of file UCList.cpp.
References append(), UCMachine::duplicateString(), freeStrings(), UCMachine::get_instance(), getStringIndex(), and size.
Referenced by AskGump::AskGump(), and UCMachine::execProcess().
void UCList::free | ( | ) | [inline] |
Definition at line 124 of file UCList.h.
References elements, and size.
Referenced by copyList(), freeStrings(), Item::grab(), StartU8Process::run(), unionStringList(), and ~UCList().
void UCList::freeStrings | ( | ) |
Definition at line 38 of file UCList.cpp.
References free(), UCMachine::freeString(), UCMachine::get_instance(), getStringIndex(), and size.
Referenced by copyStringList(), and AskGump::~AskGump().
unsigned int UCList::getElementSize | ( | ) | const [inline] |
Definition at line 126 of file UCList.h.
References elementsize.
Referenced by UCMachine::execProcess().
uint32 UCList::getSize | ( | ) | const [inline] |
Definition at line 125 of file UCList.h.
References size.
Referenced by Actor::areEnemiesNear(), Item::ascend(), AnimationTracker::checkWeaponHit(), Item::countNearby(), ActorAnimProcess::doSpecial(), UCMachine::execProcess(), Item::explode(), Item::grab(), AskGump::InitGump(), AskGump::loadData(), Item::movedByPlayer(), GameMapGump::OnMouseClick(), StartU8Process::run(), GrantPeaceProcess::run(), CombatProcess::seekTarget(), Actor::tryAnim(), and MainActor::useInventoryItem().
std::string & UCList::getString | ( | uint32 | index | ) | [private] |
Definition at line 32 of file UCList.cpp.
References UCMachine::get_instance(), UCMachine::getString(), and getStringIndex().
Referenced by removeString(), and stringInList().
Definition at line 27 of file UCList.cpp.
References elements.
Referenced by assignString(), AskGump::ChildNotify(), copyStringList(), UCMachine::execProcess(), freeStrings(), getString(), AskGump::InitGump(), removeString(), substractStringList(), and unionStringList().
Definition at line 64 of file UCList.h.
References elements, and elementsize.
Referenced by Actor::areEnemiesNear(), Item::ascend(), AnimationTracker::checkWeaponHit(), ActorAnimProcess::doSpecial(), Item::explode(), Item::grab(), Item::movedByPlayer(), GameMapGump::OnMouseClick(), StartU8Process::run(), GrantPeaceProcess::run(), CombatProcess::seekTarget(), Actor::tryAnim(), and MainActor::useInventoryItem().
bool UCList::inList | ( | const uint8 * | e | ) | [inline] |
Definition at line 94 of file UCList.h.
References elements, elementsize, and size.
Referenced by UCMachine::execProcess(), and unionList().
bool UCList::load | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
Definition at line 130 of file UCList.cpp.
References elements, elementsize, IDataSource::read(), IDataSource::read4(), and size.
Referenced by AskGump::loadData(), and UCMachine::loadLists().
void UCList::remove | ( | const uint8 * | e | ) | [inline] |
Definition at line 78 of file UCList.h.
References elements, elementsize, and size.
Referenced by substractList().
void UCList::removeString | ( | uint16 | str, | |
bool | nodel = false | |||
) |
Definition at line 102 of file UCList.cpp.
References elements, elementsize, UCMachine::get_instance(), getString(), UCMachine::getString(), getStringIndex(), and size.
Referenced by AskGump::ChildNotify(), and substractStringList().
void UCList::save | ( | ODataSource * | ods | ) |
Definition at line 122 of file UCList.cpp.
References elements, elementsize, size, ODataSource::write(), and ODataSource::write4().
Referenced by AskGump::saveData().
bool UCList::stringInList | ( | uint16 | str | ) |
Definition at line 82 of file UCList.cpp.
References UCMachine::get_instance(), getString(), UCMachine::getString(), and size.
Referenced by unionStringList().
void UCList::substractList | ( | UCList & | l | ) | [inline] |
Definition at line 119 of file UCList.h.
References remove(), and size.
Referenced by UCMachine::execProcess().
void UCList::substractStringList | ( | UCList & | l | ) |
Definition at line 76 of file UCList.cpp.
References getStringIndex(), removeString(), and size.
Referenced by UCMachine::execProcess().
void UCList::unionList | ( | UCList & | l | ) | [inline] |
void UCList::unionStringList | ( | UCList & | l | ) |
Definition at line 60 of file UCList.cpp.
References append(), free(), UCMachine::freeString(), UCMachine::get_instance(), getStringIndex(), size, and stringInList().
Referenced by UCMachine::execProcess().
std::vector<uint8> UCList::elements [private] |
Definition at line 40 of file UCList.h.
Referenced by append(), appendList(), assign(), assignString(), free(), getStringIndex(), getuint16(), inList(), load(), operator[](), remove(), removeString(), save(), UCList(), and unionList().
unsigned int UCList::elementsize [private] |
Definition at line 41 of file UCList.h.
Referenced by append(), appendList(), assign(), assignString(), getElementSize(), getuint16(), inList(), load(), operator[](), remove(), removeString(), save(), UCList(), and unionList().
unsigned int UCList::size [private] |
Definition at line 42 of file UCList.h.
Referenced by append(), appendList(), copyStringList(), free(), freeStrings(), getSize(), inList(), load(), remove(), removeString(), save(), stringInList(), substractList(), substractStringList(), unionList(), and unionStringList().