Aimsun Next Scripting: GKLog Class Reference
Aimsun Next Scripting  22
Public Member Functions | List of all members
GKLog Class Reference

Public Member Functions

 GKLog ()
 
void addText (const QString &str, GKModel *model=NULL, GKObject *who=NULL, const QDateTime &relativeWhen=QDateTime(), const GKPoint &where=GKPoint())
 
void addInfo (const QString &str, GKModel *model=NULL, GKObject *who=NULL, const QDateTime &relativeWhen=QDateTime(), const GKPoint &where=GKPoint())
 
void addWarning (const QString &str, GKModel *model=NULL, GKObject *who=NULL, const QDateTime &relativeWhen=QDateTime(), const GKPoint &where=GKPoint())
 
void addError (const QString &str, GKModel *model=NULL, GKObject *who=NULL, const QDateTime &relativeWhen=QDateTime(), const GKPoint &where=GKPoint())
 
void dump ()
 

Detailed Description

Both the model (GKModel::getLog) and the system (GKSystem::getLog) share the same log of events, as a way to inform the user of given actions, warnings and errors found on these actions.

A log is a collection of GKLogEntry. These content of each entry is either plain text or a well formated HTML string. If it is a HTML entry then thake into account that the possible render for this log will already add the BODY tags as the whole log will be show in unique HTML page.

The entry can have an optional originator (who), a position (where) and a time (whem). The time can be simulated time and not real time.

Constructor & Destructor Documentation

◆ GKLog()

GKLog::GKLog ( )

Member Function Documentation

◆ addError()

void GKLog::addError ( const QString &  str,
GKModel model = NULL,
GKObject who = NULL,
const QDateTime &  relativeWhen = QDateTime(),
const GKPoint where = GKPoint() 
)

Add an error entry to the log as a GKLogEntry::eError

◆ addInfo()

void GKLog::addInfo ( const QString &  str,
GKModel model = NULL,
GKObject who = NULL,
const QDateTime &  relativeWhen = QDateTime(),
const GKPoint where = GKPoint() 
)

Add an info entry to the log as a GKLogEntry::eInfo

◆ addText()

void GKLog::addText ( const QString &  str,
GKModel model = NULL,
GKObject who = NULL,
const QDateTime &  relativeWhen = QDateTime(),
const GKPoint where = GKPoint() 
)

Add an entry to the log as a GKLogEntry::eText

◆ addWarning()

void GKLog::addWarning ( const QString &  str,
GKModel model = NULL,
GKObject who = NULL,
const QDateTime &  relativeWhen = QDateTime(),
const GKPoint where = GKPoint() 
)

Add a warning entry to the log as a GKLogEntry::eWarning

◆ dump()

void GKLog::dump ( )

Writes all the messages to the standard output.

© Aimsun SLU
Aimsun ®