Object Class Reference

#include <Object.h>

Inheritance diagram for Object:

Gump Item ButtonWidget ConsoleGump ControlEntryGump ControlsGump DesktopGump EditWidget FastAreaVisGump GameMapGump GameWidget ItemRelativeGump MiniMapGump MiniStatsGump ModalGump OptionsGump ResizableGump SlidingWidget TextWidget U8SaveGump Container Egg GlobEgg MonsterEgg List of all members.

Public Member Functions

 Object ()
virtual ~Object ()
 ENABLE_RUNTIME_CLASSTYPE ()
 ENABLE_CUSTOM_MEMORY_ALLOCATION ()
ObjId getObjId () const
virtual ObjId assignObjId ()
virtual void clearObjId ()
virtual void dumpInfo ()
void save (ODataSource *ods)
ProcId callUsecode (uint16 classid, uint16 offset, const uint8 *args=0, int argsize=0)
bool loadData (IDataSource *ids, uint32 version)

Protected Member Functions

void writeObjectHeader (ODataSource *ods)
virtual void saveData (ODataSource *ods)

Protected Attributes

ObjId objid

Detailed Description

Definition at line 26 of file Object.h.


Constructor & Destructor Documentation

Object::Object (  )  [inline]

Definition at line 29 of file Object.h.

Object::~Object (  )  [virtual]

Definition at line 37 of file Object.cpp.

References ObjectManager::clearObjId(), ObjectManager::get_instance(), and objid.


Member Function Documentation

ObjId Object::assignObjId (  )  [virtual]

Assign self and contents (if any) an objID

Returns:
the assiged ID

Reimplemented in Actor, and Container.

Definition at line 43 of file Object.cpp.

References ObjectManager::assignObjId(), ObjectManager::get_instance(), and objid.

Referenced by Container::assignObjId(), ItemFactory::createItem(), and Gump::Gump().

ProcId Object::callUsecode ( uint16  classid,
uint16  offset,
const uint8 args = 0,
int  argsize = 0 
)

Spawn a usecode function on this object

Parameters:
classid The usecode class to run
offset The offset in that class to run
u The Usecode object containing the class
args Optional arguments to the spawned process
argsize The size (in bytes) of the optional arguments
Returns:
the PID of the spawned process

Definition at line 66 of file Object.cpp.

References Kernel::addProcess(), Kernel::get_instance(), getObjId(), and UCMachine::objectToPtr().

Referenced by Item::callUsecodeEvent().

void Object::clearObjId (  )  [virtual]

Clear objID of self and contents (if any).

Reimplemented in Container.

Definition at line 50 of file Object.cpp.

References ObjectManager::clearObjId(), ObjectManager::get_instance(), Kernel::get_instance(), Kernel::killProcesses(), and objid.

Referenced by Container::clearObjId(), and Item::destroy().

void Object::dumpInfo (  )  [virtual]

dump some info about this object to pout

Reimplemented in Actor, Container, Egg, and Item.

Definition at line 60 of file Object.cpp.

References getObjId(), and pout.

Referenced by ObjectManager::ConCmd_objectInfo().

Object::ENABLE_CUSTOM_MEMORY_ALLOCATION (  ) 

Object::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented in AskGump, BarkGump, BindGump, BookGump, ConsoleGump, ContainerGump, ControlEntryGump, ControlsGump, CreditsGump, DesktopGump, FastAreaVisGump, GameMapGump, Gump, InverterGump, ItemRelativeGump, MenuGump, MiniMapGump, MiniStatsGump, ModalGump, MovieGump, OptionsGump, PagedGump, PaperdollGump, PentagramMenuGump, QuitGump, ReadableGump, ScalerGump, ScrollGump, ShapeViewerGump, SliderGump, TargetGump, U8SaveGump, ButtonWidget, EditWidget, GameWidget, SlidingWidget, TextWidget, Actor, MainActor, Container, Egg, GlobEgg, Item, MonsterEgg, and TeleportEgg.

ObjId Object::getObjId (  )  const [inline]

get this Object's objID

Definition at line 39 of file Object.h.

References objid.

Referenced by ActorAnimProcess::ActorAnimProcess(), EggHatcherProcess::addEgg(), ItemSorter::AddItem(), CurrentMap::addItem(), CurrentMap::addItemToEnd(), AmbushProcess::AmbushProcess(), ButtonWidget::ButtonWidget(), callUsecode(), Container::CanAddItem(), Item::canExistAt(), Item::canMergeWith(), Item::canReach(), PathfindingState::checkHit(), AnimationTracker::checkWeaponHit(), QuitGump::ChildNotify(), PaperdollGump::ChildNotify(), PagedGump::ChildNotify(), ControlEntryGump::ChildNotify(), ClearFeignDeathProcess::ClearFeignDeathProcess(), CombatProcess::CombatProcess(), Actor::createActor(), DestroyItemProcess::DestroyItemProcess(), Actor::die(), ContainerGump::DropItem(), dumpInfo(), Item::dumpInfo(), GUIApp::enterTextMode(), FireballProcess::FireballProcess(), ContainerGump::GetItemLocation(), PaperdollGump::GetLocationOfItem(), ContainerGump::GetLocationOfItem(), Item::getParentAsContainer(), ContainerGump::getTargetContainer(), GrantPeaceProcess::GrantPeaceProcess(), GravityProcess::GravityProcess(), GUIApp::handleEvent(), MonsterEgg::hatch(), SpriteProcess::init(), AnimationTracker::init(), ScrollGump::InitGump(), QuitGump::InitGump(), PaperdollGump::InitGump(), BookGump::InitGump(), BarkGump::InitGump(), GUIApp::leaveTextMode(), Item::loadData(), ObjectManager::loadObject(), LoiterProcess::LoiterProcess(), MissileTracker::MissileTracker(), Item::move(), Item::movedByPlayer(), GUIApp::moveDragging(), Item::moveToContainer(), Item::moveToEtherealVoid(), Pathfinder::newNode(), ContainerGump::OnMouseDouble(), Item::openGump(), Pathfinder::pathfind(), PathfinderProcess::PathfinderProcess(), Actor::receiveHit(), CurrentMap::removeItemFromList(), ResurrectionProcess::ResurrectionProcess(), Item::returnFromEtherealVoid(), GravityProcess::run(), FireballProcess::run(), CreateItemProcess::run(), Item::saveData(), Gump::saveData(), CurrentMap::scanForValidPosition(), Actor::setEquip(), GumpNotifyProcess::setGump(), Actor::setInCombat(), GUIApp::setMouseCoords(), GUIApp::setupCoreGumps(), SplitItemProcess::SplitItemProcess(), GUIApp::startDragging(), GameMapGump::StartDraggingItem(), AnimationTracker::step(), CurrentMap::surfaceSearch(), Actor::teleport(), SlidingWidget::TraceObjId(), PaperdollGump::TraceObjId(), ModalGump::TraceObjId(), MiniStatsGump::TraceObjId(), MiniMapGump::TraceObjId(), GameWidget::TraceObjId(), FastAreaVisGump::TraceObjId(), ContainerGump::TraceObjId(), ButtonWidget::TraceObjId(), and Actor::tryAnim().

bool Object::loadData ( IDataSource ids,
uint32  version 
)

Reimplemented in AskGump, BarkGump, BookGump, ConsoleGump, ContainerGump, DesktopGump, GameMapGump, Gump, ItemRelativeGump, MiniMapGump, MiniStatsGump, ModalGump, PaperdollGump, ReadableGump, ScrollGump, SliderGump, TargetGump, ButtonWidget, SlidingWidget, TextWidget, Actor, MainActor, Container, Egg, GlobEgg, Item, MonsterEgg, and TeleportEgg.

Definition at line 98 of file Object.cpp.

References objid, and IDataSource::read2().

Referenced by Item::loadData(), and Gump::loadData().

void Object::save ( ODataSource ods  ) 

save this object

Definition at line 75 of file Object.cpp.

References saveData(), and writeObjectHeader().

Referenced by MenuGump::selectEntry().

void Object::saveData ( ODataSource ods  )  [protected, virtual]

save the actual Object data

Reimplemented in AskGump, BarkGump, BindGump, BookGump, ConsoleGump, ContainerGump, ControlsGump, DesktopGump, GameMapGump, Gump, ItemRelativeGump, MiniMapGump, MiniStatsGump, ModalGump, MovieGump, OptionsGump, PagedGump, PaperdollGump, QuitGump, ReadableGump, ScrollGump, ShapeViewerGump, SliderGump, TargetGump, ButtonWidget, SlidingWidget, TextWidget, Actor, MainActor, Container, Egg, GlobEgg, Item, MonsterEgg, and TeleportEgg.

Definition at line 90 of file Object.cpp.

References objid, and ODataSource::write2().

Referenced by save(), Item::saveData(), and Gump::saveData().

void Object::writeObjectHeader ( ODataSource ods  )  [protected]

write the Object savegame header (mainly consisting of the classname)

Definition at line 81 of file Object.cpp.

References ODataSource::write(), and ODataSource::write2().

Referenced by save().


Member Data Documentation

ObjId Object::objid [protected]

Definition at line 73 of file Object.h.

Referenced by Container::addItem(), Item::animateItem(), assignObjId(), Actor::assignObjId(), Item::callUsecodeEvent(), MainActor::CanAddItem(), Item::canReach(), clearObjId(), Item::collideMove(), Container::containerSearch(), ItemFactory::createActor(), Item::destroy(), Actor::getCombatProcess(), getObjId(), Actor::killAllButCombatProcesses(), Actor::killAllButFallAnims(), loadData(), Container::loadData(), Item::move(), Item::moveToContainer(), Item::moveToEtherealVoid(), TargetGump::OnMouseUp(), Item::openGump(), Actor::receiveHit(), saveData(), Item::setupLerp(), Actor::teleport(), PaperdollGump::TraceObjId(), ModalGump::TraceObjId(), MiniStatsGump::TraceObjId(), MiniMapGump::TraceObjId(), Gump::TraceObjId(), GameWidget::TraceObjId(), GameMapGump::TraceObjId(), FastAreaVisGump::TraceObjId(), ContainerGump::TraceObjId(), MainActor::useInventoryItem(), Container::~Container(), and ~Object().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:42 2007 for pentagram by  doxygen 1.4.7