Aimsun Next Scripting
22
|
Public Types | |
enum | LinkType { eNone = 0 , eAnd = 1 , eOr = 2 } |
Public Member Functions | |
GKCondition () | |
GKCondition (GKColumn *column, GKObjectComparer::Operator op, const QString &value, const QString &value2=QString(), bool guiUnits=false, LinkType atype=eNone) | |
void | setModel (GKModel *amodel) |
void | compile () |
bool | match (GKObject *obj) const |
bool | match (GKObject *obj, QString &value, bool *isANumber) const |
LinkType | getLinkType () const |
void | setLinkType (LinkType atype) |
void | setValue (const QString &value) |
void | setSecondValue (const QString &value) |
QString | getValue () const |
QString | getSecondValue () const |
GKObjectComparer::Operator | getOperator () const |
void | setOperator (GKObjectComparer::Operator op) |
GKColumn * | getColumn () const |
void | setColumn (GKColumn *column) |
GKColumn * | getObjectColumn () const |
void | setObjectColumn (GKColumn *column) |
bool | getGuiUnits () const |
void | setGuiUnits (bool guiUnits) |
GKCondition::GKCondition | ( | ) |
GKCondition::GKCondition | ( | GKColumn * | column, |
GKObjectComparer::Operator | op, | ||
const QString & | value, | ||
const QString & | value2 = QString() , |
||
bool | guiUnits = false , |
||
LinkType | atype = eNone |
||
) |
void GKCondition::compile | ( | ) |
Prepare the condition.
GKColumn * GKCondition::getColumn | ( | ) | const |
The column to evaluate
bool GKCondition::getGuiUnits | ( | ) | const |
Returns true if the values are given in GUI units, false if they are system units (so no conversion is needed)
LinkType GKCondition::getLinkType | ( | ) | const |
The link operation with the next condition (and/or)
GKColumn * GKCondition::getObjectColumn | ( | ) | const |
The column to evaluate when the first column content is a GKObject
GKObjectComparer::Operator GKCondition::getOperator | ( | ) | const |
The operator
QString GKCondition::getSecondValue | ( | ) | const |
When using the range operator, the second value
QString GKCondition::getValue | ( | ) | const |
The value to look for
bool GKCondition::match | ( | GKObject * | obj | ) | const |
Return true if the object match the condition.
bool GKCondition::match | ( | GKObject * | obj, |
QString & | value, | ||
bool * | isANumber | ||
) | const |
Return true if the object match the condition. This allows the user to get the matching value.
void GKCondition::setColumn | ( | GKColumn * | column | ) |
The column to evaluate
void GKCondition::setGuiUnits | ( | bool | guiUnits | ) |
If set to true, values will be interpreted as GUI units, so they will get properly converted to System units before comparing. If false, no conversion will be performed.
void GKCondition::setLinkType | ( | LinkType | atype | ) |
The link operation with the next condition (and/or)
void GKCondition::setModel | ( | GKModel * | amodel | ) |
void GKCondition::setObjectColumn | ( | GKColumn * | column | ) |
The column to evaluate when the first column content is a GKObject
void GKCondition::setOperator | ( | GKObjectComparer::Operator | op | ) |
The operator
void GKCondition::setSecondValue | ( | const QString & | value | ) |
When using the range operator, the second value
void GKCondition::setValue | ( | const QString & | value | ) |
The value to look for