Public Member Functions | Static Public Member Functions | Protected Attributes

ai::aspect Class Reference

#include <aspect.hpp>

Inheritance diagram for ai::aspect:
Inheritance graph
[legend]
Collaboration diagram for ai::aspect:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 aspect (readonly_context &context, const config &cfg, const std::string &id)
virtual ~aspect ()
void invalidate () const
virtual const variantget_variant () const =0
virtual boost::shared_ptr
< variant
get_variant_ptr () const =0
virtual void recalculate () const =0
virtual void on_create ()
virtual bool redeploy (const config &cfg, const std::string &id)
virtual config to_config () const
virtual bool delete_all_facets ()
void handle_generic_event (const std::string &)
virtual bool active () const
virtual std::string get_name () const
virtual std::string get_id () const
virtual std::string get_engine () const

Static Public Member Functions

static lg::log_domainlog ()

Protected Attributes

bool valid_
bool valid_variant_
bool valid_lua_
config cfg_
bool invalidate_on_turn_start_
bool invalidate_on_tod_change_
bool invalidate_on_gamestate_change_
bool invalidate_on_minor_gamestate_change_
std::string engine_
std::string name_
std::string id_

Detailed Description

Definition at line 43 of file aspect.hpp.


Constructor & Destructor Documentation

ai::aspect::aspect ( readonly_context context,
const config cfg,
const std::string &  id 
)

Definition at line 32 of file aspect.cpp.

References DBG_AI_ASPECT, engine_, id_, ai::readonly_context_proxy::init_readonly_context_proxy(), name_, and redeploy().

Here is the call graph for this function:

ai::aspect::~aspect (  )  [virtual]

Todo:
1.9 add tod_changed_observer
Todo:
1.9 add minor_gamestate_change_observer

Definition at line 46 of file aspect.cpp.

References invalidate_on_gamestate_change_, invalidate_on_minor_gamestate_change_, invalidate_on_tod_change_, invalidate_on_turn_start_, ai::manager::remove_gamestate_observer(), and ai::manager::remove_turn_started_observer().

Here is the call graph for this function:


Member Function Documentation

virtual bool ai::aspect::active (  )  const [inline, virtual]

Reimplemented in ai::standard_aspect< T >.

Definition at line 84 of file aspect.hpp.

bool ai::aspect::delete_all_facets (  )  [virtual]

Reimplemented in ai::composite_aspect< T >.

Definition at line 133 of file aspect.cpp.

virtual std::string ai::aspect::get_engine (  )  const [inline, virtual]

Implements ai::component.

Definition at line 95 of file aspect.hpp.

References engine_.

virtual std::string ai::aspect::get_id (  )  const [inline, virtual]

Implements ai::component.

Definition at line 92 of file aspect.hpp.

References id_.

Referenced by ai::composite_aspect< T >::add_facet(), ai::composite_aspect< T >::composite_aspect(), and ai::composite_aspect< T >::create_facet().

Here is the caller graph for this function:

virtual std::string ai::aspect::get_name (  )  const [inline, virtual]

Implements ai::component.

Definition at line 89 of file aspect.hpp.

References name_.

virtual const variant& ai::aspect::get_variant (  )  const [pure virtual]
virtual boost::shared_ptr<variant> ai::aspect::get_variant_ptr (  )  const [pure virtual]
void ai::aspect::handle_generic_event ( const std::string &   )  [inline]

Definition at line 78 of file aspect.hpp.

References invalidate().

Here is the call graph for this function:

void ai::aspect::invalidate (  )  const [inline]

Definition at line 49 of file aspect.hpp.

References valid_, valid_lua_, and valid_variant_.

Referenced by handle_generic_event().

Here is the caller graph for this function:

lg::log_domain & ai::aspect::log (  )  [static]

Definition at line 64 of file aspect.cpp.

References ai::log_ai_aspect.

Referenced by ai::typesafe_known_aspect< T >::add_facet(), ai::typesafe_known_aspect< T >::set(), and ai::standard_aspect< T >::standard_aspect().

Here is the caller graph for this function:

void ai::aspect::on_create (  )  [virtual]

Definition at line 69 of file aspect.cpp.

virtual void ai::aspect::recalculate (  )  const [pure virtual]
bool ai::aspect::redeploy ( const config cfg,
const std::string &  id 
) [virtual]

Todo:
1.9 add tod_changed_observer
Todo:
1.9 add minor_gamestate_change_observer
Todo:
1.9 add tod_changed_observer
Todo:
1.9 add minor_gamestate_change_observer

Definition at line 73 of file aspect.cpp.

References ai::manager::add_gamestate_observer(), ai::manager::add_turn_started_observer(), cfg_, DBG_AI_ASPECT, engine_, id_, invalidate_on_gamestate_change_, invalidate_on_minor_gamestate_change_, invalidate_on_tod_change_, invalidate_on_turn_start_, name_, ai::manager::remove_gamestate_observer(), ai::manager::remove_turn_started_observer(), valid_, valid_lua_, and valid_variant_.

Referenced by aspect().

Here is the call graph for this function:

Here is the caller graph for this function:

config ai::aspect::to_config (  )  const [virtual]

Member Data Documentation

config ai::aspect::cfg_ [protected]
std::string ai::aspect::engine_ [protected]

Definition at line 110 of file aspect.hpp.

Referenced by aspect(), get_engine(), redeploy(), and to_config().

std::string ai::aspect::id_ [protected]

Definition at line 112 of file aspect.hpp.

Referenced by aspect(), get_id(), redeploy(), and to_config().

Definition at line 108 of file aspect.hpp.

Referenced by redeploy(), to_config(), and ~aspect().

Definition at line 109 of file aspect.hpp.

Referenced by redeploy(), to_config(), and ~aspect().

Definition at line 107 of file aspect.hpp.

Referenced by redeploy(), to_config(), and ~aspect().

Definition at line 106 of file aspect.hpp.

Referenced by redeploy(), to_config(), and ~aspect().

std::string ai::aspect::name_ [protected]

Definition at line 111 of file aspect.hpp.

Referenced by aspect(), get_name(), redeploy(), and to_config().

bool ai::aspect::valid_ [mutable, protected]
bool ai::aspect::valid_lua_ [mutable, protected]
bool ai::aspect::valid_variant_ [mutable, protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:21 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs