Aimsun Next Scripting  24.0
Public Member Functions | List of all members
GKSectionObjectNewCmd Class Reference
Inheritance diagram for GKSectionObjectNewCmd:
GKCommand GKPedestrianCrossingNewCmd

Public Member Functions

 GKSectionObjectNewCmd ()
 
 ~GKSectionObjectNewCmd ()
 
void init (GKType *type, GKSection *asection, uint afrom, uint ato, GKCoord apos, GKCoord alen)
 
GKObjectcreatedObject () const
 
void doit ()
 
void undoit ()
 
- Public Member Functions inherited from GKCommand
 if (base)
 
Py_END_ALLOW_THREADS End GKCommand ()
 
void setName (const QString &)
 
const QString & getName () const
 
void setModel (GKModel *)
 
GKModelgetModel () const
 
virtual GKCommandReportinit (GKModel *)
 
virtual bool isEqual (GKCommand *) const
 
virtual void merge (GKCommand *)
 
virtual void doit ()=0
 
virtual void undoit ()=0
 
void setUndoable (bool)
 
bool isUndoable () const
 
bool isDone () const
 
virtual void setDone (bool)
 
virtual void commandToBeDone ()
 
virtual void commandDone ()
 
virtual void commandToBeUndone ()
 
virtual void commandUndone ()
 
virtual GKObjectcreatedObject () const
 
virtual bool createdObjectRequiresEdition () const
 
virtual QVector< int > getTargets () const
 

Additional Inherited Members

- Public Attributes inherited from GKCommand
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKCommandbase = (GKCommand*)sipCpp
 
 sipType = 0
 

Detailed Description

Creates a section object (GKVMS, GKDetector, GKMetering..). Use the type to specify the object to be created.

The correct way to create this command is to use the function:

GKCommand * createNewCmd( GKType * type ) const;
Base class for all the commands (except Delete commands, see GKObjectDelCmd, or Cut commands see GKOb...
Definition: GKCommand.sip:93
Type information for an object.
Definition: GKType.sip:194

from the GKModel class.

See also
GKModel::createNewCmd

Once created, and in order to do it use the function:

GKCommandReport * addCommand( GKCommand * aCommand );
An error during a command execution.
Definition: GKCommand.sip:30

from the GKCommander class.

See also
GKCommander::addCommand

A sample code for creating a new section object would look like:

cmd = model.createNewCmd( model.getType( "GKSectionObject" ))
cmd.init( type, section, from, to, pos, len )
model.getCommander().addCommand( cmd )
res = cmd.createdObject()
int len
Definition: GKRealDataSetRestorerSimple.sip:163

Constructor & Destructor Documentation

◆ GKSectionObjectNewCmd()

GKSectionObjectNewCmd::GKSectionObjectNewCmd ( )

◆ ~GKSectionObjectNewCmd()

GKSectionObjectNewCmd::~GKSectionObjectNewCmd ( )

Member Function Documentation

◆ createdObject()

GKObject * GKSectionObjectNewCmd::createdObject ( ) const
virtual

Created section object (once the command has been added to the GKCommander via the addCommand function).

Reimplemented from GKCommand.

◆ doit()

void GKSectionObjectNewCmd::doit ( )
virtual

Do not use this function. Available just for compatibility issues.

Implements GKCommand.

◆ init()

void GKSectionObjectNewCmd::init ( GKType type,
GKSection asection,
uint  afrom,
uint  ato,
GKCoord  apos,
GKCoord  alen 
)

Init function. It inits the command to create a section object of the desired type, associated to the desired section, covering from the desired lane to the desired lane, located at the desired position with a desired length.

◆ undoit()

void GKSectionObjectNewCmd::undoit ( )
virtual

Do not use this function. Available just for compatibility issues.

Implements GKCommand.

© Aimsun SLU
Aimsun ®