Source-highlight Library
Public Member Functions | Private Attributes | List of all members
srchilite::LangDefManager Class Reference

Handles langdef language definition files. More...

#include <langdefmanager.h>

Collaboration diagram for srchilite::LangDefManager:
Collaboration graph
[legend]

Public Member Functions

 
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...
 
LangElemsgetLangElems (const std::string &path, const std::string &file)
  Returns the language elements of the specified language definition file. More...
 
const HighlightRuleFactorygetRuleFactory () const
 

Private Attributes

  the factory for creating highlight rules
 
  store already generated HighlightState specific to a given file name
 

Detailed Description

Handles langdef language definition files.

Constructor & Destructor Documentation

srchilite::LangDefManager::LangDefManager ( HighlightRuleFactoryruleFactory )
Parameters
ruleFactory the factory for creating highlight rules

Member Function Documentation

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.

Parameters
path the path that is used for searching for the file and included files
file the name of the language definition file
Returns
the HighlightState built using the language definitions
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.

Parameters
path the path that is used for searching for the file and included files
file the name of the language definition file
Returns
the HighlightState built using the language definitions
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).

Parameters
file the name of the language definition file
Returns
the HighlightState built using the language definitions
LangElems * srchilite::LangDefManager::getLangElems ( const std::string &  path,
const std::string &  file 
)

Returns the language elements of the specified language definition file.

Parameters
path
file
Returns
the language elements of the specified language definition file.

The documentation for this class was generated from the following files:
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/langdefmanager.h
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/langdefmanager.cpp

AltStyle によって変換されたページ (->オリジナル) /