edbee - Qt Editor Library
|
This class is used to manage all 'grammers' used by the lexers. More...
#include <textgrammar.h>
Public Member Functions | |
TextGrammar * | readGrammarFile (const QString &file) |
This method reads the given grammar file and adds it to the grammar manager. The grammar manager stays the owner of the grammar file. More... | |
void | readAllGrammarFilesInPath (const QString &path) |
reads all grammar files in the given path More... | |
TextGrammar * | get (const QString &name) |
This method returns the given language grammar. More... | |
void | giveGrammar (TextGrammar *grammar) |
This method gives a language grammar to the document. More... | |
QList< QString > | grammarNames () |
This method returns all grammar names. More... | |
QList< TextGrammar * > | grammars () |
This method returns the values. More... | |
QList< TextGrammar * > | grammarsSortedByDisplayName () |
This utility function returns all grammars sorted on displayname Warning, this method sorts the grammars so calling this method multiple times is not what you want to do. More... | |
TextGrammar * | defaultGrammar () |
TextGrammar * | detectGrammarWithFilename (const QString &fileName) |
this method detects the grammar with a given filename More... | |
QString | lastErrorMessage () const |
returns the grammar manager More... | |
Protected Member Functions | |
TextGrammarManager () | |
The text grammar manager constructor. More... | |
virtual | ~TextGrammarManager () |
The detstructor (deletes all grammars) More... | |
Friends | |
class | Edbee |
This class is used to manage all 'grammers' used by the lexers.
|
protected |
The text grammar manager constructor.
|
protectedvirtual |
The detstructor (deletes all grammars)
|
inline |
TextGrammar * edbee::TextGrammarManager::detectGrammarWithFilename | ( | const QString & | fileName | ) |
this method detects the grammar with a given filename
fileName | the filename to detect the grammar |
TextGrammar * edbee::TextGrammarManager::get | ( | const QString & | name | ) |
This method returns the given language grammar.
void edbee::TextGrammarManager::giveGrammar | ( | TextGrammar * | grammar | ) |
This method gives a language grammar to the document.
grammar | the grammar to give |
QList< QString > edbee::TextGrammarManager::grammarNames | ( | ) |
This method returns all grammar names.
QList< TextGrammar * > edbee::TextGrammarManager::grammars | ( | ) |
This method returns the values.
QList< TextGrammar * > edbee::TextGrammarManager::grammarsSortedByDisplayName | ( | ) |
This utility function returns all grammars sorted on displayname Warning, this method sorts the grammars so calling this method multiple times is not what you want to do.
QString edbee::TextGrammarManager::lastErrorMessage | ( | ) | const |
returns the grammar manager
void edbee::TextGrammarManager::readAllGrammarFilesInPath | ( | const QString & | path | ) |
reads all grammar files in the given path
path | the path to read all grammar files from |
TextGrammar * edbee::TextGrammarManager::readGrammarFile | ( | const QString & | file | ) |
This method reads the given grammar file and adds it to the grammar manager. The grammar manager stays the owner of the grammar file.
filename | the direct filename to read |
|
friend |