StelScriptMgr.hpp   StelScriptMgr.hpp 
skipping to change at line 61 skipping to change at line 61
QStringList getScriptList(); QStringList getScriptList();
//! Find out if a script is running //! Find out if a script is running
//! @return true if a script is running, else false //! @return true if a script is running, else false
bool scriptIsRunning(); bool scriptIsRunning();
//! Get the ID (filename) of the currently running script //! Get the ID (filename) of the currently running script
//! @return Empty string if no script is running, else the //! @return Empty string if no script is running, else the
//! ID of the script which is running. //! ID of the script which is running.
QString runningScriptId(); QString runningScriptId();
// Pre-processor functions
bool preprocessScript(const QString& input, QString& output, const Q
String& scriptDir);
bool preprocessScript(QFile &input, QString& output, const QString&
scriptDir);
//! Add all the StelModules into the script engine
void addModules();
public slots: public slots:
//! Gets a single line name of the script. //! Gets a single line name of the script.
//! @param s the file name of the script whose name is to be returne d. //! @param s the file name of the script whose name is to be returne d.
//! @return text following a comment with Name: at the start. If no //! @return text following a comment with Name: at the start. If no
//! such comment is found, the file name will be returned. If the f ile //! such comment is found, the file name will be returned. If the f ile
//! is not found or cannot be opened for some reason, an Empty strin g //! is not found or cannot be opened for some reason, an Empty strin g
//! will be returned. //! will be returned.
const QString getName(const QString& s); const QString getName(const QString& s);
//! Gets the name of the script Author //! Gets the name of the script Author
skipping to change at line 95 skipping to change at line 101
//! Gets a description of the script. //! Gets a description of the script.
//! @param s the file name of the script whose name is to be returne d. //! @param s the file name of the script whose name is to be returne d.
//! @return text following a comment with Description: at the start. //! @return text following a comment with Description: at the start.
//! The description is considered to be over when a line with no com ment //! The description is considered to be over when a line with no com ment
//! is found. If no such comment is found, QString("") is returned. //! is found. If no such comment is found, QString("") is returned.
//! If the file is not found or cannot be opened for some reason, an //! If the file is not found or cannot be opened for some reason, an
//! Empty string will be returned. //! Empty string will be returned.
const QString getDescription(const QString& s); const QString getDescription(const QString& s);
//! Run the prprocessed script
//! @param preprocessedScript the string containing the preprocessed
script.
//! @return false if the given script could not be run, true otherwi
se
bool runPreprocessedScript(const QString& preprocessedScript);
//! Run the script located at the given location //! Run the script located at the given location
//! @param fileName the location of the file containing the script. //! @param fileName the location of the file containing the script.
//! @param includePath the directory to use when searching for inclu de files //! @param includePath the directory to use when searching for inclu de files
//! in the SSC preprocessor. Usually this will be the same as the //! in the SSC preprocessor. Usually this will be the same as the
//! script file itself, but if you're running a generated script fro m //! script file itself, but if you're running a generated script fro m
//! a temp directory, but want to include a file from elsewhere, it //! a temp directory, but want to include a file from elsewhere, it
//! can be usetul to set it to something else (e.g. in ScriptConsole ). //! can be usetul to set it to something else (e.g. in ScriptConsole ).
//! @return false if the named script could not be run, true otherwi se //! @return false if the named script could not be run, true otherwi se
bool runScript(const QString& fileName, const QString& includePath=" "); bool runScript(const QString& fileName, const QString& includePath=" ");
skipping to change at line 145 skipping to change at line 156
void scriptRunning(); void scriptRunning();
//! Notification when a script has stopped running //! Notification when a script has stopped running
void scriptStopped(); void scriptStopped();
//! Notification of a script event - warnings, current execution lin e etc. //! Notification of a script event - warnings, current execution lin e etc.
void scriptDebug(const QString&); void scriptDebug(const QString&);
private: private:
// Utility functions for preprocessor // Utility functions for preprocessor
QMap<QString, QString> mappify(const QStringList& args, bool lowerKe y=false); QMap<QString, QString> mappify(const QStringList& args, bool lowerKe y=false);
bool strToBool(const QString& str); bool strToBool(const QString& str);
// Pre-processor functions
bool preprocessScript(QFile& input, QString& output, const QString&
scriptDir);
#ifdef ENABLE_STRATOSCRIPT_COMPAT #ifdef ENABLE_STRATOSCRIPT_COMPAT
bool preprocessStratoScript(QFile& input, QString& output, const QSt ring& scriptDir); bool preprocessStratoScript(QFile& input, QString& output, const QSt ring& scriptDir);
#endif #endif
//! This function is for use with getName, getAuthor and getLicense. //! This function is for use with getName, getAuthor and getLicense.
//! @param s the script id //! @param s the script id
//! @param id the command line id, e.g. "Name" //! @param id the command line id, e.g. "Name"
//! @param notFoundText the text to be returned if the key is not fo und //! @param notFoundText the text to be returned if the key is not fo und
//! @return the text following the id and : on a comment line near t he top of //! @return the text following the id and : on a comment line near t he top of
 End of changes. 3 change blocks. 
3 lines changed or deleted 15 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/