lib
Kross::Api::InterpreterInfo Class Reference
#include <interpreter.h>
Detailed Description
While the Interpreter is the implemented interpreter this class is used to provide some abstract informations about each interpreter we are able to use within the Manager singelton.
Definition at line 41 of file interpreter.h.
Public Member Functions | |
InterpreterInfo (const QString &interpretername, const QString &library, const QString &wildcard, QStringList mimetypes, Option::Map options) | |
~InterpreterInfo () | |
const QString | getInterpretername () |
const QString | getWildcard () |
const QStringList | getMimeTypes () |
bool | hasOption (const QString &key) |
Option * | getOption (const QString name) |
const QVariant | getOptionValue (const QString name, QVariant defaultvalue=QVariant()) |
Option::Map | getOptions () |
Interpreter * | getInterpreter () |
Classes | |
class | Option |
Each interpreter is able to define options we could use to manipulate the interpreter behaviour. More... |
Constructor & Destructor Documentation
Kross::Api::InterpreterInfo::InterpreterInfo | ( | const QString & | interpretername, | |
const QString & | library, | |||
const QString & | wildcard, | |||
QStringList | mimetypes, | |||
Option::Map | options | |||
) |
Constructor.
InterpreterInfo::~InterpreterInfo | ( | ) |
Member Function Documentation
const QString InterpreterInfo::getInterpretername | ( | ) |
- Returns:
- the name of the interpreter.
For example "python" or "kjs".
Definition at line 57 of file interpreter.cpp.
const QString InterpreterInfo::getWildcard | ( | ) |
- Returns:
- the file-wildcard used to determinate by this interpreter used scriptingfiles.
Those filter will be used e.g. with KGlobal::dirs()->findAllResources() as filtermask. For example python just defines it as "*py".
Definition at line 62 of file interpreter.cpp.
const QStringList InterpreterInfo::getMimeTypes | ( | ) |
List of mimetypes this interpreter supports.
- Returns:
- QStringList with mimetypes like "application/x-javascript".
Definition at line 67 of file interpreter.cpp.
bool InterpreterInfo::hasOption | ( | const QString & | key | ) |
- Returns:
- true if an Option with that
key
exists else false.
Definition at line 72 of file interpreter.cpp.
InterpreterInfo::Option * InterpreterInfo::getOption | ( | const QString | name | ) |
const QVariant InterpreterInfo::getOptionValue | ( | const QString | name, | |
QVariant | defaultvalue = QVariant() | |||
) |
- Returns:
- the value of the option defined with
name
.
If there doesn't exists an option with such a name, the defaultvalue
is returned.
Definition at line 82 of file interpreter.cpp.
InterpreterInfo::Option::Map InterpreterInfo::getOptions | ( | ) |
Interpreter * InterpreterInfo::getInterpreter | ( | ) |
- Returns:
- the Interpreter instance this InterpreterInfo is the describer for.
Definition at line 93 of file interpreter.cpp.
The documentation for this class was generated from the following files: