Open Ephys GUI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes
Parameter Class Reference

Class for holding user-definable processor parameters. More...

#include <Parameter.h>

List of all members.

Public Member Functions

 Parameter (const String &name_, bool defaultVal, int ID, bool t=false)
 Constructor for boolean parameters.
 Parameter (const String &name_, float low, float high, float defaultVal, int ID, bool t=false)
 Constructor for continuous (float) parameters.
 Parameter (const String &name_, Array< var > a, int defaultVal, int ID, bool t=false)
 Constructor for categorical parameters.
 ~Parameter ()
 Destructor.
const String & getName ()
 Returns the name of the parameter.
const String & getDescription ()
 Returns a description of the parameter.
void addDescription (const String &desc)
 Sets the description of the parameter.
var getDefaultValue ()
 Returns the default value of a parameter (can be boolean, int, or float).
int getID ()
 Returns the unique integer ID of a parameter.
Array< var > getPossibleValues ()
 Returns all the possible values that a parameter can take.
void setValue (float val, int chan)
 Sets the value of a parameter for a given channel.
var operator[] (int chan)
 Returns the value of a parameter for a given channel.
Parameteroperator= (const Parameter &other)
 Copies a parameter.
bool isBoolean ()
 Returns true if a parameter is boolean, false otherwise.
bool isContinuous ()
 Returns true if a parameter is continuous, false otherwise.
bool isDiscrete ()
 Returns true if a parameter is discrete, false otherwise.

Public Attributes

bool shouldDeactivateDuringAcquisition
 Certain parameters should not be changed while data acquisition is active.

Detailed Description

Class for holding user-definable processor parameters.

Parameters can either hold boolean, categorical, or continuous (float) values.

Using the Parameter class makes it easier to create a graphical interface for editing parameters, because each Parameter has a ParameterEditor that is created automatically.

See also:
GenericProcessor, GenericEditor

Constructor & Destructor Documentation

Parameter::Parameter ( const String &  name_,
bool  defaultVal,
int  ID,
bool  t = false 
)

Constructor for boolean parameters.

Parameter::Parameter ( const String &  name_,
float  low,
float  high,
float  defaultVal,
int  ID,
bool  t = false 
)

Constructor for continuous (float) parameters.

Parameter::Parameter ( const String &  name_,
Array< var >  a,
int  defaultVal,
int  ID,
bool  t = false 
)

Constructor for categorical parameters.

Parameter::~Parameter ( )

Destructor.


Member Function Documentation

const String& Parameter::getName ( )

Returns the name of the parameter.

const String& Parameter::getDescription ( )

Returns a description of the parameter.

void Parameter::addDescription ( const String &  desc)

Sets the description of the parameter.

var Parameter::getDefaultValue ( )

Returns the default value of a parameter (can be boolean, int, or float).

int Parameter::getID ( )

Returns the unique integer ID of a parameter.

Array<var> Parameter::getPossibleValues ( )

Returns all the possible values that a parameter can take.

void Parameter::setValue ( float  val,
int  chan 
)

Sets the value of a parameter for a given channel.

var Parameter::operator[] ( int  chan)

Returns the value of a parameter for a given channel.

Parameter& Parameter::operator= ( const Parameter other)

Copies a parameter.

bool Parameter::isBoolean ( )

Returns true if a parameter is boolean, false otherwise.

bool Parameter::isContinuous ( )

Returns true if a parameter is continuous, false otherwise.

bool Parameter::isDiscrete ( )

Returns true if a parameter is discrete, false otherwise.


Member Data Documentation

bool Parameter::shouldDeactivateDuringAcquisition

Certain parameters should not be changed while data acquisition is active.

This variable indicates whether or not these parameters can be edited.


The documentation for this class was generated from the following file: