Changeset 1277 for cpp/frams


Ignore:
Timestamp:
09/09/23 15:20:54 (15 months ago)
Author:
Maciej Komosinski
Message:

Added Model.is_valid

Location:
cpp/frams/model
Files:
2 edited

Legend:

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

    r1183 r1277  
    77ParamEntry modelobj_paramtab[] =
    88{
    9         { "Model", 1, 21, "Model", },
     9        { "Model", 1, 22, "Model", },
    1010        { "se", 0, PARAM_NOSTATIC, "startenergy", "f", FIELD(startenergy), },
    1111        { "Vstyle", 0, PARAM_NOSTATIC, "Visual style", "s", FIELD(vis_style), "See the \"Visual style definition\" context for more information"},
     
    2020        { "numneurons", 0, PARAM_DONTSAVE | PARAM_NOSTATIC | PARAM_READONLY, "Number of neurons", "d", GETONLY(numneurons), },
    2121        { "numconnections", 0, PARAM_DONTSAVE | PARAM_NOSTATIC | PARAM_READONLY, "Number of neuron connections", "d", GETONLY(numconnections), },
     22        { "is_valid", 0, PARAM_READONLY | PARAM_NOSTATIC, "Validity", "d 0 1", GETONLY(is_valid) },
    2223
    2324        { "getPart", 0, PARAM_READONLY | PARAM_USERHIDDEN | PARAM_NOSTATIC, "getPart (static model information)", "p oPart(d index)", PROCEDURE(p_getpart), },
     
    191192        ret->setInt(getShapeType());
    192193}
     194
     195void ModelObj::get_is_valid(ExtValue *ret)
     196{
     197        ret->setInt(isValid());
     198}
  • cpp/frams/model/modelobj.h

    r732 r1277  
    2323        GETDELEGATE(numcheckpoints, Int, getCheckpointCount())
    2424#undef GETDELEGATE
    25 
     25       
     26        PARAMGETDEF(is_valid);
    2627        PARAMPROCDEF(p_getpart);
    2728        PARAMPROCDEF(p_getjoint);
Note: See TracChangeset for help on using the changeset viewer.