Aimsun Next Scripting
22
|
Public Types | |
enum | IdentifierFormFlag { eIdentifierDefault , eIdentifierId , eIdentifierName , eIdentifierExternalId , eIdentifierTypeExternalName , eIdentifierDescription , eIdentifierStandard , eIdentifierStandardWithType , eIdentifierAll } |
enum | GKLockType { eNone , eModification , eDelete , eModificationDelete } |
enum | GKObjectStatus { eNew , eSaved , eModified , eDeleted } |
typedef QFlags< GKObject::IdentifierFormFlag > | IdentifierForm |
Public Member Functions | |
GKObject () | |
GKObject (const GKObject &o) | |
virtual void | addedToCatalog () |
virtual void | removedFromCatalog () |
uint | getTick () const |
virtual void | increaseTick () |
void | setTick (uint t) |
virtual GKObject * | clone (bool addItToModel=true) const |
virtual GKObject * | cloneAsTemporary (bool addItToModel=true) const |
GKFolder * | getCreateRootFolder () |
GKFolder * | getRootFolder () const |
void | setRootFolder (GKFolder *afolder) |
GKFolder * | findFolder (const QString &byName) const |
QVector< GKFolder * > | getParentFolders () const |
bool | isDataValueNull (const GKColumn *attr) const |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
virtual void | setDataValue (const GKColumn *attr, const QVariant &v) |
void | setDataValueByID (uint attrId, const QVariant &v) |
virtual void | setDataValueObject (const GKColumn *attr, const GKObject *obj) |
void | setDataValueObjectByID (uint attrId, const GKObject *obj) |
virtual void | setDataValueDouble (const GKColumn *attr, double v) |
void | setDataValueDoubleByID (uint attrId, double v) |
virtual double | getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const |
double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const |
bool | hasAnyTSWithData () const |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const |
GKTimeSerie * | getDataValueTSByID (uint attrId) const |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInSingleTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription) |
void | setDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL) |
void | setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL) |
virtual void | clearDataValueTS (const GKColumn *attr, GKTSDescription *aDescription=NULL) |
void | clearDataValueTSByID (uint attrId, GKTSDescription *aDescription=NULL) |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
void | removeDataValue (const GKColumn *attr) |
void | removeDataValueByID (uint attrId) |
const QString & | getDescription () const |
void | setDescription (const QString &adescription) |
const QString & | getExternalId () const |
void | setExternalId (const QString &anId) |
virtual GKObjectDelCmd * | getDelCmd () |
virtual GKObjectConnectionDelCmd * | getDelConnectionCmd (GKObject *target) |
virtual void | nonCommandObjectRemoved (GKObject *) |
virtual void | init () |
virtual void | setId (uint aid, GKModel *model) |
uint | getId () const |
QUuid | getUUID () const |
virtual void | setName (const QString &aname) |
const QString & | getName () const |
QString | getExtendedId (IdentifierForm form=eIdentifierDefault) const |
QString | getNameOrExtendedId (IdentifierForm form=eIdentifierDefault) const |
virtual const QString & | getTypeName () const |
virtual QString | getTypeExternalName () const |
const GKObject * | getMaster () const |
GKType * | getType () const |
virtual void | setType (GKType *atype) |
bool | isA (const GKType *atype) const |
bool | isA (const QString &typeName) const |
virtual void | setModel (GKModel *amodel) |
GKModel * | getModel () const |
virtual void | setLock (GKLockType atype) |
GKLockType | getLock () const |
virtual bool | canBeDeleted () const |
virtual bool | canBeModified () const |
virtual bool | canBeEdited () const |
GKObjectStatus | getStatus () const |
virtual void | setStatus (const GKObjectStatus astatus) |
void | notifyStatusChange () |
bool | isTemporary () const |
void | setTemporary (bool value) |
bool | isExternal () const |
void | setExternal (bool value) |
virtual void | preferencesChanged () |
void | removeColumn (GKColumn *column) |
void | resetColumn (GKColumn *column) |
![]() | |
GKBaseObject () | |
if (base) | |
virtual uint | getId () const =0 |
virtual const QString & | getTypeName () const =0 |
virtual QString | getTypeExternalName () const =0 |
virtual const GKObject * | getMaster () const =0 |
virtual const QString & | getName () const =0 |
virtual const QString & | getExternalId () const =0 |
virtual const QString & | getDescription () const =0 |
virtual GKModel * | getModel () const =0 |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const =0 |
virtual GKTimeSerie * | getDataValueTSByID (uint attrId) const =0 |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
Static Public Attributes | |
static uint | typeNameAtt |
static uint | typeExternalNameAtt |
static uint | revisedAtt |
![]() | |
Py_END_ALLOW_THREADS static End uint | idAtt |
static uint | nameAtt |
static uint | externalIdAtt |
static uint | descriptionAtt |
Additional Inherited Members | |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
The main class in the GKernel module. It offers:
A GKObject is created using the new command available for its GKType or the GKSystem::newObject call, either when a new object is required or when an object is restored from disk or copied (from the clipboard). When an object is created it receives a type and a model and its stored in the catalog (GKCatalog). Never call the new operator to create an object since all these additional initializations will not be done (the exception to the rule is when the developer wants to create a temporary object and type, model or catalog presence are not required).
Object creation example:
The GKSystem::newObject method looks for a C function that creates the object (an object factory). This function, in order to be located must be called in a specific way and explicitly exported in Windows platform (in the other platforms symbols in a shared library are exported by default).
For example, if we add MyClass to the system, in order to create instances of it we will implement a C function witch name will be MyClass followed by Factory:
The implementation of MyClassFactory will be:
If the developer does not provide an object factory with the correct name, signature and correctly exported the method GKSystem::newObject will fail and no object will be created.
Classes and functions defined in the developer plug-in and used by Aimsun (object factories, editor factories, new classes,...) resides in a DLL in Windows or a shared library in UNIX, Linux and MAC OS X. In Windows platform (due to Microsoft and Intel C++ compilers) these symbols must be explicitly exported, that is, marked as symbols that can be used by the application where the DLL is loaded. In the other platforms (due to GCC compiler) these symbols are automatically exported.
In order to export symbols they have to be marked with __declspec(dllexport)
when the DLL is compiled and must be marked as __declspec(dllimport)
when the symbol is included by an application that will use it. Under GCC and CLANG compiler the priciple is the same, but the marks are different.
The best way to deal with this requirement is to define a macro as follow:
This macro requires that, during compilation, the developer defines _DLL_DEF when compiling the DLL. If another DLL or application uses this DLL then it will define _WIN32
but not _DLL_DEF so, in this case, __declspec(dllimport) will be used.
Is recommendable for the name of the macro (EXPORT_MACRO in the example) to be unique among other DLLs. A good name can be, for example, PLUGING_NAMEEXPORT, where PLUGING_NAME is the name of the plug-in.
An object has not only a type and a model but also a unique identifier (set when the object is created the first time via GKSystem::newObject) and inmutable during all the object lifetime. Use the GKSystem::getId to get the identifier.
It supports also an external identifier using the GKObject::externalIdAtt attribute. This attribute is used to identify this object in an external system in where the unique identifier of this object cannot be used (either because the identifier is coded in a different way or because the identifier was already ste and cannot be changed). Use the methods GKObject GKObject::getExternalId and GKObject::setExternalId.
Objects are stored in a file via the GKObject::store method. The developer must call first the store method from the super class and then add all new information to the data stream. See GKDataStream documentation for further details.
Objects are restored from a file using the GKObject::restore method. The developer must call first the restore method from the super class and, then, read any additional data. Note that versioning is supported. See GKType and GKDataStream for more information.
Aimsun can access attributes from any object in a generic way using the GKObject::getDataValue and GKObject::setDataValue methods. These attributes have been declared during the GKType creation.
There is one way to store data in a generic way: using the GKObject::setDataValue method and several ways to gte the data back: GKObject::getDataValue, GKObject::getDataValueInt, GKObject::getDataValueBool, GKObject::getDataValueDouble and GKObject::getDataValueString.
There are two differences between the generic getDataValue and the more specific ones:
So, the specific calls are much more efficient and are always preferred.
As a developer you need to rewrite these functions (the set and the get) only for internal attributes. When doing so be sure that a call to the supertype method is done if the attribute is not in this type (because can be in the super type).
For the get only one function has to be written, either the generic one (GKObject::getDataValue) or the specific one (in function of the attribute type).
An example follows (see also GKType): If we have the following class:
Then we will write the set method:
and the get method:
or the generic get method:
Each GKObject can have a folder in where it can store any kind of data. This folder is called the root folder. Then, this folder can store a collection of objects and folders (and so on).
An object changes its status during its lifetime. It goes from new when created, to saved when stored in disk (or restored from it), to deleted when its deleted and modified when its edited (in a dialog, in a command).
All the status changes are managed automatically by the system expect the modify one. The developer must mark the object has modified when it is modified (usually in the editor during the accept operation and in the command during the undo and redo).
If the object is not marked as modified when is modified then it will not be saved in a database (database store and restore will be supported in future Aimsun versions).
When a operation modifies an object is important to call GKObject::increaseTick so that observers of this object will be aware of a change.
When this object is deleted the system will ask for a delete command using the method GKObject::getDelCmd. This command will have the responsibility for deleting the object and all the references to it (and undo this operation).
typedef QFlags<GKObject::IdentifierFormFlag> GKObject::IdentifierForm |
enum GKObject::GKLockType |
When asking for the extended identifier (GKObject::getExtendedId) of an object, the information to use to create it. It can be a combination of:
Enumerator | |
---|---|
eIdentifierDefault | |
eIdentifierId | |
eIdentifierName | |
eIdentifierExternalId | |
eIdentifierTypeExternalName | |
eIdentifierDescription | |
eIdentifierStandard | |
eIdentifierStandardWithType | |
eIdentifierAll |
GKObject::GKObject | ( | ) |
GKObject::GKObject | ( | const GKObject & | o | ) |
|
virtual |
Called by the catalog when this object is added to it.
|
virtual |
Return true is this object can be deleted. This function can be rewritten to support complex locks as objects locked because its container is locked.
Reimplemented in GKCentroid.
|
virtual |
Return true is this object can be modified. This function can be rewritten to support complex locks as objects locked because its container is locked.
Reimplemented in GKGeoObject, and GKLayer.
|
virtual |
Return true is this object can be modified. This function can be rewritten to support complex locks as objects locked because its container is locked.
Reimplemented in GKCentroid, GKGeoObject, and GKLayer.
|
virtual |
Clears a Time Series and initializes it using an optional description
void GKObject::clearDataValueTSByID | ( | uint | attrId, |
GKTSDescription * | aDescription = NULL |
||
) |
Clears a Time Series and initializes it using an optional description
|
virtual |
Returns this object copied in a new one.
Reimplemented in GKControlJunction, GKControlPlan, GKMobileAgent, GKRealDataSet, GKTrafficDemand, GKTrafficState, GKVehicle, and GKPedestrianODMatrix.
|
virtual |
Returns this object copied in a new temporary one.
GKFolder * GKObject::findFolder | ( | const QString & | byName | ) | const |
Finds a folder by its internal name among the different folders in this object.
GKFolder * GKObject::getCreateRootFolder | ( | ) |
Returns the root folder. If the root folder doesn't exist it will create one.
|
virtual |
Get the value of an attribute. If no value is found, None is returned. If deleteit is true, the returned value must be deleted by the method that makes the call.
Implements GKBaseObject.
|
virtual |
|
virtual |
Implements GKBaseObject.
|
virtual |
Get the value of an attribute. If no value is found, None is returned. If deleteit is true, the returned value must be deleted by the method that makes the call.
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
Reimplemented in GKSection, GKForceEnrouteAssignment, and GKPedestrianType.
|
virtual |
Implements GKBaseObject.
|
virtual |
Helper functions (only for access). It's faster than getDataValue since it doesn't creates any intermediate QVariant for internal attributes. Note that for GKTimeSerie it returns the default value, in order to get any other value (position or condition dependant) use getDataValue to take the whole attribute
Implements GKBaseObject.
Reimplemented in GKSection, and GKForceEnrouteAssignment.
|
virtual |
Helper functions (only for access). It's faster than getDataValue since it doesn't creates any intermediate QVariant for internal attributes. Note that for GKTimeSerie it returns the default value, in order to get any other value (position or condition dependant) use getDataValue to take the whole attribute
Implements GKBaseObject.
|
virtual |
Get a value for a TimeSerie or 0.0 if no value is found (no value for the index) and, optionally, its deviation.
Implements GKBaseObject.
|
virtual |
Get a value for a TimeSerie or 0.0 if no value is found (no value for the index) and, optionally, its deviation.
Implements GKBaseObject.
|
virtual |
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Implements GKBaseObject.
|
virtual |
Get a Time Series.
Implements GKBaseObject.
|
virtual |
Get a Time Series.
Implements GKBaseObject.
|
virtual |
Object will be deleted. The user must write a suitable GKObjectDelCmd subclass and return it in this method. The implementation in this class returns a GKObjectDelCmd as it is (it removes the object from the GKModel and delete it if needed after command destruction, removes the object from the GKGeoModel and removes connections to it).
Reimplemented in GKGroupingType, GKSection, GKTrafficState, GKGenerationAttractionDataSetAttribute, and GKTrafficProfile.
|
virtual |
This object has connections to "target" and "target" will be removed. Create and return a delete command to handle undo and redo of the affected connections. If the object is deleted outside a command (no UNDO) then the model will call GKObject::nonCommandObjectRemoved instead.
If this method returns a None it means that the delete is not possible and the command will not be done. If an object is connected to another but decides that no information is needed in the delete command then it has to return an empty GKObjectConnectionDelCmd instead of a None.
See also GKModel.
Reimplemented in GKTrafficState, and GKController.
|
virtual |
Get the object description (entered by the user)
Implements GKBaseObject.
QString GKObject::getExtendedId | ( | IdentifierForm | form = eIdentifierDefault | ) | const |
Returns the informations corresponding to the specified form. If form is eIdentifierDefault, GKObject::defaultIdentifierForm will be used.
|
virtual |
Get the object external ID stored in GKObject::externalIdAtt.
Implements GKBaseObject.
|
virtual |
Return the unique identifier of this object.
Implements GKBaseObject.
Referenced by GKControlPlan::applyControlJunctions(), and GKControlPlan::applyControlMeterings().
GKLockType GKObject::getLock | ( | ) | const |
Return the current lock for this object. Note that is preferred to use GKObject::canBeDeleted and GKObject::canBeModified instead of this method since eLock return the lock over this particular object but an object can return eNone (no lock) but can be locked because other (container) object is locked.
|
virtual |
The object that originates this object. In this case it is itself.
Implements GKBaseObject.
|
virtual |
Return the model of this object,
Implements GKBaseObject.
|
virtual |
The optional name of this object.
Implements GKBaseObject.
QString GKObject::getNameOrExtendedId | ( | IdentifierForm | form = eIdentifierDefault | ) | const |
Returns name if not empty or the getExtendedId of the specified form.
QVector< GKFolder * > GKObject::getParentFolders | ( | ) | const |
It returns the folders that contain this object as a first level object. It will return only the folders that have this object in the list obtained using the function GKFolder::getContents()
GKFolder * GKObject::getRootFolder | ( | ) | const |
Can return None (no folder) or an empty list (no folders again).
GKObjectStatus GKObject::getStatus | ( | ) | const |
Get the current status of this object:
uint GKObject::getTick | ( | ) | const |
The current tick of this object. See GKObject::increaseTick
GKType * GKObject::getType | ( | ) | const |
Returns the type of this object.
|
virtual |
The type external name of this object. Is equivalent to getType()->getExternalName()
Implements GKBaseObject.
|
virtual |
The type name of this object. Is equivalent to getType()->getName()
Implements GKBaseObject.
QUuid GKObject::getUUID | ( | ) | const |
Return the unique identifier of this object.
bool GKObject::hasAnyTSWithData | ( | ) | const |
Check if this object has any time series with data
|
virtual |
Increases the current tick of this object. An object has a tick that represents its age. During every modification the operation increases the tick. Other classes can use this tick information to know if they must sync data that refers to this object (for example a drawer).
|
virtual |
Object initialization must be here, this function is called after setting object type, model and the creation of the associate GKRow. Attributes that not depend of the type, or the model can be initialised in the object constructor (since the object is first created and then the type and model are s).
Usually only GKColumn attributes will be initialised here.
Reimplemented in GKTrafficDemand, GKTurningCooperationChange, and GKPedestrianLevelChangeObject.
bool GKObject::isA | ( | const GKType * | atype | ) | const |
Returns true if this object is an instance of a type (or a sub type of it).
bool GKObject::isA | ( | const QString & | typeName | ) | const |
Returns true if this object is an instance of a type (or a sub type of it).
bool GKObject::isDataValueNull | ( | const GKColumn * | attr | ) | const |
Returns true if a external column is None, false if it is not external or is no None
bool GKObject::isExternal | ( | ) | const |
True if it is a external object, that is an object that lives in another Aimsun document (used by replications and experiments in revisions to show in a network data from another).
An external object is also temporary (see GKObject::isTemporary)
bool GKObject::isTemporary | ( | ) | const |
Return true is it is a temporary object. A temporary object will not be stored with the rest of the GKModel.
|
virtual |
This object has connections to "target" and "target" will be removed. No command is required as the object is deleted outside a command (if is deleted in a command the model will call GKObject::getDelConnectionCmd instead).
See also GKModel.
Reimplemented in GKController.
void GKObject::notifyStatusChange | ( | ) |
Notify the change on this object. Use setStatus except when the object changes something on it that will not be store, that is, no need to mark the model as unsave but still the GUI (for example) should be notified.
|
virtual |
The preferences for the GKModel has been edited. Rewrite this method to react to any change that is interested to this object.
Note that, in order to receive this call, this object must be added to the preferences notification list. And, when the object is destroyed, it must delete it from that list. A good place to set this code is in the GKObject::addedToCatalog and GKObject::removedFromCatalog.
void GKObject::removeColumn | ( | GKColumn * | column | ) |
Removes this (external) column from this object.
void GKObject::removeDataValue | ( | const GKColumn * | attr | ) |
Removes an external attribute value from this object.
void GKObject::removeDataValueByID | ( | uint | attrId | ) |
Removes an external attribute value from this object.
|
virtual |
Called by the catalog when this object is removed from it.
void GKObject::resetColumn | ( | GKColumn * | column | ) |
Removes the value on the (external) column from this object. A time series or a string will be cleared, a scalar value will be set (if a number) to -1, a bool wil be set to false...
|
virtual |
Set the aggregated value (and a deviation that can be -1 for NULL deviations) for a time series.
void GKObject::setAggregatedValueInTSByID | ( | uint | attrId, |
double | value, | ||
double | deviation, | ||
GKTSDescription * | aDescription = NULL |
||
) |
Set the aggregated value (and a deviation that can be -1 for NULL deviations) for a time series.
|
virtual |
Sets the value of an attribute. "v" is copied.
Reimplemented in GKSection, GKForceEnrouteAssignment, and GKPedestrianType.
void GKObject::setDataValueByID | ( | uint | attrId, |
const QVariant & | v | ||
) |
Sets the value of an attribute. "v" is copied.
|
virtual |
Sets the value of an attribute.
void GKObject::setDataValueDoubleByID | ( | uint | attrId, |
double | v | ||
) |
Sets the value of an attribute.
|
virtual |
Set the value (and a deviation that can be -1 for NULL deviations) for a time series interval. If the time series has not been created, this method will create it. The time series created will be a GKSingleValueTimeSerie, that is, a time series with a single time interval. In this case, it is recommended to specify its description (GKTSDescription).
The parameter "index" indicates both the position in the TS and the dimension. If the position is less than 0 (-1 is recomended) the value will be added at the end of the TS.
|
virtual |
Set the value (and a deviation, or upperBound value, that can be -1 for NULL deviations and a lowerBound value, that can be -1 for no bounds definition) for a time series index. If the time series has not been created, this method will created it. In this case, it is recommended to specify its description (GKTSDescription).
The parameter "index" indicates the position in the TS. If the pos is less than 0 (-1 is recommended) the value will be added at the end of the TS.
|
virtual |
Set the value (and a deviation that can be -1 for NULL deviations) for a time series interval. If the time series has not been created, this method will create it. The time series created will be a GKMultiValueTimeSerie, that is, a time series with several time intervals. In this case, it is recommended to specify its description (GKTSDescription).
The parameter "index" indicates both the position in the TS and the dimension. If the position is less than 0 (-1 is recommended) the value will be added at the end of the TS.
void GKObject::setDataValueInTSByID | ( | uint | attrId, |
GKTimeSerieIndex | index, | ||
double | value, | ||
double | deviation, | ||
GKTSDescription * | aDescription = NULL , |
||
int | reservedSize = 0 |
||
) |
Set the value (and a deviation that can be -1 for NULL deviations) for a time series index. If the time series has not been created this method will created it. In this case is recommended to specify its description (GKTSDescription).
The parameter "index" indicates the position in the TS. If the pos is less than 0 (-1 is recomended) the value will be add at the end of the TS.
Sets the value of an attribute of type _GKObject.
Reimplemented in GKForceEnrouteAssignment.
void GKObject::setDataValueObjectByID | ( | uint | attrId, |
const GKObject * | obj | ||
) |
Sets the value of an attribute of type _GKObject.
void GKObject::setDescription | ( | const QString & | adescription | ) |
Set the object description.
void GKObject::setExternal | ( | bool | value | ) |
True if it is a external object, that is an object that lives in another Aimsun document (used by replications and experiments in revisions to show in a network data from another).
An external object is also temporary (see GKObject::isTemporary)
void GKObject::setExternalId | ( | const QString & | anId | ) |
Set the object external ID stored in GKObject::externalIdAtt.
|
virtual |
This setId sets the unique ID of this object. This id CANNOT be changed, it's assigned on creation time and keep constant during all the object life.
This method is called automatically either when the object is created in the GKSystem::newObject or when its restored.
|
virtual |
Set the lock of an object:
|
virtual |
Sets the model in where this object resides. Done automatically by GKSystem::newObject.
|
virtual |
The optional name of this object.
Reimplemented in GKControlPlan.
void GKObject::setRootFolder | ( | GKFolder * | afolder | ) |
Sets the root folder for this object (it comes from a restore operation, in order to create the root folder use GKObject::getCreateRootFolder).
|
virtual |
Change the status of an object and the status of the model (to unsave if the object is modified). Note that a eNew object, when modified, keeps its eNew state. Call GKObject::notifyStatusChange to reflect the change in other objects
void GKObject::setTemporary | ( | bool | value | ) |
Set this object to temporary (or not). See GKObject::isTemporary.
void GKObject::setTick | ( | uint | t | ) |
Set the current tick of this object. See GKObject::increaseTick
|
virtual |
Sets the type for this object and creates the extension data (additional attributes for this object) for type "atype". Done automatically by GKSystem::newObject.
|
static |
Is it revised?
|
static |
Object Type External Name (GKType::getExternalName) as an attribute.
|
static |
Object Type Name (GKType::getName) as an attribute.