Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

Story.H

Go to the documentation of this file.
00001 /**************************************************************
00002  *  Name: Sascha Becker (sab)
00003  *  File: Story.H
00004  *  Asgn: cavewriting
00005  *  Date: Sun Dec 19 15:52:21 EST 2004
00006  **************************************************************/
00007 
00008 #ifndef Story_Header
00009 #define Story_Header
00010 
00011 #include <IS3D.H>
00012 #include <XercesXMLUtil.H>
00013 
00014 
00015 #include <string>
00016 using namespace std;
00017 
00025 namespace cavewriting {
00026 
00027   class TotalCollapse; // forward declaration
00029 #define STORY Story::instance()
00030 
00031   class Section; 
00032   class Scene;
00033   class Word;
00034 
00035   class Story : public AnimObj {
00036 
00037   public:
00038     static Story* instance(); 
00039 
00040     Story(const string& name);
00041     virtual ~Story();
00042 
00043     virtual void parseXML(const string& filename);
00044     
00045     Section* getSectionByName(const string& sectionName); 
00046     Array<Section*> getSections() { return _sections; }
00047 
00048     virtual void animate();
00049     Scene* getCurrentScene() { return _currentScene; } 
00050 
00051     void startCollapse(); 
00052     void startNamedScene(string sceneName);
00053     Scene* getNamedScene(string sceneName);
00054     
00055     void addWordToCollapse(Word* word);
00056 
00057     bool readyToCollapse();  
00058     void oneMoreWordPeeled(); 
00059     void oneMoreWordPlaced(); 
00060 
00061 
00062   protected:
00063     Array<Section*> _sections;
00064     Array<Scene*> _scenes;
00065     Scene* _currentScene; 
00066     TotalCollapse * _collapseScene;
00067     string _name; 
00068     double _startTime; 
00069   private: 
00070     static Story* _instance;
00071   };
00072 }
00073 
00074 #endif

Generated on Sun Apr 17 13:34:27 2005 for cavewriting by  doxygen 1.4.0