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

#include <abstractfile.h>

Inheritance diagram for AP_LSystem::AbstractFile:
AP_LSystem::LSFile AP_LSystem::XmlFile

Public Member Functions

 AbstractFile ()
 
virtual void open (std::string &filename)=0
 
void substitute (std::map< string, string > &pairs)
 
virtual std::vector< string > * getHomomorphisms ()
 
virtual std::vector< string > * getRules ()
 
virtual std::vector< string > * getSubsystems ()
 
std::string & getAxiom ()
 
unsigned int type ()
 
std::string & name ()
 

Protected Member Functions

void addType (std::string &type)
 

Protected Attributes

unsigned int m_Type
 type of loaded L-system More...
 
string m_Name
 name of loaded L-system More...
 
string m_Axiom
 loaded axiom More...
 
std::vector< string > m_Rules
 container with loaded rules strings More...
 
std::vector< string > m_Homomorphisms
 container with loaded homomorphism rules More...
 
std::vector< string > m_Subsytems
 container with subsystem's filenames More...
 

Detailed Description

Abstract class for file types.

Constructor & Destructor Documentation

AP_LSystem::AbstractFile::AbstractFile ( )
inline

Constructor - inicialize L-system type to zero

Member Function Documentation

void AP_LSystem::AbstractFile::addType ( std::string &  type)
inlineprotected

Type of L-system is composed by binary adding of some capabilities. This method binary adds new capability. List of capability strings:

  • 0L
  • 1LL
  • 1LR
  • 2L
  • IL
  • DETERMINISTIC
  • STOCHASTIC
  • PARAMETRIC
    Parameters
    typestring with type to add
std::string& AP_LSystem::AbstractFile::getAxiom ( )
inline

Get axiom - the initial word.

Returns
axiom
virtual std::vector<string>* AP_LSystem::AbstractFile::getHomomorphisms ( )
inlinevirtual

Get homomorphisms stored in std::vector.

Returns
homomorphisms in string format
virtual std::vector<string>* AP_LSystem::AbstractFile::getRules ( )
inlinevirtual

Get rules stored in std::vector.

Returns
rules in string format
virtual std::vector<string>* AP_LSystem::AbstractFile::getSubsystems ( )
inlinevirtual

Get filenames of all subsystems stored in std::vector.

Returns
subsystem filenames
std::string& AP_LSystem::AbstractFile::name ( )
inline

Returns name of L-system.

Returns
name of L-system
virtual void AP_LSystem::AbstractFile::open ( std::string &  filename)
pure virtual

Pure method for opening file.

Parameters
filenamefilename of file

Implemented in AP_LSystem::XmlFile.

void AP_LSystem::AbstractFile::substitute ( std::map< string, string > &  pairs)
inline

Substitute all occurences of map's keys by their values in axiom, rules and homomorphisms.

Parameters
pairsmap with substitution pairs
unsigned int AP_LSystem::AbstractFile::type ( )
inline

Get type of L-system. Stored as bitmap of desired capabilities.

Returns
type of L-system

Member Data Documentation

string AP_LSystem::AbstractFile::m_Axiom
protected

loaded axiom

std::vector<string> AP_LSystem::AbstractFile::m_Homomorphisms
protected

container with loaded homomorphism rules

string AP_LSystem::AbstractFile::m_Name
protected

name of loaded L-system

std::vector<string> AP_LSystem::AbstractFile::m_Rules
protected

container with loaded rules strings

std::vector<string> AP_LSystem::AbstractFile::m_Subsytems
protected

container with subsystem's filenames

unsigned int AP_LSystem::AbstractFile::m_Type
protected

type of loaded L-system


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