Changeset 33 for cpp/f8-to-f1/conv_f8tof1.h
- Timestamp:
- 10/31/09 00:47:01 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/f8-to-f1/conv_f8tof1.h
r26 r33 217 217 map<string, PrimitiveProduction*> primitiveProductions; 218 218 map<string, ParamProduction*> paramProductions; 219 219 220 220 void removeEmptySubproductionsAndProductions(); 221 221 }; 222 223 224 225 222 226 223 227 /// Converter between f8 and f1 format 224 228 class GenoConv_F8ToF1 : public GenoConverter { 225 229 public: 226 /// Default constructor 227 GenoConv_F8ToF1() { 228 name = "f8 to f1 converter"; 229 in_format = '8'; 230 out_format = '1'; 231 mapsupport = 0; 232 info = "ble"; 233 maxF1Length = 500; 234 } 235 236 /// Constructor with parameter 237 /// @param f1LengthLimit If resulting f1 genotype is longer than f1LengthLimit, converter aborts its job 238 GenoConv_F8ToF1(int f1LengthLimit) { 239 name = "f8 to f1 converter"; 240 in_format = '8'; 241 out_format = '1'; 242 mapsupport = 0; 243 info = "ble"; 244 maxF1Length = f1LengthLimit; 245 } 246 230 Param par; 231 232 GenoConv_F8ToF1(); 247 233 ~GenoConv_F8ToF1() {} 248 234 249 235 SString convert(SString &in, MultiMap *map); 250 236 251 237 /// check syntax of given f8 genotype 252 238 /// @param geno f8 genotype to be checked 253 239 bool checkSyntax(const char *geno); 254 240 255 241 /// returns names of productions in a given genotype 256 242 /// @param in f8 genotype 257 243 vector<SString> readProductionNames(const SString &in); 258 244 //Lsystem* createLsystem(const SString &in); 259 245 260 246 /// creates Lsystem object based on input genotype 261 247 /// @param f8 genotype 262 248 Lsystem* createLsystem(SString in); 249 250 int maxF1Length; 263 251 protected: 264 252 bool parseInput(const char* src, Lsystem* lsys); 265 int maxF1Length;266 253 }; 267 254
Note: See TracChangeset
for help on using the changeset viewer.