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

DialogStack.h

Go to the documentation of this file.
00001 #ifndef HEADER_DIALOGSTACK_H
00002 #define HEADER_DIALOGSTACK_H
00003 #define HEADER_DIALOGAGENT_H
00004 
00005 class Dialog;
00006 class ResDialogPack;
00007 class PlannedDialog;
00008 
00009 #include "NoCopy.h"
00010 
00011 #include <list>
00012 #include <string>
00013 
00014 /**
00015  * Stack of running dialogs.
00016  */
00017 class DialogStack : public NoCopy {
00018     private:
00019         ResDialogPack *m_dialogs;
00020 
00021         typedef std::list<PlannedDialog*> t_running;
00022         t_running m_running;
00023         t_running m_cycling;
00024         PlannedDialog *m_activeDialog;
00025     private:
00026         void removeFirstNotTalking();
00027         bool isTalkingIn(int actor, const t_running &fifo) const;
00028         void killSoundIn(int actor, t_running &fifo);
00029         void killTalksIn(t_running &fifo);
00030         void releaseDialog(PlannedDialog *dialog);
00031     public:
00032         DialogStack();
00033         virtual ~DialogStack();
00034         void updateStack();
00035 
00036         void addDialog(const std::string &name, Dialog *dialog);
00037         void actorTalk(int actor, const std::string &name,
00038                 int volume, int loops=0, bool dialogFlag=false);
00039         bool isTalking(int actor) const;
00040         void killSound(int actor);
00041 
00042         bool isDialog() const;
00043         bool areRunning() const { return !m_running.empty(); }
00044         void killTalks();
00045         void removeAll();
00046 };
00047 
00048 #endif
00049 

Generated on Wed Jun 1 09:54:30 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2