Programming Reference:Parameters
Individual parameters are represented by instances of the Param class. A collection of Param objects, such as the set of parameters present in a BCI2000 data file, is represented by a ParamList object.
Param Class
Methods
Properties
ParamList Class
Methods
Param operator[]( string name )
Access to an individual Param object by its name.
Param operator[]( int index )
Access to an individual Param object by its index.
Clear()
Removes all Param objects from the list.
bool Exists( string name )
Returns true if a Param object with the given name exists in the list.
int Index( string name )
Returns the index of the Param object with the given name, or the list's size if there is no such Param object.
Add( Param, number sortingHint = 0.0 )
Adds the given Param object to the list. When specified, the sorting hint is used to determine the relative order of Param objects in the list; a smaller value of the sorting hint corresponds to a position closer to the beginning of the list.
Add( string paramDefinition )
Creates a Param object from the specified Parameter Definition, and adds it to the list.
Delete( string name )
Deletes the Param object with the specified name from the list.
bool Save( string filename )
Saves the list as a BCI2000 Parameter File with the specified file name.
bool Load( string filename, bool importNonexisting = true )
Loads parameters from a BCI2000 Parameter File specified in the first argument. For parameters already present in the list, their values are updated from the file. If the importNonexisting flag is set, parameters not present in the list will be added from the file; otherwise, such parameters will be ignored.
Sort()
Sorts the list according to their associated sorting hints. Smaller sorting hints will be located closer to the top of the list.
ostream WriteToStream( ostream ), istream ReadFromStream( istream )
Writes/reads the entire parameter list to/from a stream in human readable format.
ostream WriteBinary( ostream ), istream ReadBinary( istream )
Writes/reads the entire parameter list to/from a BCI2000 binary stream (such as used for communication between modules).