#include <Metadata.hxx>
Public Member Functions | |
DefaultProperty (string name, string type, int value) | |
Constructor: initialize with parameter name, type and integer parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'. | |
DefaultProperty (string name, string type, long value) | |
Constructor: initialize with parameter name, type and long parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'. | |
DefaultProperty (string name, string type, double value) | |
Constructor: initialize with parameter name, type and double parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'. | |
DefaultProperty (string name, string type, string value) | |
Constructor: initialize with parameter name, type and string parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'. | |
DefaultProperty (string name, string type, bool value) | |
Constructor: initialize with parameter name, type and boolean parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'. | |
DefaultProperty (string name, string type) | |
Constructor: initialize with parameter name and type, leaving the value empty and to be filled in later, the type should be 'int', 'long', 'double', 'string' or 'bool'. | |
DefaultProperty () | |
~DefaultProperty () | |
string | getClassName () |
Return class name. | |
void | setName (string name) |
Set parameter name. | |
void | setValue (int value) |
Set parameter value, integer type. | |
void | setValue (long value) |
Set parameter value, long integer type. | |
void | setValue (double value) |
Set parameter value, double type. | |
void | setValue (string value) |
Set parameter value, string type. | |
void | setValue (bool value) |
Set parameter value, boolean type. | |
void | setTBName (string tbName) |
Set table where the parameter is stored in the database. | |
void | setTrialID (int trialID) |
Set trial the parameter belongs to. | |
void | setInterEvt (string interEvt) |
Set interval event(intended to be a phase event) the parameter is associated with. | |
void | setCatName (string catName) |
Set parameter's category name. | |
void | setParamType (string type) |
Set parameter's type. | |
string | getName () |
Grab parameter name. | |
void | getValue (int *value) |
Grab parameter integer value. | |
void | getValue (long *value) |
Grab parameter long integer value. | |
void | getValue (double *value) |
Grab parameter double value. | |
void | getValue (string *value) |
Grab parameter string value. | |
void | getValue (bool *value) |
Grab parameter boolean value. | |
string | getTBName () |
Grab database table where the parameter is stored. | |
int | getTrialID () |
Grab trial the parameter belongs to. | |
string | getInterEvt () |
Grab intervel event number. | |
string | getCatName () |
Grab parameter's category name. | |
string | getParamType () |
Grab parameter's type. | |
bool | compareWith (Parameter &another, double tolerance, int relation) |
Compare with another parameter of the same type. | |
bool | compareWith (Parameter &another, int relation) |
Compare with another parameter of the same type. | |
string | getDBConditions () |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameter value from DB. | |
string | getDBConditions (int tbIndex, double tolerance, int relation) |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions. | |
string | getDBConditions (int tbIndex, string aStr, int relation) |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions. | |
string | getDBConditions (int tbIndex, bool boolVal, int relation) |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions. | |
Private Attributes | |
string | propertyName |
Correspond to parameter_name in the DB. | |
string | propertyType |
Correspond to parameter_type in the DB. | |
string | catName |
Correspond to category_name in the DB. | |
double | doubleValue |
Correspond to parameter_value in the DB. | |
string | stringValue |
bool | boolValue |
string | tableName |
Supposed to be 'metadata_parameters'. | |
int | trialID |
Correspond to trial and interval_event in the DB. | |
string | interEvt |
bool | hasAValue |
cqosdb::DefaultProperty::DefaultProperty | ( | string | name, | |
string | type, | |||
int | value | |||
) |
Constructor: initialize with parameter name, type and integer parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'.
cqosdb::DefaultProperty::DefaultProperty | ( | string | name, | |
string | type, | |||
long | value | |||
) |
Constructor: initialize with parameter name, type and long parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'.
cqosdb::DefaultProperty::DefaultProperty | ( | string | name, | |
string | type, | |||
double | value | |||
) |
Constructor: initialize with parameter name, type and double parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'.
cqosdb::DefaultProperty::DefaultProperty | ( | string | name, | |
string | type, | |||
string | value | |||
) |
Constructor: initialize with parameter name, type and string parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'.
cqosdb::DefaultProperty::DefaultProperty | ( | string | name, | |
string | type, | |||
bool | value | |||
) |
Constructor: initialize with parameter name, type and boolean parameter value, the type should be 'int', 'long', 'double', 'string' or 'bool'.
cqosdb::DefaultProperty::DefaultProperty | ( | string | name, | |
string | type | |||
) |
Constructor: initialize with parameter name and type, leaving the value empty and to be filled in later, the type should be 'int', 'long', 'double', 'string' or 'bool'.
cqosdb::DefaultProperty::DefaultProperty | ( | ) |
cqosdb::DefaultProperty::~DefaultProperty | ( | ) | [inline] |
string cqosdb::DefaultProperty::getClassName | ( | ) | [virtual] |
void cqosdb::DefaultProperty::setName | ( | string | name | ) | [virtual] |
void cqosdb::DefaultProperty::setValue | ( | int | value | ) | [virtual] |
void cqosdb::DefaultProperty::setValue | ( | long | value | ) | [virtual] |
void cqosdb::DefaultProperty::setValue | ( | double | value | ) | [virtual] |
void cqosdb::DefaultProperty::setValue | ( | string | value | ) | [virtual] |
void cqosdb::DefaultProperty::setValue | ( | bool | value | ) | [virtual] |
void cqosdb::DefaultProperty::setTBName | ( | string | tbName | ) | [virtual] |
void cqosdb::DefaultProperty::setTrialID | ( | int | trialID | ) | [virtual] |
void cqosdb::DefaultProperty::setInterEvt | ( | string | interEvt | ) |
Set interval event(intended to be a phase event) the parameter is associated with.
void cqosdb::DefaultProperty::setCatName | ( | string | catName | ) |
Set parameter's category name.
void cqosdb::DefaultProperty::setParamType | ( | string | type | ) |
Set parameter's type.
string cqosdb::DefaultProperty::getName | ( | ) | [virtual] |
void cqosdb::DefaultProperty::getValue | ( | int * | value | ) | [virtual] |
void cqosdb::DefaultProperty::getValue | ( | long * | value | ) | [virtual] |
void cqosdb::DefaultProperty::getValue | ( | double * | value | ) | [virtual] |
void cqosdb::DefaultProperty::getValue | ( | string * | value | ) | [virtual] |
void cqosdb::DefaultProperty::getValue | ( | bool * | value | ) | [virtual] |
string cqosdb::DefaultProperty::getTBName | ( | ) | [virtual] |
int cqosdb::DefaultProperty::getTrialID | ( | ) | [virtual] |
string cqosdb::DefaultProperty::getInterEvt | ( | ) |
Grab intervel event number.
string cqosdb::DefaultProperty::getCatName | ( | ) |
Grab parameter's category name.
string cqosdb::DefaultProperty::getParamType | ( | ) |
Grab parameter's type.
bool cqosdb::DefaultProperty::compareWith | ( | Parameter & | another, | |
double | tolerance, | |||
int | relation | |||
) | [virtual] |
Compare with another parameter of the same type.
another | another parameter | |
tolerance | comparison tolerance value | |
relation | comparison relation, which could be LT, LTEQ, GT, GTEQ, EQ, NEQ, BT |
Implements cqosdb::Parameter.
bool cqosdb::DefaultProperty::compareWith | ( | Parameter & | another, | |
int | relation | |||
) | [virtual] |
Compare with another parameter of the same type.
another | another parameter | |
relation | comparison relation, which could be LT, LTEQ, GT, GTEQ, EQ, NEQ |
Implements cqosdb::Parameter.
string cqosdb::DefaultProperty::getDBConditions | ( | ) | [virtual] |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameter value from DB.
for example, if parameter.getName() = 'myName', parameter.getTBName() = 'myTB', parameter.getTrialID() =0; parameter.getInterEvtNo()=1, then the string is like: myTB.parameter_name='myName' and myTB.trial=0 and myTB.intervel_event=1
Implements cqosdb::Parameter.
string cqosdb::DefaultProperty::getDBConditions | ( | int | tbIndex, | |
double | value, | |||
int | relation | |||
) | [virtual] |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions.
tbIndex | >= 0 index of the parameter table < 0 don't use index | |
value,value | to compare with | |
relation | comparison relation, either L, LTEQ, EQ, NEQ, GT, GTEQ, or BT |
Implements cqosdb::Parameter.
string cqosdb::DefaultProperty::getDBConditions | ( | int | tbIndex, | |
string | aStr, | |||
int | relation | |||
) | [virtual] |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions.
tbIndex | >= 0 index of the parameter table < 0 don't use index | |
aStr | string to compare with | |
relation | comparison relation, either EQ, or NEQ |
Implements cqosdb::Parameter.
string cqosdb::DefaultProperty::getDBConditions | ( | int | tbIndex, | |
bool | boolVal, | |||
int | relation | |||
) | [virtual] |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions.
tbIndex | >= 0 index of the parameter table < 0 don't use index | |
boolVal | boolean value to compare with | |
relation | comparison relation, either EQ, or NEQ |
Implements cqosdb::Parameter.
string cqosdb::DefaultProperty::propertyName [private] |
Correspond to parameter_name in the DB.
string cqosdb::DefaultProperty::propertyType [private] |
Correspond to parameter_type in the DB.
string cqosdb::DefaultProperty::catName [private] |
Correspond to category_name in the DB.
double cqosdb::DefaultProperty::doubleValue [private] |
Correspond to parameter_value in the DB.
string cqosdb::DefaultProperty::stringValue [private] |
bool cqosdb::DefaultProperty::boolValue [private] |
string cqosdb::DefaultProperty::tableName [private] |
Supposed to be 'metadata_parameters'.
int cqosdb::DefaultProperty::trialID [private] |
Correspond to trial and interval_event in the DB.
string cqosdb::DefaultProperty::interEvt [private] |
bool cqosdb::DefaultProperty::hasAValue [private] |