se_core::StatComponent Class Reference

#include <StatComponent.hpp>

Inheritance diagram for se_core::StatComponent:

se_core::Component List of all members.

Public Types

typedef ComponentPtr< StatComponent,
sct_STAT > 
Ptr

Public Member Functions

 StatComponent (Composite *owner, const ComponentFactory *factory=0)
coor_t walkSpeed () const
Abilities * abilities ()
const Abilities * abilities () const
Health & health ()
const Health & health () const
bool hasDefaultAction () const
const ActionAndParameter & defaultAction () const
const Action * defaultAction (Parameter &out) const
void setDefaultAction (const Action &action, const Parameter *parameter=0)
void resetDefaultAction ()
const Composite * target () const
Composite * target ()
PosComponent * targetPos ()
const PosComponent * targetPos () const
bool hasTarget () const
void setTarget (Composite *target)
void resetTarget ()
const Composite * item () const
Composite * item ()
PosComponent * itemPos ()
const PosComponent * itemPos () const
bool hasItem () const
void setItem (Composite *item)
void resetItem ()
void setShouldSave (bool state)
bool shouldSave ()
const Property * property (const char *name) const
const Property * property (int key) const
virtual const char * name () const
 By default returns name of composite, which returns name of composite factory.
Composite * owner ()
const Composite * owner () const
 Component type.
Component * component (int type)
const Component * component (int type) const
int type () const
const ComponentFactory * factory ()
bool isActive ()
bool isDead () const

Static Public Member Functions

StatComponent * get (Composite &composite)
StatComponent * get (Component &component)
const StatComponent * get (const Component &component)

Protected Member Functions

virtual void setActive (bool state)
 Called by Composite.
virtual void setDead ()
 Called by Composite.
virtual void parentChanged (Composite *newParent, Composite *oldParent)
 Called by Composite.
virtual void zoneChanged (int type, Composite *newArea, Composite *oldArea)
 Called by Composite.
virtual void init ()
 Called by Composite.
virtual void cleanup ()
 Called by Composite.

Protected Attributes

short singleValues_ [SV_COUNT]
String attributes_ [ATT_COUNT]
bool shouldSave_
Abilities abilities_
Health health_
const PropertyHashTable * properties_
ActionAndParameter defaultAction_
Composite::RefPtr target_
Composite::RefPtr item_
int type_
 The type of Component.
Composite * owner_
const ComponentFactory * factory_

Static Protected Attributes

const int MGO_COUNT = 20
const int SV_COUNT = 20
const int ATT_COUNT = 20

Friends

class StatComponentFactory
class Composite

Member Typedef Documentation

typedef ComponentPtr<StatComponent, sct_STAT> se_core::StatComponent::Ptr
 

Definition at line 44 of file StatComponent.hpp.


Constructor & Destructor Documentation

se_core::StatComponent::StatComponent (  Composite *  owner,
const ComponentFactory *  factory = 0
) 
 

Definition at line 33 of file StatComponent.cpp.

References se_core::sct_STAT.


Member Function Documentation

const Abilities* se_core::StatComponent::abilities (   )  const [inline]
 

Definition at line 66 of file StatComponent.hpp.

Abilities* se_core::StatComponent::abilities (   )  [inline]
 

Definition at line 65 of file StatComponent.hpp.

Referenced by se_basic::SimpleActorFactory::create().

void se_core::Component::cleanup (   )  [protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::NodeComponent, se_core::RootComponent, se_core::ActionComponent, se_core::CutsceneComponent, se_core::PosComponent, se_core::ScriptComponent, se_core::SignalAreaComponent, se_core::SignalComponent, se_core::SpawnComponent, se_ogre::O3dAreaComponent, se_ogre::O3dThingComponent, and se_basic::NavMeshComponent.

Definition at line 47 of file Component.cpp.

Referenced by se_core::Composite::cleanup().

const Component* se_core::Component::component (  int  type  )  const [inline, inherited]
 

Definition at line 71 of file Component.hpp.

References se_core::Component::component().

Component* se_core::Component::component (  int  type  )  [inline, inherited]
 

Definition at line 67 of file Component.hpp.

References se_core::Composite::component().

Referenced by se_core::Component::component(), se_core::Component::ComponentPtr< T, type >::ComponentPtr(), se_ogre::O3dThingComponent::get(), se_ogre::O3dNodeComponent::get(), and se_ogre::O3dAreaComponent::get().

const Action* se_core::StatComponent::defaultAction (  Parameter &  out  )  const [inline]
 

Definition at line 76 of file StatComponent.hpp.

const ActionAndParameter& se_core::StatComponent::defaultAction (   )  const [inline]
 

Definition at line 73 of file StatComponent.hpp.

const ComponentFactory* se_core::Component::factory (   )  [inline, inherited]
 

Definition at line 81 of file Component.hpp.

Referenced by se_core::Composite::releaseComponents().

const StatComponent* se_core::StatComponent::get (  const Component &  component  )  [inline, static]
 

Definition at line 56 of file StatComponent.hpp.

References se_core::Composite::component(), and se_core::Component::owner().

StatComponent* se_core::StatComponent::get (  Component &  component  )  [inline, static]
 

Definition at line 51 of file StatComponent.hpp.

References se_core::Composite::component(), and se_core::Component::owner().

StatComponent* se_core::StatComponent::get (  Composite &  composite  )  [inline, static]
 

Definition at line 46 of file StatComponent.hpp.

References se_core::Composite::component().

bool se_core::StatComponent::hasDefaultAction (   )  const [inline]
 

Definition at line 70 of file StatComponent.hpp.

bool se_core::StatComponent::hasItem (   )  const [inline]
 

Definition at line 101 of file StatComponent.hpp.

bool se_core::StatComponent::hasTarget (   )  const [inline]
 

Definition at line 93 of file StatComponent.hpp.

const Health& se_core::StatComponent::health (   )  const [inline]
 

Definition at line 68 of file StatComponent.hpp.

Health& se_core::StatComponent::health (   )  [inline]
 

Definition at line 67 of file StatComponent.hpp.

void se_core::Component::init (   )  [protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::RootComponent, se_core::SignalAreaComponent, se_ogre::O3dAreaComponent, and se_ogre::O3dThingComponent.

Definition at line 42 of file Component.cpp.

Referenced by se_core::Composite::init().

bool se_core::Component::isActive (   )  [inherited]
 

Definition at line 26 of file Component.cpp.

bool se_core::Component::isDead (   )  const [inherited]
 

Definition at line 31 of file Component.cpp.

Referenced by se_core::Actor::affect().

Composite* se_core::StatComponent::item (   )  [inline]
 

Definition at line 98 of file StatComponent.hpp.

const Composite* se_core::StatComponent::item (   )  const [inline]
 

Definition at line 97 of file StatComponent.hpp.

const PosComponent* se_core::StatComponent::itemPos (   )  const
 

PosComponent* se_core::StatComponent::itemPos (   ) 
 

const char * se_core::Component::name (   )  const [virtual, inherited]
 

By default returns name of composite, which returns name of composite factory.

Reimplemented in se_core::CutsceneAreaComponent, se_core::CutsceneComponent, se_core::CutsceneManager, se_core::CollisionAreaComponent, se_core::SignalAreaComponent, se_core::SignalComponent, se_core::SpawnAreaComponent, se_core::SpawnManager, se_core::ZoneAreaComponent, se_core::ZoneComponent, se_core::ZoneManager, se_basic::NavMeshAreaComponent, se_basic::NavMeshComponent, and se_basic::NavMeshManager.

Definition at line 21 of file Component.cpp.

Referenced by se_core::Area::addNeighbour(), se_core::DefaultTC::collide(), se_core::CoDefault::collide(), se_basic::Say::perform(), and se_ogre::SpeechBubble::speechEvent().

const Composite* se_core::Component::owner (   )  const [inline, inherited]
 

Component type.

Definition at line 62 of file Component.hpp.

Composite* se_core::Component::owner (   )  [inline, inherited]
 

Definition at line 54 of file Component.hpp.

Referenced by se_core::CollisionAreaComponent::_testCollisionCandidates(), se_core::CollisionAreaComponent::_testCollisionCandidates2(), se_core::HealthListeners::add(), se_core::ZoneAreaComponent::addNeighbour(), se_basic::PhTrackingCamera::affect(), se_core::HealthListeners::castHealthChangedEvent(), se_core::Component::ComponentPtr< T, type >::ComponentPtr(), se_ogre::ThingMOManager::create(), se_basic::SimpleAreaThingEncoder::encode(), se_core::SpawnComponent::get(), se_core::SignalComponent::get(), se_core::SignalAreaComponent::get(), se_core::ScriptComponent::get(), se_core::PosComponent::get(), se_core::PhysicsComponent::get(), get(), se_ogre::O3dThingComponent::get(), se_ogre::O3dNodeComponent::get(), se_ogre::O3dAreaComponent::get(), se_core::Pos::hasArea(), se_core::CollisionGrid::insert(), se_core::CollisionComponent::isCollideable(), se_core::ZoneComponent::name(), se_core::Component::ComponentPtr< T, type >::operator=(), se_core::DefaultTC::pop(), se_core::CoDefault::pop(), se_core::DefaultTC::popAndDie(), se_core::CoDefault::popAndDie(), se_core::CollisionAreaComponent::removeCollideable(), se_core::AreaManager::resetThings(), se_core::Actor::scheduleForDestruction(), se_core::AreaManager::setActive(), se_core::AreaManager::setInactive(), and se_ogre::O3dManager::updateStats().

virtual void se_core::Component::parentChanged (  Composite *  newParent,
Composite *  oldParent
)  [inline, protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::AreaChildComponent, and se_core::NodeComponent.

Definition at line 101 of file Component.hpp.

Referenced by se_core::Composite::resetParent(), and se_core::Composite::setParent().

const Property * se_core::StatComponent::property (  int  key  )  const
 

Definition at line 71 of file StatComponent.cpp.

const Property * se_core::StatComponent::property (  const char *  name  )  const
 

Definition at line 63 of file StatComponent.cpp.

void se_core::StatComponent::resetDefaultAction (   )  [inline]
 

Definition at line 86 of file StatComponent.hpp.

void se_core::StatComponent::resetItem (   )  [inline]
 

Definition at line 103 of file StatComponent.hpp.

void se_core::StatComponent::resetTarget (   )  [inline]
 

Definition at line 95 of file StatComponent.hpp.

virtual void se_core::Component::setActive (  bool  state  )  [inline, protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::RootChildComponent, se_core::ActionComponent, se_core::CutsceneAreaComponent, se_core::PhysicsAreaComponent, se_core::CollisionAreaComponent, se_core::ScriptComponent, se_core::SignalAreaComponent, se_core::SpawnAreaComponent, se_core::ZoneAreaComponent, se_client::CameraComponent, se_client::PlayerComponent, se_ogre::O3dAreaComponent, se_ogre::O3dThingComponent, and se_basic::NavMeshAreaComponent.

Definition at line 93 of file Component.hpp.

Referenced by se_core::Composite::setActive().

virtual void se_core::Component::setDead (   )  [inline, protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::SignalComponent, and se_core::SpawnComponent.

Definition at line 97 of file Component.hpp.

Referenced by se_core::Composite::scheduleForDestruction().

void se_core::StatComponent::setDefaultAction (  const Action &  action,
const Parameter *  parameter = 0
)  [inline]
 

Definition at line 80 of file StatComponent.hpp.

Referenced by se_basic::SimpleActorFactory::create().

void se_core::StatComponent::setItem (  Composite *  item  )  [inline]
 

Definition at line 102 of file StatComponent.hpp.

References se_core::Composite::ref().

void se_core::StatComponent::setShouldSave (  bool  state  )  [inline]
 

Definition at line 105 of file StatComponent.hpp.

void se_core::StatComponent::setTarget (  Composite *  target  )  [inline]
 

Definition at line 94 of file StatComponent.hpp.

References se_core::Composite::ref().

bool se_core::StatComponent::shouldSave (   )  [inline]
 

Definition at line 106 of file StatComponent.hpp.

Composite* se_core::StatComponent::target (   )  [inline]
 

Definition at line 90 of file StatComponent.hpp.

const Composite* se_core::StatComponent::target (   )  const [inline]
 

Definition at line 89 of file StatComponent.hpp.

const PosComponent * se_core::StatComponent::targetPos (   )  const
 

Definition at line 55 of file StatComponent.cpp.

PosComponent * se_core::StatComponent::targetPos (   ) 
 

Definition at line 47 of file StatComponent.cpp.

int se_core::Component::type (   )  const [inline, inherited]
 

Definition at line 76 of file Component.hpp.

Referenced by se_core::Composite::component().

coor_t se_core::StatComponent::walkSpeed (   )  const
 

Definition at line 41 of file StatComponent.cpp.

References se_core::COOR_STEP.

void se_core::Component::zoneChanged (  int  type,
Composite *  newArea,
Composite *  oldArea
)  [protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::AreaChildComponent, se_core::CollisionComponent, and se_core::SignalComponent.

Definition at line 37 of file Component.cpp.

Referenced by se_core::Composite::zoneChanged().


Friends And Related Function Documentation

friend class Composite [friend, inherited]
 

Definition at line 89 of file Component.hpp.

friend class StatComponentFactory [friend]
 

Definition at line 121 of file StatComponent.hpp.


Member Data Documentation

Abilities se_core::StatComponent::abilities_ [protected]
 

Definition at line 123 of file StatComponent.hpp.

const int se_core::StatComponent::ATT_COUNT = 20 [static, protected]
 

Definition at line 114 of file StatComponent.hpp.

String se_core::StatComponent::attributes_[ATT_COUNT] [protected]
 

Definition at line 117 of file StatComponent.hpp.

ActionAndParameter se_core::StatComponent::defaultAction_ [mutable, protected]
 

Definition at line 126 of file StatComponent.hpp.

const ComponentFactory* se_core::Component::factory_ [protected, inherited]
 

Definition at line 120 of file Component.hpp.

Health se_core::StatComponent::health_ [protected]
 

Definition at line 124 of file StatComponent.hpp.

Composite::RefPtr se_core::StatComponent::item_ [protected]
 

Definition at line 128 of file StatComponent.hpp.

const int se_core::StatComponent::MGO_COUNT = 20 [static, protected]
 

Definition at line 112 of file StatComponent.hpp.

Composite* se_core::Component::owner_ [protected, inherited]
 

Definition at line 118 of file Component.hpp.

const PropertyHashTable* se_core::StatComponent::properties_ [protected]
 

Definition at line 125 of file StatComponent.hpp.

bool se_core::StatComponent::shouldSave_ [protected]
 

Definition at line 122 of file StatComponent.hpp.

short se_core::StatComponent::singleValues_[SV_COUNT] [mutable, protected]
 

Definition at line 116 of file StatComponent.hpp.

const int se_core::StatComponent::SV_COUNT = 20 [static, protected]
 

Definition at line 113 of file StatComponent.hpp.

Composite::RefPtr se_core::StatComponent::target_ [protected]
 

Definition at line 127 of file StatComponent.hpp.

int se_core::Component::type_ [protected, inherited]
 

The type of Component.

Definition at line 117 of file Component.hpp.


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

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:26 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo