Dragonfly 4.20
A text-based game engine
|
Public Member Functions | |
std::string | getType () const |
virtual int | startUp () |
virtual void | shutDown () |
bool | isStarted () const |
int | onEvent (const Event *p_event) const |
int | registerInterest (Object *p_o, std::string event_type) |
int | unregisterInterest (Object *p_o, std::string event_type) |
Protected Member Functions | |
void | setType (std::string new_type) |
Private Member Functions | |
virtual bool | isValid (std::string event_type) const |
Private Attributes | |
std::string | m_type |
int | m_event_count |
std::string | m_event_name [MAX_EVENTS] |
ObjectList | m_obj_list [MAX_EVENTS] |
bool | m_is_started |
std::string df::Manager::getType | ( | ) | const |
Get type identifier of Manager.
bool df::Manager::isStarted | ( | ) | const |
Return status of is_started (true when startUp() was successful).
|
privatevirtual |
Check if event is handled by this Manager.
If handled, return true else false. (Base Manager always returns false.)
Reimplemented in df::GameManager, df::InputManager, df::NetworkManager, and df::WorldManager.
int df::Manager::onEvent | ( | const Event * | p_event | ) | const |
Send event to all interested Objects.
Return count of number of events sent.
int df::Manager::registerInterest | ( | Object * | p_o, |
std::string | event_type | ||
) |
Indicate interest in event.
Return 0 if ok, else -1. (Note, doesn't check to see if Object is already registered.)
|
protected |
Set type identifier of Manager.
|
virtual |
Shutdown Manager.
Reimplemented in df::DisplayManager, df::GameManager, df::InputManager, df::LogManager, df::NetworkManager, df::PathManager, df::ResourceManager, and df::WorldManager.
|
virtual |
Startup Manager.
Return 0 if ok, else negative number.
Reimplemented in df::DisplayManager, df::GameManager, df::InputManager, df::LogManager, df::NetworkManager, df::PathManager, df::ResourceManager, and df::WorldManager.
int df::Manager::unregisterInterest | ( | Object * | p_o, |
std::string | event_type | ||
) |
Indicate no more interest in event.
Return 0 if ok, else -1.
|
private |
Number of events.
|
private |
List of events.
|
private |
True if startUp() succeeded.
|
private |
Objects interested in event.
|
private |
Manager type identifier.