tudocomp
– The TU Dortmund Compression Framework
tdc::Meta::OptionBuilder Class Reference

Helper for declaring accepted options in algorithm meta information. More...

#include <Meta.hpp>

Public Member Functions

 OptionBuilder (Meta &meta, const std::string &argument_name)
 Constructor. Do not use, construct via Meta::option instead. More...
 
template<class T >
void templated (const std::string &accepted_type)
 Declares that this option accepts values of the specified Algorithm type T. More...
 
template<class T , class D >
void templated (const std::string &accepted_type)
 Declares that this option accepts values of the specified Algorithm type T. More...
 
void dynamic ()
 Declares that this option accepts values of a simple type that can be parsed from a string (e.g. More...
 
void dynamic (const std::string &default_value)
 Declares that this option accepts values of a simple type that can be parsed from a string (e.g. More...
 
void dynamic (bool default_value)
 Declares that this option accepts values of a simple type that can be parsed from a string (e.g. More...
 
void dynamic (int default_value)
 Declares that this option accepts values of a simple type that can be parsed from a string (e.g. More...
 
void dynamic (float default_value)
 Declares that this option accepts values of a simple type that can be parsed from a string (e.g. More...
 
void dynamic (double default_value)
 Declares that this option accepts values of a simple type that can be parsed from a string (e.g. More...
 
void dynamic_compressor ()
 Declares that this option accepts values of a arbitrary Compressor type, dispatched at runtime. More...
 

Detailed Description

Helper for declaring accepted options in algorithm meta information.

Definition at line 79 of file Meta.hpp.

Constructor & Destructor Documentation

◆ OptionBuilder()

tdc::Meta::OptionBuilder::OptionBuilder ( Meta meta,
const std::string &  argument_name 
)
inline

Constructor. Do not use, construct via Meta::option instead.

Definition at line 85 of file Meta.hpp.

Member Function Documentation

◆ dynamic() [1/6]

void tdc::Meta::OptionBuilder::dynamic ( )
inline

Declares that this option accepts values of a simple type that can be parsed from a string (e.g.

integers).

The option will have no default value.

Definition at line 150 of file Meta.hpp.

◆ dynamic() [2/6]

void tdc::Meta::OptionBuilder::dynamic ( const std::string &  default_value)
inline

Declares that this option accepts values of a simple type that can be parsed from a string (e.g.

integers).

Parameters
default_valuethe default value for the option.

Definition at line 162 of file Meta.hpp.

◆ dynamic() [3/6]

void tdc::Meta::OptionBuilder::dynamic ( bool  default_value)
inline

Declares that this option accepts values of a simple type that can be parsed from a string (e.g.

integers).

Parameters
default_valuethe default value for the option.

Definition at line 182 of file Meta.hpp.

◆ dynamic() [4/6]

void tdc::Meta::OptionBuilder::dynamic ( int  default_value)
inline

Declares that this option accepts values of a simple type that can be parsed from a string (e.g.

integers).

Parameters
default_valuethe default value for the option.

Definition at line 189 of file Meta.hpp.

◆ dynamic() [5/6]

void tdc::Meta::OptionBuilder::dynamic ( float  default_value)
inline

Declares that this option accepts values of a simple type that can be parsed from a string (e.g.

integers).

Parameters
default_valuethe default value for the option.

Definition at line 194 of file Meta.hpp.

◆ dynamic() [6/6]

void tdc::Meta::OptionBuilder::dynamic ( double  default_value)
inline

Declares that this option accepts values of a simple type that can be parsed from a string (e.g.

integers).

Parameters
default_valuethe default value for the option.

Definition at line 199 of file Meta.hpp.

◆ dynamic_compressor()

void tdc::Meta::OptionBuilder::dynamic_compressor ( )
inline

Declares that this option accepts values of a arbitrary Compressor type, dispatched at runtime.

Definition at line 203 of file Meta.hpp.

◆ templated() [1/2]

template<class T >
void tdc::Meta::OptionBuilder::templated ( const std::string &  accepted_type)
inline

Declares that this option accepts values of the specified Algorithm type T.

Template Parameters
TThe Algorithm type.

Definition at line 93 of file Meta.hpp.

◆ templated() [2/2]

template<class T , class D >
void tdc::Meta::OptionBuilder::templated ( const std::string &  accepted_type)
inline

Declares that this option accepts values of the specified Algorithm type T.

Its meta information is gathered from type D.

Note that type D is required to implement a static function called meta() that returns a Meta object containing information about type T.

Template Parameters
TThe Algorithm type.
DThe meta information provider type. Must implement a static function Meta meta().

Definition at line 126 of file Meta.hpp.


The documentation for this class was generated from the following file: