MD::ReverseSolidusHandler Struct
template <typename Trait> struct MD::ReverseSolidusHandlerHelper for process reverse solidus characters. More...
Header: | #include <md4qt/parser.h> |
CMake: | find_package(md4qt REQUIRED COMPONENTS md4qt) target_link_libraries(mytarget PRIVATE md4qt::md4qt) |
Public Functions
bool | isEscaped(const typename Trait::Char &ch, bool additionalRule = true) |
bool | isNotEscaped(const typename Trait::Char &ch, bool additionalRule = true) |
bool | isPrevReverseSolidus() const |
void | next() |
bool | process(const typename Trait::Char &ch, bool additionalRule = true) |
Detailed Description
Simplifier for algorithms that handles reverse solidus characters.
Member Function Documentation
bool ReverseSolidusHandler::isEscaped(const typename Trait::Char &ch, bool additionalRule = true)
Combination of processing of current character and checking that previous was a reverse solidus character.
Returns true if current character WAS NOT recognized as reverse solidus and previous character WAS a reverse solidus (i.e escaped and not reverse solidus), false otherwise.
ch Current character.
additionalRule Additional boolean value that should be true to recognize current character as reverse solidus.
bool ReverseSolidusHandler::isNotEscaped(const typename Trait::Char &ch, bool additionalRule = true)
Combination of processing of current character and checking that previous WAS NOT a reverse solidus character.
Returns true if current character WAS NOT recognized as reverse solidus and previous character WAS NOT a reverse solidus (i.e not escaped and not reverse solidus), false otherwise.
ch Current character.
additionalRule Additional boolean value that should be true to recognize current character as reverse solidus.
bool ReverseSolidusHandler::isPrevReverseSolidus() const
Return whether previous character was reverse solidus.
void ReverseSolidusHandler::next()
Should be invoked after processing of current character and all logic with current character.
bool ReverseSolidusHandler::process(const typename Trait::Char &ch, bool additionalRule = true)
Process current character.
Returns true if current character was recognized as reverse solidus, false otherwise.
ch Current character.
additionalRule Additional boolean value that should be true to recognize current character as reverse solidus.