edbee - Qt Editor Library
|
This class defines a single language grammar. More...
#include <textgrammar.h>
Public Member Functions | |
TextGrammar (const QString &name, const QString &displayName) | |
The default texgrammar constructor. More... | |
~TextGrammar () | |
The textgrammar destructor. More... | |
void | giveMainRule (TextGrammarRule *mainRule) |
Gives the main rule the grammmar. More... | |
QString | name () const |
return the name of the textgrammar More... | |
QString | displayName () const |
Returns the displayname of this grammar. More... | |
TextGrammarRule * | mainRule () const |
Returns the main grammar rule for this textgrammar. More... | |
QStringList | fileExtensions () const |
Returns all file extensions that are used by this grammar. More... | |
void | giveToRepos (const QString &name, TextGrammarRule *rule) |
This method adds the given grammar rule to the repos. More... | |
TextGrammarRule * | findFromRepos (const QString &name, TextGrammarRule *defValue=0) |
Finds the grammar rule from the respos. More... | |
void | addFileExtension (const QString &ext) |
Adds a file extension. More... | |
This class defines a single language grammar.
edbee::TextGrammar::TextGrammar | ( | const QString & | name, |
const QString & | displayName | ||
) |
The default texgrammar constructor.
name | the name of the textgrammar |
displayName | th name to display |
edbee::TextGrammar::~TextGrammar | ( | ) |
The textgrammar destructor.
void edbee::TextGrammar::addFileExtension | ( | const QString & | ext | ) |
Adds a file extension.
ext | the extension to add. |
QString edbee::TextGrammar::displayName | ( | ) | const |
Returns the displayname of this grammar.
QStringList edbee::TextGrammar::fileExtensions | ( | ) | const |
Returns all file extensions that are used by this grammar.
TextGrammarRule * edbee::TextGrammar::findFromRepos | ( | const QString & | name, |
TextGrammarRule * | defValue = 0 |
||
) |
Finds the grammar rule from the respos.
name | the name of the rule |
defValue | the grammar rule to return if not found |
void edbee::TextGrammar::giveMainRule | ( | TextGrammarRule * | mainRule | ) |
Gives the main rule the grammmar.
void edbee::TextGrammar::giveToRepos | ( | const QString & | name, |
TextGrammarRule * | rule | ||
) |
This method adds the given grammar rule to the repos.
TextGrammarRule * edbee::TextGrammar::mainRule | ( | ) | const |
Returns the main grammar rule for this textgrammar.
QString edbee::TextGrammar::name | ( | ) | const |
return the name of the textgrammar