Changeset 25 for cpp


Ignore:
Timestamp:
06/29/09 21:02:03 (15 years ago)
Author:
mwajcht
Message:

Added parameter which indicated the maximum length of F1 genotype converter can produce. Default value is 500, but it can be overriden in converter's constructor.

Location:
cpp/f8-to-f1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/f8-to-f1/conv_f8tof1.cpp

    r24 r25  
    653653                if (a != NULL) {
    654654                        dst += a->getF1Genotype(p);
    655                         if (dst.len() > 1500) {
    656                                 return ""; //genotype becomes too long so we abort conversion
     655                        if (dst.len() > maxF1Length) {
     656                                return SString(); //genotype becomes too long so we abort conversion
    657657                        }
    658658                }
  • cpp/f8-to-f1/conv_f8tof1.h

    r1 r25  
    166166                mapsupport = 0;
    167167                info = "ble";
     168                maxF1Length = 500;
     169        }
     170       
     171        GenoConv_F8ToF1(int f1LengthLimit) {
     172                name = "f8 to f1 converter";
     173                in_format = '8';
     174                out_format = '1';
     175                mapsupport = 0;
     176                info = "ble";
     177                maxF1Length = f1LengthLimit;
    168178        }
    169179       
     
    177187protected:
    178188        bool parseInput(const char* src, Lsystem* lsys);
     189        int maxF1Length;
    179190};
    180191
Note: See TracChangeset for help on using the changeset viewer.