Changeset 240 for cpp/frams


Ignore:
Timestamp:
04/30/14 20:25:32 (10 years ago)
Author:
Maciej Komosinski
Message:

Used | instead of + when adding binary flags

Location:
cpp/frams
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/canvas/neurodiagram.cpp

    r213 r240  
    1919        { "NeuroDiagram", 1, 4, "NeuroDiagram", "Can be used as the client object in the Window.", },
    2020        { "new", 0, PARAM_USERHIDDEN, "create new NeuroDiagram", "p oNeuroDiagram", PROCEDURE(p_new), },
    21         { "showCreature", 0, PARAM_USERHIDDEN + PARAM_NOSTATIC, "show dynamic NN", "p(oCreature)", PROCEDURE(p_showcr), },
    22         { "showModel", 0, PARAM_USERHIDDEN + PARAM_NOSTATIC, "show static NN", "p(oModel)", PROCEDURE(p_showmod), },
    23         { "hide", 0, PARAM_USERHIDDEN + PARAM_NOSTATIC, "hide NN", "p()", PROCEDURE(p_hide), },
     21        { "showCreature", 0, PARAM_USERHIDDEN | PARAM_NOSTATIC, "show dynamic NN", "p(oCreature)", PROCEDURE(p_showcr), },
     22        { "showModel", 0, PARAM_USERHIDDEN | PARAM_NOSTATIC, "show static NN", "p(oModel)", PROCEDURE(p_showmod), },
     23        { "hide", 0, PARAM_USERHIDDEN | PARAM_NOSTATIC, "hide NN", "p()", PROCEDURE(p_hide), },
    2424        { 0, 0, 0, },
    2525};
  • cpp/frams/genetics/genman.cpp

    r200 r240  
    7272        { "toHTML", 0, PARAM_DONTSAVE, "HTMLize a genotype", "p s(s)", PROCEDURE(p_htmlize), "returns genotype expressed as colored HTML", },
    7373        { "toHTMLshort", 0, PARAM_DONTSAVE, "HTMLize a genotype, shorten if needed", "p s(s)", PROCEDURE(p_htmlizeshort), "returns genotype (abbreviated if needed) expressed as colored HTML", },
    74         { "validate", 0, PARAM_DONTSAVE + PARAM_USERHIDDEN, "Validate", "p oGeno(oGeno)", PROCEDURE(p_validate), "returns validated (if possible) Geno object from supplied Geno", },
    75         { "mutate", 0, PARAM_DONTSAVE + PARAM_USERHIDDEN, "Mutate", "p oGeno(oGeno)", PROCEDURE(p_mutate), "returns mutated Geno object from supplied Geno", },
    76         { "crossOver", 0, PARAM_DONTSAVE + PARAM_USERHIDDEN, "Crossover", "p oGeno(oGeno,oGeno)", PROCEDURE(p_crossover), "returns crossed over genotype", },
    77         { "getSimplest", 0, PARAM_DONTSAVE + PARAM_USERHIDDEN, "Get simplest genotype", "p oGeno(d format)", PROCEDURE(p_getsimplest), "returns the simplest genotype for a given encoding (format). 0 means f0, 4 means f4, etc.", },
     74        { "validate", 0, PARAM_DONTSAVE | PARAM_USERHIDDEN, "Validate", "p oGeno(oGeno)", PROCEDURE(p_validate), "returns validated (if possible) Geno object from supplied Geno", },
     75        { "mutate", 0, PARAM_DONTSAVE | PARAM_USERHIDDEN, "Mutate", "p oGeno(oGeno)", PROCEDURE(p_mutate), "returns mutated Geno object from supplied Geno", },
     76        { "crossOver", 0, PARAM_DONTSAVE | PARAM_USERHIDDEN, "Crossover", "p oGeno(oGeno,oGeno)", PROCEDURE(p_crossover), "returns crossed over genotype", },
     77        { "getSimplest", 0, PARAM_DONTSAVE | PARAM_USERHIDDEN, "Get simplest genotype", "p oGeno(d format)", PROCEDURE(p_getsimplest), "returns the simplest genotype for a given encoding (format). 0 means f0, 4 means f4, etc.", },
    7878        { 0, },
    7979};
  • cpp/frams/param/mutableparam.cpp

    r197 r240  
    99ParamEntry MutableParam::pe_tab[]=
    1010{
    11 {"clear",0,PARAM_DONTSAVE+PARAM_USERHIDDEN,"remove all properties","p",PROCEDURE(p_clear),},
    12 {"add",0,PARAM_DONTSAVE+PARAM_USERHIDDEN,"add property (id,type,name,help)","p",PROCEDURE(p_addprop),},
    13 {"remove",0,PARAM_DONTSAVE+PARAM_USERHIDDEN,"remove property (index)","p",PROCEDURE(p_remprop),},
    14 {"addGroup",0,PARAM_DONTSAVE+PARAM_USERHIDDEN,"add group (name)","p",PROCEDURE(p_addgroup),},
    15 {"removeGroup",0,PARAM_DONTSAVE+PARAM_USERHIDDEN,"remove group (index)","p",PROCEDURE(p_remgroup),},
    16 {"changedProperty",0,PARAM_DONTSAVE+PARAM_USERHIDDEN+PARAM_READONLY,"last changed property #","d",FIELD(changed),},
    17 {"changedPropertyId",0,PARAM_DONTSAVE+PARAM_USERHIDDEN+PARAM_READONLY,"last changed property id","s",GETONLY(changedname),},
     11{"clear",0,PARAM_DONTSAVE | PARAM_USERHIDDEN,"remove all properties","p",PROCEDURE(p_clear),},
     12{"add",0,PARAM_DONTSAVE | PARAM_USERHIDDEN,"add property (id,type,name,help)","p",PROCEDURE(p_addprop),},
     13{"remove",0,PARAM_DONTSAVE | PARAM_USERHIDDEN,"remove property (index)","p",PROCEDURE(p_remprop),},
     14{"addGroup",0,PARAM_DONTSAVE | PARAM_USERHIDDEN,"add group (name)","p",PROCEDURE(p_addgroup),},
     15{"removeGroup",0,PARAM_DONTSAVE | PARAM_USERHIDDEN,"remove group (index)","p",PROCEDURE(p_remgroup),},
     16{"changedProperty",0,PARAM_DONTSAVE | PARAM_USERHIDDEN | PARAM_READONLY,"last changed property #","d",FIELD(changed),},
     17{"changedPropertyId",0,PARAM_DONTSAVE | PARAM_USERHIDDEN | PARAM_READONLY,"last changed property id","s",GETONLY(changedname),},
    1818};
    1919#undef FIELDSTRUCT
  • cpp/frams/vm/classes/3dobject.cpp

    r229 r240  
    2626{"sub",0,PARAM_NOSTATIC,"subtract","p(oXYZ)",PROCEDURE(p_subvec),"Note: it does not return a new object, just modifies the existing one"},
    2727{"scale",0,PARAM_NOSTATIC,"multiply by scalar","p(f)",PROCEDURE(p_scale),},
    28 {"length",0,PARAM_READONLY+PARAM_NOSTATIC,"length","f",GETONLY(length),},
     28{"length",0,PARAM_READONLY | PARAM_NOSTATIC,"length","f",GETONLY(length),},
    2929{"normalize",0,PARAM_NOSTATIC,"normalize","p()",PROCEDURE(p_normalize),"scales the vector length to 1.0"},
    30 {"toString",0,PARAM_READONLY+PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
    31 {"toVector",0,PARAM_READONLY+PARAM_NOSTATIC,"vector of [x,y,z]","oVector",GETONLY(toVector),},
     30{"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
     31{"toVector",0,PARAM_READONLY | PARAM_NOSTATIC,"vector of [x,y,z]","oVector",GETONLY(toVector),},
    3232{"rotate",0,PARAM_NOSTATIC,"rotate using Orient object","p(oOrient)",PROCEDURE(p_rotate),},
    3333{"revRotate",0,PARAM_NOSTATIC,"reverse rotate using Orient object","p(oOrient)",PROCEDURE(p_revrotate),},
     
    229229{"zz",1,PARAM_NOSTATIC,"orientation.z.z","f",FIELD(o.z.z),},
    230230
    231 {"x",0,PARAM_NOSTATIC+PARAM_READONLY,"x vector","oXYZ",GETONLY(x),},
    232 {"y",0,PARAM_NOSTATIC+PARAM_READONLY,"y vector","oXYZ",GETONLY(y),},
    233 {"z",0,PARAM_NOSTATIC+PARAM_READONLY,"z vector","oXYZ",GETONLY(z),},
     231{"x",0,PARAM_NOSTATIC | PARAM_READONLY,"x vector","oXYZ",GETONLY(x),},
     232{"y",0,PARAM_NOSTATIC | PARAM_READONLY,"y vector","oXYZ",GETONLY(y),},
     233{"z",0,PARAM_NOSTATIC | PARAM_READONLY,"z vector","oXYZ",GETONLY(z),},
    234234
    235235{"new",0,0,"create new Orient object","p oOrient()",PROCEDURE(p_new),},
    236236{"newFromVector",0,0,"create new Orient object","p oOrient(oVector)",PROCEDURE(p_newFromVector),},
    237 {"toVector",0,PARAM_READONLY+PARAM_NOSTATIC,"vector representation","oVector",GETONLY(toVector),"for serialization"},
     237{"toVector",0,PARAM_READONLY | PARAM_NOSTATIC,"vector representation","oVector",GETONLY(toVector),"for serialization"},
    238238{"clone",0,PARAM_NOSTATIC,"create new Orient object","p oOrient()",PROCEDURE(p_clone),},
    239239{"set",0,PARAM_NOSTATIC,"copy from another Orient object","p(oOrient)",PROCEDURE(p_set),},
     
    470470{"newO",0,0,"create new reference","p",PROCEDURE(p_newO),"(for internal use only) use &variablename to create Ref objects.",},
    471471{"copyFrom",0,0,"copy the reference","p(oRef)",PROCEDURE(p_copyFrom),"make the reference point to the same target,"},
    472 {"toString",0,PARAM_READONLY+PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
     472{"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
    473473{0,0,0,},
    474474};
  • cpp/frams/vm/classes/collectionobj.cpp

    r197 r240  
    1919 "Example:\nvar v=Vector.new();\nv.add(123); v.add(\"string\");",},
    2020{"clear",0,PARAM_NOSTATIC,"clear data","p()",PROCEDURE(p_clear),},
    21 {"size",0,PARAM_READONLY+PARAM_NOSTATIC,"element count","d",GETONLY(size),},
     21{"size",0,PARAM_READONLY | PARAM_NOSTATIC,"element count","d",GETONLY(size),},
    2222{"remove",0,PARAM_NOSTATIC,"remove at position","p(d position)",PROCEDURE(p_remove),},
    2323{"get",0,PARAM_NOSTATIC,"get value at position","p x(d position)",PROCEDURE(p_get),},
     
    2525{"add",0,PARAM_NOSTATIC,"append at the end","p(x value)",PROCEDURE(p_add),},
    2626{"find",0,PARAM_NOSTATIC,"find","p d(x value)",PROCEDURE(p_find),"returns the element index or -1 if not found"},
    27 {"avg",0,PARAM_READONLY+PARAM_NOSTATIC,"average","f",GETONLY(avg)},
    28 {"stdev",0,PARAM_READONLY+PARAM_NOSTATIC,"standard deviation","f",GETONLY(stdev),"=sqrt(sum((element[i]-avg)^2)/(size-1)) which is estimated population std.dev. from sample std.dev."},
    29 {"toString",0,PARAM_READONLY+PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
     27{"avg",0,PARAM_READONLY | PARAM_NOSTATIC,"average","f",GETONLY(avg)},
     28{"stdev",0,PARAM_READONLY | PARAM_NOSTATIC,"standard deviation","f",GETONLY(stdev),"=sqrt(sum((element[i]-avg)^2)/(size-1)) which is estimated population std.dev. from sample std.dev."},
     29{"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
    3030{"new",0,0,"create new Vector","p oVector()",STATICPROCEDURE(p_new),},
    3131{"sort",0,PARAM_NOSTATIC,"sort elements (in place)","p(o comparator)",PROCEDURE(p_sort),"comparator can be null, giving the \"natural\" sorting order (depending on element type), otherwise it must be a function reference obtained by the \"function FUNCTIONNAME\" operator.\n\nExample:\nfunction compareLastDigit(a,b) {return (a%10)<(b%10);}\nvar v=[16,23,35,42,54,61];\nv.sort(function compareLastDigit);"},
    32 {"iterator",0,PARAM_NOSTATIC+PARAM_READONLY,"iterator","o",GETONLY(iterator),},
     32{"iterator",0,PARAM_NOSTATIC | PARAM_READONLY,"iterator","o",GETONLY(iterator),},
    3333{0,0,0,},
    3434};
     
    4444 "var i;\nfor(i=0;i<d.size;i++) Simulator.print(d.getKey(i)+\" is \"+d.get(i));",},
    4545{"clear",0,PARAM_NOSTATIC,"clear data","p()",PROCEDURE(p_clear),},
    46 {"size",0,PARAM_NOSTATIC+PARAM_READONLY,"element count","d",GETONLY(size),},
     46{"size",0,PARAM_NOSTATIC | PARAM_READONLY,"element count","d",GETONLY(size),},
    4747{"remove",0,PARAM_NOSTATIC,"remove named or indexed element","p(x key)",PROCEDURE(p_remove),},
    4848{"get",0,PARAM_NOSTATIC,"get named or indexed element","p x(x key)",PROCEDURE(p_get),},
     
    5151{"find",0,PARAM_NOSTATIC,"find","p s(x value)",PROCEDURE(p_find),"returns the element key or null if not found"},
    5252{"new",0,0,"create new Dictionary","p oDictionary()",STATICPROCEDURE(p_new),},
    53 {"toString",0,PARAM_READONLY+PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
     53{"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
    5454{0,0,0,},
    5555};
     
    442442{
    443443 {"VectorIterator",1,2,"VectorIterator","VectorIterator"},
    444 {"next",0,PARAM_READONLY+PARAM_NOSTATIC,"next","d 0 1",GETONLY(next),},
    445 {"value",0,PARAM_READONLY+PARAM_NOSTATIC,"value","x",GETONLY(value),},
     444{"next",0,PARAM_READONLY | PARAM_NOSTATIC,"next","d 0 1",GETONLY(next),},
     445{"value",0,PARAM_READONLY | PARAM_NOSTATIC,"value","x",GETONLY(value),},
    446446{0,0,0,},
    447447};
  • cpp/frams/vm/classes/genoobj.cpp

    r222 r240  
    1313{"Geno",1,14,"Geno","All information about a single genotype.\nThis is a genetics-only object which does not contain any performance data. See also: Genotype class"},
    1414{"name",0,PARAM_NOSTATIC,"Name","s 0 40",GETSET(name),},
    15 {"rawgenotype",0,PARAM_NOSTATIC+PARAM_READONLY,"Raw genotype","s 1",GETONLY(genotype),"Genotype, excluding the format specifier"},
     15{"rawgenotype",0,PARAM_NOSTATIC | PARAM_READONLY,"Raw genotype","s 1",GETONLY(genotype),"Genotype, excluding the format specifier"},
    1616{"info",0,PARAM_NOSTATIC,"Info","s 1",GETSET(info),"Additional information or comments",},
    17 {"format",0,PARAM_NOSTATIC+PARAM_READONLY,"Format","d",GETONLY(format),"Genotype format",},
    18 {"genotype",0,PARAM_NOSTATIC+PARAM_READONLY,"Genotype","s 1",GETONLY(string),},
    19 {"isValid",0,PARAM_NOSTATIC+PARAM_READONLY,"Valid","d 0 1",GETONLY(isvalid),},
     17{"format",0,PARAM_NOSTATIC | PARAM_READONLY,"Format","d",GETONLY(format),"Genotype format",},
     18{"genotype",0,PARAM_NOSTATIC | PARAM_READONLY,"Genotype","s 1",GETONLY(string),},
     19{"isValid",0,PARAM_NOSTATIC | PARAM_READONLY,"Valid","d 0 1",GETONLY(isvalid),},
    2020{"getConverted",0,PARAM_NOSTATIC,"get converted genotype","p oGeno(d format)",PROCEDURE(p_getconvert),},
    21 {"f0genotype",0,PARAM_NOSTATIC+PARAM_READONLY,"f0 genotype","s 1",GETONLY(f0genotype),"converted to f0 genotype",},
     21{"f0genotype",0,PARAM_NOSTATIC | PARAM_READONLY,"f0 genotype","s 1",GETONLY(f0genotype),"converted to f0 genotype",},
    2222{"new",0,0,"create new empty object","p oGeno()",PROCEDURE(p_new),},
    2323{"newFromString",0,0,"create new object from supplied string argument","p oGeno(s genotype)",PROCEDURE(p_newfromstring),},
    2424{"newFrom",0,0,"create new object","p oGeno(s genotype,d format,s name,s description)",PROCEDURE(p_newfrom),},
    25 {"autoname",0,PARAM_NOSTATIC+PARAM_READONLY,"Autogenerated name","s",GETONLY(autoname),},
    26 {"toVector",0,PARAM_READONLY+PARAM_NOSTATIC,"serialization support","oVector",GETONLY(toVector),},
     25{"autoname",0,PARAM_NOSTATIC | PARAM_READONLY,"Autogenerated name","s",GETONLY(autoname),},
     26{"toVector",0,PARAM_READONLY | PARAM_NOSTATIC,"serialization support","oVector",GETONLY(toVector),},
    2727{"newFromVector",0,0,"serialization support","p oGeno(oVector)",PROCEDURE(p_newfromvector),},
    2828{0,0,0,},
Note: See TracChangeset for help on using the changeset viewer.