edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::TextGrammar Class Reference

This class defines a single language grammar. More...

#include <textgrammar.h>

+ Collaboration diagram for edbee::TextGrammar:

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...
 
TextGrammarRulemainRule () 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...
 
TextGrammarRulefindFromRepos (const QString &name, TextGrammarRule *defValue=0)
 Finds the grammar rule from the respos. More...
 
void addFileExtension (const QString &ext)
 Adds a file extension. More...
 

Detailed Description

This class defines a single language grammar.

Constructor & Destructor Documentation

◆ TextGrammar()

edbee::TextGrammar::TextGrammar ( const QString &  name,
const QString &  displayName 
)

The default texgrammar constructor.

Parameters
namethe name of the textgrammar
displayNameth name to display

◆ ~TextGrammar()

edbee::TextGrammar::~TextGrammar ( )

The textgrammar destructor.

Member Function Documentation

◆ addFileExtension()

void edbee::TextGrammar::addFileExtension ( const QString &  ext)

Adds a file extension.

Parameters
extthe extension to add.

◆ displayName()

QString edbee::TextGrammar::displayName ( ) const

Returns the displayname of this grammar.

◆ fileExtensions()

QStringList edbee::TextGrammar::fileExtensions ( ) const

Returns all file extensions that are used by this grammar.

Returns
a stringlist with all extension (without the '.')

◆ findFromRepos()

TextGrammarRule * edbee::TextGrammar::findFromRepos ( const QString &  name,
TextGrammarRule defValue = 0 
)

Finds the grammar rule from the respos.

Parameters
namethe name of the rule
defValuethe grammar rule to return if not found
Returns
the found grammar rule (or the defValue if not found)

◆ giveMainRule()

void edbee::TextGrammar::giveMainRule ( TextGrammarRule mainRule)

Gives the main rule the grammmar.

◆ giveToRepos()

void edbee::TextGrammar::giveToRepos ( const QString &  name,
TextGrammarRule rule 
)

This method adds the given grammar rule to the repos.

◆ mainRule()

TextGrammarRule * edbee::TextGrammar::mainRule ( ) const

Returns the main grammar rule for this textgrammar.

◆ name()

QString edbee::TextGrammar::name ( ) const

return the name of the textgrammar


The documentation for this class was generated from the following files: