User Tools

Site Tools


01_user_documentation:05_object:08_parameter:01_parameter

This is an old revision of the document!


Parameter

Parameters map an attribute from RGG objects to the parameter manager. It grants the parameter manager access to the attribute accessors. Thus, enabling to set or get its value.

Only attributes from RGG can be linked to parameters (for instance fields at root of .rgg files can, but fields in module cannot).

Declare parameters

Parameters are declared with the annotations @IsParameter, and @AllAsParameter.

Single parameter

Parameter can be declared on single fields with @IsParameter.

@IsParameter
float f1;

All parameter in RGG

Parameters can be declared every applicable fields of an RGG with @AllAsParameter.

@AllAsParameter
float f1;
 
Object o1;

Explicitly use Parameter manager

By default, parameter are added to the default parameter manager. It is possible to link them to a specific parameter manager either by:

  • Creating a new one based on a type
  • Referring to an existing one by name

By type

This refer or create a new “default” parameter manager of the given type.

@IsParameter(type=EmptyParameterManager.class)
float f1;

By name

@AddParameterManager(name="envParam", type=TextFilePM.class)
@IsParameter("envParam")
float f1;
01_user_documentation/05_object/08_parameter/01_parameter.1757327724.txt.gz · Last modified: 2025/09/08 12:35 by gaetan