Ignore:
Timestamp:
07/03/20 00:32:23 (4 years ago)
Author:
Maciej Komosinski
Message:
  • separate "0" and "0s" formats (for SHAPE_BALL_AND_STICK and SHAPE_SOLIDS, respectively)
  • converting to format list (Geno::F0_FORMAT_LIST = "0,0s")
  • (optional) declaring Model as SHAPE_BALL_AND_STICK or SHAPE_SOLIDS (or SHAPE_UNKNOWN)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.h

    r935 r972  
    102102protected:
    103103        ShapeType shape;
     104        ShapeType declared_shape;
    104105
    105106        SString nameForErrors() const;
    106107        int internalcheck(CheckType check);
    107108
    108         void init(const Geno &srcgen, bool _using_checkpoints, bool _is_checkpoint);
    109         void init();
     109        void init(const Geno &srcgen, ShapeType sh, bool _using_checkpoints, bool _is_checkpoint);
     110        void init(ShapeType sh);
    110111
    111112        void delMap();
     
    136137        bool isUsingCheckpoints() const { return using_checkpoints; }
    137138        bool isCheckpoint() const { return is_checkpoint; }
     139        static SString genoFormatForShapeType(ShapeType st);
     140        static ShapeType shapeTypeForGenoFormat(const SString& format);
     141        static const char* getShapeTypeName(ShapeType sh);
    138142
    139143        void updateRefno(); // set ::refno for all elements
     
    150154        ModelUserTags userdata;
    151155
    152         /// Create empty model with invalid empty genotype
    153         Model();
     156        /// Create empty model with invalid empty genotype, declaring the shape type for later operations
     157        Model(ShapeType sh = SHAPE_UNKNOWN);
     158
     159        /// Change the declared shape type of the Model
     160        void declareShapeType(ShapeType sh);
    154161
    155162        /** Create a model based on provided genotype
     
    158165           @see getMap()
    159166           */
    160         Model(const Geno &src, bool buildmaps = false, bool _using_checkpoints = false, bool _is_checkpoint = false);
     167        Model(const Geno &src, ShapeType sh, bool buildmaps = false, bool _using_checkpoints = false, bool _is_checkpoint = false);
    161168        Model(const Model &mod, bool buildmaps = false, bool _using_checkpoints = false, bool _is_checkpoint = false);
    162169        /** duplicate the model.
Note: See TracChangeset for help on using the changeset viewer.