Source-highlight Library
|
Handles langdef language definition files. More...
#include <langdefmanager.h>
Public Member Functions | |
LangDefManager (HighlightRuleFactory *ruleFactory) | |
HighlightStatePtr | buildHighlightState (const std::string &path, const std::string &file) |
Builds the HighlightState corresponding to the language definition by the specified file, using the specified path. More... | |
HighlightStatePtr | getHighlightState (const std::string &path, const std::string &file) |
Gets the HighlightState corresponding to the language definition file, using the specified path. More... | |
HighlightStatePtr | getHighlightState (const std::string &file) |
Gets the HighlightState corresponding to the language definition by the specified file, using the default path for language definition files (either stored in the user home setting configuration file or the default hardcoded one). More... | |
LangElems * | getLangElems (const std::string &path, const std::string &file) |
Returns the language elements of the specified language definition file. More... | |
const HighlightRuleFactory * | getRuleFactory () const |
Private Attributes | |
HighlightRuleFactory * | ruleFactory |
the factory for creating highlight rules | |
HighlightStateCache | highlightStateCache |
store already generated HighlightState specific to a given file name | |
Handles langdef language definition files.
srchilite::LangDefManager::LangDefManager | ( | HighlightRuleFactory * | ruleFactory | ) |
ruleFactory | the factory for creating highlight rules |
HighlightStatePtr srchilite::LangDefManager::buildHighlightState | ( | const std::string & | path, |
const std::string & | file | ||
) |
Builds the HighlightState corresponding to the language definition by the specified file, using the specified path.
path | the path that is used for searching for the file and included files |
file | the name of the language definition file |
HighlightStatePtr srchilite::LangDefManager::getHighlightState | ( | const std::string & | path, |
const std::string & | file | ||
) |
Gets the HighlightState corresponding to the language definition file, using the specified path.
If the language definition file was already inspected, then it won't rebuild the HighlightState, but it will reuse the previously built one.
path | the path that is used for searching for the file and included files |
file | the name of the language definition file |
HighlightStatePtr srchilite::LangDefManager::getHighlightState | ( | const std::string & | file | ) |
Gets the HighlightState corresponding to the language definition by the specified file, using the default path for language definition files (either stored in the user home setting configuration file or the default hardcoded one).
file | the name of the language definition file |
LangElems * srchilite::LangDefManager::getLangElems | ( | const std::string & | path, |
const std::string & | file | ||
) |
Returns the language elements of the specified language definition file.
path | |
file |