vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_LSystem::AbstractGenerator Class Referenceabstract

#include <abstractgenerator.h>

Inheritance diagram for AP_LSystem::AbstractGenerator:
AP_LSystem::LSystemGenerator

Public Member Functions

 AbstractGenerator (void)
 
 AbstractGenerator (const AbstractGenerator &c)
 
AbstractGeneratoroperator= (const AbstractGenerator &c)
 
 ~AbstractGenerator (void)
 
virtual void loadFile (std::string &filename)=0
 
virtual void nextIteration ()=0
 
virtual ParseableStringgetWord ()=0
 
virtual void saveWordToFile (std::string &)
 
virtual void loadWordFromFile (std::string &)
 

Static Public Member Functions

static boost::shared_ptr
< AbstractLSystem
createLSystem (AbstractFile *file)
 

Protected Attributes

ParseableStringm_Word
 word generated by generator More...
 
boost::shared_ptr
< AbstractLSystem
m_MainLSystem
 L-system that is used for generating. More...
 

Detailed Description

L-system generator is a main class ford word generation. It controls one L-system and use them for words generating. This is a base abstract class which is an interface for communication with higher levels.

Constructor & Destructor Documentation

AP_LSystem::AbstractGenerator::AbstractGenerator ( void  )
inline

Incialize word and main L-system as NULL

AP_LSystem::AbstractGenerator::AbstractGenerator ( const AbstractGenerator c)
inline

Copy constructor

AP_LSystem::AbstractGenerator::~AbstractGenerator ( void  )
inline

Descructor release memory of generated word and l-system

Member Function Documentation

boost::shared_ptr< AbstractLSystem > AbstractGenerator::createLSystem ( AbstractFile file)
static

Creates an L-system according to type. It chooses from all AbstractLSystem childs and select the best suitable L-system implementation for this type of L-system.

Parameters
filefile with loaded L-system
Returns
created L-system
virtual ParseableString* AP_LSystem::AbstractGenerator::getWord ( )
pure virtual

Get generated word in format suitable for parsing and intepreting.

Returns
generated word

Implemented in AP_LSystem::LSystemGenerator.

virtual void AP_LSystem::AbstractGenerator::loadFile ( std::string &  filename)
pure virtual

Loads an L-system. File is specified by it's filename.

Parameters
filenamefilename of file in one of supported L-system formats

Implemented in AP_LSystem::LSystemGenerator.

void AbstractGenerator::loadWordFromFile ( std::string &  filename)
virtual

Not implemented

virtual void AP_LSystem::AbstractGenerator::nextIteration ( )
pure virtual

Process one iteration on generator's main L-system.

Implemented in AP_LSystem::LSystemGenerator.

AbstractGenerator& AP_LSystem::AbstractGenerator::operator= ( const AbstractGenerator c)
inline

Asignment operator

void AbstractGenerator::saveWordToFile ( std::string &  filename)
virtual

Not implemented

Member Data Documentation

boost::shared_ptr<AbstractLSystem> AP_LSystem::AbstractGenerator::m_MainLSystem
protected

L-system that is used for generating.

ParseableString* AP_LSystem::AbstractGenerator::m_Word
protected

word generated by generator


The documentation for this class was generated from the following files: