Aimsun Next Scripting  22
Public Types | Public Member Functions | List of all members
GKCondition Class Reference

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)
 
GKColumngetColumn () const
 
void setColumn (GKColumn *column)
 
GKColumngetObjectColumn () const
 
void setObjectColumn (GKColumn *column)
 
bool getGuiUnits () const
 
void setGuiUnits (bool guiUnits)
 

Member Enumeration Documentation

◆ LinkType

Enumerator
eNone 
eAnd 
eOr 

Constructor & Destructor Documentation

◆ GKCondition() [1/2]

GKCondition::GKCondition ( )

◆ GKCondition() [2/2]

GKCondition::GKCondition ( GKColumn column,
GKObjectComparer::Operator  op,
const QString &  value,
const QString &  value2 = QString(),
bool  guiUnits = false,
LinkType  atype = eNone 
)

Member Function Documentation

◆ compile()

void GKCondition::compile ( )

Prepare the condition.

◆ getColumn()

GKColumn * GKCondition::getColumn ( ) const

The column to evaluate

◆ getGuiUnits()

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)

◆ getLinkType()

LinkType GKCondition::getLinkType ( ) const

The link operation with the next condition (and/or)

◆ getObjectColumn()

GKColumn * GKCondition::getObjectColumn ( ) const

The column to evaluate when the first column content is a GKObject

◆ getOperator()

GKObjectComparer::Operator GKCondition::getOperator ( ) const

The operator

◆ getSecondValue()

QString GKCondition::getSecondValue ( ) const

When using the range operator, the second value

◆ getValue()

QString GKCondition::getValue ( ) const

The value to look for

◆ match() [1/2]

bool GKCondition::match ( GKObject obj) const

Return true if the object match the condition.

◆ match() [2/2]

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.

◆ setColumn()

void GKCondition::setColumn ( GKColumn column)

The column to evaluate

◆ setGuiUnits()

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.

◆ setLinkType()

void GKCondition::setLinkType ( LinkType  atype)

The link operation with the next condition (and/or)

◆ setModel()

void GKCondition::setModel ( GKModel amodel)

◆ setObjectColumn()

void GKCondition::setObjectColumn ( GKColumn column)

The column to evaluate when the first column content is a GKObject

◆ setOperator()

void GKCondition::setOperator ( GKObjectComparer::Operator  op)

The operator

◆ setSecondValue()

void GKCondition::setSecondValue ( const QString &  value)

When using the range operator, the second value

◆ setValue()

void GKCondition::setValue ( const QString &  value)

The value to look for

© Aimsun SLU
Aimsun ®