Changeset 316


Ignore:
Timestamp:
01/27/15 23:13:10 (10 years ago)
Author:
Maciej Komosinski
Message:

Improved documentation (for Param flags in particular)

Location:
cpp/frams
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/loader_test_param.cpp

    r311 r316  
    7676                {
    7777                case MultiParamLoader::OnComment:
    78                         fprintf(stderr, "comment: %s\n", (const char*)loader.getComment());
     78                        fprintf(stderr, "comment: '%s'\n", (const char*)loader.getComment());
    7979                        break;
    8080
  • cpp/frams/_demos/loader_test_param.in

    r311 r316  
    1 #this is comment1
     1#this is comment1 
    22# this is comment2
    33data:
  • cpp/frams/param/param.cpp

    r314 r316  
    497497        case 'o':       ret.setObject(getObject(i)); break;
    498498        case 'x':       ret = getExtValue(i); break;
    499         default: FMprintf("ParamInterface", "get", FMLV_ERROR, "'%s.%s' is not mn field", getName(), id(i));
     499        default: FMprintf("ParamInterface", "get", FMLV_ERROR, "'%s.%s' is not a field", getName(), id(i));
    500500        }
    501501}
     
    783783        while (*t) if (*t == ' ') break; else t++;
    784784        if (sscanf(t, PA_INT_SCANF " " PA_INT_SCANF, &mn, &mx) == 2)
    785                 if (mn <= mx) // if max<min then the min/max constraint check is not supported
     785                if (mn <= mx) // else if mn>mx then the min/max constraint makes no sense and there is no checking
    786786                {
    787787                if (x < mn) { x = mn; result = PSET_HITMIN; }
     
    819819        while (*t) if (*t == ' ') break; else t++;
    820820        if (sscanf(t, "%lg %lg", &mn, &mx) == 2)
    821                 if (mn <= mx) // if max<min then the min/max constraint check is not supported
     821                if (mn <= mx) // else if mn>mx then the min/max constraint makes no sense and there is no checking
    822822                {
    823823                if (x < mn) { x = mn; result = PSET_HITMIN; }
  • cpp/frams/param/param.h

    r286 r316  
    1818
    1919// ParamInterface flags:
    20 #define PARAM_READONLY  1
    21 #define PARAM_DONTSAVE  2
    22 #define PARAM_SETLEVEL(x) (((x)&3)<<2)
    23 #define PARAM_LEVEL(x) (((x)>>2)&3)
    24 #define PARAM_USERREADONLY 16
    25 #define PARAM_USERHIDDEN 32
    26 // for mutableparam (private!)
    27 #define MUTPARAM_ALLOCENTRY 64
    28 #define MUTPARAM_ALLOCDATA 128
    29 #define PARAM_NOSTATIC 256
    30 #define PARAM_CONST 512
    31 #define PARAM_CANOMITNAME 1024
    32 #define PARAM_DONTLOAD  2048
    33 #define PARAM_NOISOLATION       4096
    34 #define PARAM_DEPRECATED        8192
     20#define PARAM_READONLY       1  //< Param is not able to change this member
     21#define PARAM_DONTSAVE       2  //< Param will not save this member
     22#define PARAM_SETLEVEL(x) (((x)&3)<<2)  //< internal use
     23#define PARAM_LEVEL(x)    (((x)>>2)&3)  //< internal use
     24#define PARAM_USERREADONLY  16  //< GUI should not change this member (even if Param can)
     25#define PARAM_USERHIDDEN    32  //< GUI should not display this member
     26#define MUTPARAM_ALLOCENTRY 64  //< for mutableparam (private!)
     27#define MUTPARAM_ALLOCDATA 128  //< for mutableparam (private!)
     28#define PARAM_NOSTATIC  256     //< (FramScript) don't access this member in a static object (ClassName.field)
     29#define PARAM_CONST     512     //< (FramScript) constant value
     30#define PARAM_CANOMITNAME 1024  //< affects Param::save2()/load2() - for example one-liners in f0 genetic encoding
     31#define PARAM_DONTLOAD    2048  //< Param::load() skips this field
     32#define PARAM_NOISOLATION 4096  //< don't use proxy object in master/slave interactions
     33#define PARAM_DEPRECATED  8192  //< this member is deprecated
    3534
    3635typedef int32_t paInt;
Note: See TracChangeset for help on using the changeset viewer.