tudocomp
– The TU Dortmund Compression Framework
|
Provides meta information about an Algorithm. More...
#include <Meta.hpp>
Classes | |
class | OptionBuilder |
Helper for declaring accepted options in algorithm meta information. More... | |
Public Member Functions | |
Meta (const std::string &type, const std::string &name, const std::string &doc="") | |
Constructs an algorithm meta object with the given information. More... | |
OptionBuilder | option (const std::string &name) |
Declares an accepted option for this algorithm. More... | |
const std::string & | name () const |
Returns the algorithm's name. More... | |
const std::string & | type () const |
Returns the algorithm's type. More... | |
void | input_restrictions (const io::InputRestrictions &restr) |
Places byte restrictions on the Input. More... | |
void | needs_sentinel_terminator () |
Indicates that this Algorithm requires a null terminator symbol in Input. More... | |
template<typename text_t > | |
void | uses_textds (ds::dsflags_t flags) |
Indicates that this Algorithm uses the TextDS class, and how it does. More... | |
Friends | |
void | gather_types (eval::AlgorithmTypes &target, Meta &&meta) |
Provides meta information about an Algorithm.
Any Algorithm must implement a static function meta()
that returns an instance of this class, providing meta information about it.
The information is used for the automatic instantiation methods (e.g. create_algo) and for automatically generated documentation in the driver application.
It consists of an algorithm type, the name, additional documentation, accepted environment option and allows the definition of a hierarchy of algorithms. For instance, an algorithm may accept other algorithms of a type "strategy"
as options, allowing for dynamic switching of strategies based on the application. Please refer to the tutorial documents for more information on this topic.
|
inline |
Constructs an algorithm meta object with the given information.
type | The algorithm type. This algorithm can be passed as an option to other algorithms that accept the same type. |
name | The name of the algorithm, used for the auto-generated documentation. |
doc | Further documentation text, used for the auto-generated documentation. |
|
inline |
|
inline |
|
inline |
Indicates that this Algorithm requires a null terminator symbol in Input.
All occurrences of null in the input will be escaped, and an extra null will be appended to it.
|
inline |
|
inline |
|
inline |
|
friend |