Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Planner Class Reference

Inheritance diagram for Planner:

Inheritance graph
[legend]
Collaboration diagram for Planner:

Collaboration graph
[legend]

Detailed Description

Action planner.

Definition at line 16 of file Planner.h.

Public Member Functions

 Planner ()
virtual ~Planner ()
bool satisfyPlan ()
 Execute next action.
void killPlan ()
virtual void interruptPlan ()
void planAction (int funcRef)
bool isPlanning () const
 Return true when there is a planned command in queue.
DialogStackdialogs ()


Constructor & Destructor Documentation

Planner::Planner  ) 
 

Definition at line 21 of file Planner.cpp.

00022 {
00023     m_plan = new CommandQueue();
00024     m_dialogs = new DialogStack();
00025     registerScriptFuncs();
00026 }

Planner::~Planner  )  [virtual]
 

Definition at line 48 of file Planner.cpp.

00049 {
00050     //NOTE: planned ScriptCmd must be removed before script
00051     delete m_plan;
00052     delete m_dialogs;
00053 }


Member Function Documentation

DialogStack* Planner::dialogs  )  [inline]
 

Definition at line 32 of file Planner.h.

00032 { return m_dialogs; }

void Planner::interruptPlan  )  [virtual]
 

Reimplemented in LevelScript.

Definition at line 76 of file Planner.cpp.

00077 {
00078     m_plan->removeAll();
00079 }

bool Planner::isPlanning  )  const
 

Return true when there is a planned command in queue.

Definition at line 91 of file Planner.cpp.

00092 {
00093     return !m_plan->empty();
00094 }

void Planner::killPlan  ) 
 

Definition at line 68 of file Planner.cpp.

00069 {
00070     m_dialogs->killTalks();
00071     SubTitleAgent::agent()->killTalks();
00072     interruptPlan();
00073 }

void Planner::planAction int  funcRef  ) 
 

Definition at line 82 of file Planner.cpp.

00083 {
00084     m_plan->planCommand(new ScriptCmd(m_script, funcRef));
00085 }

bool Planner::satisfyPlan  ) 
 

Execute next action.

Returns:
true for finished plan

Definition at line 60 of file Planner.cpp.

00061 {
00062     m_dialogs->updateStack();
00063     m_plan->executeFirst();
00064     return m_plan->empty();
00065 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:56:17 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2