Source-highlight Library
langdefmanager.h
1//
2// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3//
4// Copyright: See COPYING file that comes with this distribution
5//
6
7#ifndef LANGDEFMANAGER_H_
8#define LANGDEFMANAGER_H_
9
10#include <map>
11
12#include "highlightstate.h"
13
14namespace srchilite {
15
17typedef std::map<std::string, HighlightStatePtr> HighlightStateCache;
18
20class LangElems;
21
28
31public:
37
45 HighlightStatePtr buildHighlightState(const std::string &path,
46 const std::string &file);
47
57 HighlightStatePtr getHighlightState(const std::string &path,
58 const std::string &file);
59
68 HighlightStatePtr getHighlightState(const std::string &file);
69
76 LangElems *getLangElems(const std::string &path, const std::string &file);
77
78 const HighlightRuleFactory *getRuleFactory() const {
79 return ruleFactory;
80 }
81};
82
83}
84
85#endif /*LANGDEFMANAGER_H_*/
Abstract factory for highlighting rules.
Definition: highlightrulefactory.h:23
Handles langdef language definition files.
Definition: langdefmanager.h:25
HighlightStatePtr buildHighlightState(const std::string &path, const std::string &file)
Builds the HighlightState corresponding to the language definition by the specified file,...
Definition: langdefmanager.cpp:30
LangElems * getLangElems(const std::string &path, const std::string &file)
Returns the language elements of the specified language definition file.
Definition: langdefmanager.cpp:70
HighlightStateCache highlightStateCache
store already generated HighlightState specific to a given file name
Definition: langdefmanager.h:30
HighlightStatePtr getHighlightState(const std::string &path, const std::string &file)
Gets the HighlightState corresponding to the language definition file, using the specified path.
Definition: langdefmanager.cpp:47
HighlightRuleFactory * ruleFactory
the factory for creating highlight rules
Definition: langdefmanager.h:27
collection of LangElem objects
Definition: langelems.h:34
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
std::map< std::string, HighlightStatePtr > HighlightStateCache
store already generated HighlightState specific to a given file name
Definition: langdefmanager.h:17
boost::shared_ptr< HighlightState > HighlightStatePtr
the reference to an HighlightState
Definition: highlightstate.h:41