1 #ifndef ABSTRACTFILE_H_
2 #define ABSTRACTFILE_H_
12 namespace AP_LSystem {
47 else if(type ==
"1LL")
51 else if(type ==
"1LR")
63 else if(type ==
"DETERMINISTIC")
67 else if(type ==
"STOCHASTIC")
71 else if(type ==
"PARAMETRIC")
90 virtual void open( std::string & filename) = 0;
100 std::vector<string>::iterator rule;
101 std::map<std::string,std::string>::iterator subst;
104 for(subst = pairs.begin(); subst != pairs.end(); subst++)
107 while((i =
m_Axiom.find(subst->first,i))&&(i != std::string::npos))
109 m_Axiom.replace(i,subst->first.length(),subst->second);
110 i += subst->second.length();
117 for(subst = pairs.begin(); subst != pairs.end(); subst++)
120 while((i = rule->find(subst->first,i))&&(i != std::string::npos))
122 rule->replace(i,subst->first.length(),subst->second);
123 i += subst->second.length();
130 for(subst = pairs.begin(); subst != pairs.end(); subst++)
133 while((i = rule->find(subst->first,i))&&(i != std::string::npos))
135 rule->replace(i,subst->first.length(),subst->second);
136 i += subst->second.length();
198 #endif // ABSTRACTFILE_H