vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
abstractgenerator.h
Go to the documentation of this file.
1 #ifndef ABSTRACTGENERATOR_H_
2 #define ABSTRACTGENERATOR_H_
3 
4 #include <string>
5 #include <boost/shared_ptr.hpp>
6 #include "parseablestring.h"
7 #include "abstractlsystem.h"
8 
9 
10 namespace AP_LSystem {
11 
18 {
19 protected:
21  boost::shared_ptr<AbstractLSystem> m_MainLSystem;
22 
23 public:
27  AbstractGenerator( void ) : m_Word(NULL) {}
28 
33  {
34  m_Word = new ParseableString(*c.m_Word);
35  m_MainLSystem = c.m_MainLSystem->clone();
36  }
37 
42  {
43  m_Word = new ParseableString(*c.m_Word);
44  m_MainLSystem = c.m_MainLSystem->clone();
45 
46  return *this;
47  }
48 
53  {
54  if(m_Word)
55  delete m_Word;
56  }
57 
62  virtual void loadFile( std::string & filename ) = 0;
63 
67  virtual void nextIteration() = 0;
68 
73  virtual ParseableString * getWord() = 0;
74 
78  virtual void saveWordToFile( std::string & );
79 
83  virtual void loadWordFromFile( std::string & );
84 
91  static boost::shared_ptr<AbstractLSystem> createLSystem( AbstractFile * file );
92 };
93 }
94 
95 #endif