srchilite::FormatterManager Class Reference
Associates to an element name the corresponding formatter.
More...
#include <formattermanager.h>
Collaboration diagram for srchilite::FormatterManager:
Public Member Functions
Returns the formatter for the specific element (this function always returns a valid pointer, since if no formatter is found for the specified element, it will return the default formatter)
More...
Returns the formatter for the specific element or an empty pointer if there's no such formatter.
More...
Associates the formatter to the element name (possible previous associated formatter is discarded).
More...
Resets this formatter manager: it removes all the current associations.
Private Attributes
the map associating to each element name a formatter
the default formatter, i.e., the one that is used when there's no formatter associated to an element name
Detailed Description
Associates to an element name the corresponding formatter.
This class uses shared pointers for formatters
Constructor & Destructor Documentation
srchilite::FormatterManager::FormatterManager
(
FormatterPtr
_defaultFormatter )
- Parameters
-
_defaultFormatter the default formatter, i.e., the one that is used when there's no formatter associated to an element name
Member Function Documentation
void srchilite::FormatterManager::addFormatter
(
const std::string &
elem,
)
Associates the formatter to the element name (possible previous associated formatter is discarded).
- Parameters
-
elem
formatter
FormatterPtr srchilite::FormatterManager::getFormatter
(
const std::string &
elem )
const
Returns the formatter for the specific element (this function always returns a valid pointer, since if no formatter is found for the specified element, it will return the default formatter)
- Parameters
-
elem
- Returns
- the formatter for the specific element
const
FormatterMap& srchilite::FormatterManager::getFormatterMap
(
)
const
inline
- Returns
- the formatter map of this formatter manager
FormatterPtr srchilite::FormatterManager::hasFormatter
(
const std::string &
elem )
const
Returns the formatter for the specific element or an empty pointer if there's no such formatter.
- Parameters
-
elem
- Returns
- the formatter for the specific element or an empty pointer
The documentation for this class was generated from the following files:
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/formattermanager.h
- /home/bettini/work/source-highlight/src-highlite/lib/srchilite/formattermanager.cpp