#include <aspect.hpp>


Public Member Functions | |
| aspect (readonly_context &context, const config &cfg, const std::string &id) | |
| virtual | ~aspect () |
| void | invalidate () const |
| virtual const variant & | get_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_domain & | log () |
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_ |
Definition at line 43 of file aspect.hpp.
| 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().

| ai::aspect::~aspect | ( | ) | [virtual] |
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().

| 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] |
| 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().

| virtual std::string ai::aspect::get_name | ( | ) | const [inline, virtual] |
| virtual const variant& ai::aspect::get_variant | ( | ) | const [pure virtual] |
Implemented in ai::typesafe_aspect< T >, and ai::typesafe_aspect< attacks_vector >.
| virtual boost::shared_ptr<variant> ai::aspect::get_variant_ptr | ( | ) | const [pure virtual] |
Implemented in ai::typesafe_aspect< T >, and ai::typesafe_aspect< attacks_vector >.
| void ai::aspect::handle_generic_event | ( | const std::string & | ) | [inline] |
Definition at line 78 of file aspect.hpp.
References invalidate().

| 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().

| 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().

| 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] |
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().


| config ai::aspect::to_config | ( | ) | const [virtual] |
Reimplemented in ai::composite_aspect< T >, ai::standard_aspect< T >, ai::lua_aspect< T >, and ai::testing_ai_default::aspect_attacks.
Definition at line 119 of file aspect.cpp.
References engine_, id_, invalidate_on_gamestate_change_, invalidate_on_minor_gamestate_change_, invalidate_on_tod_change_, invalidate_on_turn_start_, and name_.
config ai::aspect::cfg_ [protected] |
Definition at line 105 of file aspect.hpp.
Referenced by ai::composite_aspect< T >::composite_aspect(), redeploy(), and ai::standard_aspect< T >::standard_aspect().
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().
bool ai::aspect::invalidate_on_gamestate_change_ [protected] |
Definition at line 108 of file aspect.hpp.
Referenced by redeploy(), to_config(), and ~aspect().
bool ai::aspect::invalidate_on_minor_gamestate_change_ [protected] |
Definition at line 109 of file aspect.hpp.
Referenced by redeploy(), to_config(), and ~aspect().
bool ai::aspect::invalidate_on_tod_change_ [protected] |
Definition at line 107 of file aspect.hpp.
Referenced by redeploy(), to_config(), and ~aspect().
bool ai::aspect::invalidate_on_turn_start_ [protected] |
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] |
Definition at line 101 of file aspect.hpp.
Referenced by ai::typesafe_aspect< attacks_vector >::get_ptr(), ai::typesafe_aspect< attacks_vector >::get_variant_ptr(), invalidate(), ai::testing_ai_default::aspect_attacks::recalculate(), ai::standard_aspect< T >::recalculate(), ai::composite_aspect< T >::recalculate(), and redeploy().
bool ai::aspect::valid_lua_ [mutable, protected] |
Definition at line 103 of file aspect.hpp.
Referenced by ai::typesafe_aspect< attacks_vector >::get_ptr(), ai::typesafe_aspect< attacks_vector >::get_variant_ptr(), invalidate(), ai::lua_aspect< T >::recalculate(), and redeploy().
bool ai::aspect::valid_variant_ [mutable, protected] |
Definition at line 102 of file aspect.hpp.
Referenced by ai::typesafe_aspect< attacks_vector >::get_ptr(), ai::typesafe_aspect< attacks_vector >::get_variant_ptr(), invalidate(), and redeploy().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:21 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |