10 #ifndef _STRUS_FUNCTION_DESCRIPTION_HPP_INCLUDED
11 #define _STRUS_FUNCTION_DESCRIPTION_HPP_INCLUDED
12 #include "strus/numericVariant.hpp"
36 static const char* ar[] = {
"Feature",
"Attribute",
"Metadata",
"Numeric",
"String",0};
41 Parameter(
const Type& type_,
const std::string& name_,
const std::string& text_,
const std::string& domain_)
42 :m_type(type_),m_name(name_),m_text(text_),m_domain(domain_){}
45 :m_type(o.m_type),m_name(o.m_name),m_text(o.m_text),m_domain(o.m_domain){}
53 const std::string&
name()
const {
return m_name;}
56 const std::string&
text()
const {
return m_text;}
70 const std::string&
domain()
const {
return m_domain;}
83 m_param.push_back(
Parameter( type_, name_, text_, domain_));
96 :m_text(o.m_text),m_param(o.m_param){}
100 :m_text(text_ +
": " + o.m_text),m_param(o.m_param){}
103 const std::string&
text()
const {
return m_text;}
106 const std::vector<Parameter>&
parameter()
const {
return m_param;}
110 std::vector<Parameter> m_param;
parameter specifies a document attribute identifier
Definition: functionDescription.hpp:29
Parameter(const Type &type_, const std::string &name_, const std::string &text_, const std::string &domain_)
Constructor.
Definition: functionDescription.hpp:41
parameter specifies a document metadata identifier
Definition: functionDescription.hpp:30
const std::vector< Parameter > & parameter() const
Get the description parameter list.
Definition: functionDescription.hpp:106
const std::string & text() const
Get the description text.
Definition: functionDescription.hpp:103
FunctionDescription(const std::string &text_)
Constructor.
Definition: functionDescription.hpp:91
FunctionDescription(const FunctionDescription &o)
Copy constructor.
Definition: functionDescription.hpp:95
const std::string & domain() const
Get the description of the parameter domain.
Definition: functionDescription.hpp:70
FunctionDescription()
Default constructor.
Definition: functionDescription.hpp:88
parameter specifies a string constant or enumeration item as string
Definition: functionDescription.hpp:32
const char * typeName() const
Get the type of the parameter as string.
Definition: functionDescription.hpp:50
const std::string & text() const
Get the description text of the parameter.
Definition: functionDescription.hpp:56
FunctionDescription & operator()(Parameter::Type type_, const std::string &name_, const std::string &text_, const std::string &domain_=std::string())
Add a parameter description.
Definition: functionDescription.hpp:81
parameter specifies a numeric constant (NumericVariant type)
Definition: functionDescription.hpp:31
Type
Definition: functionDescription.hpp:26
FunctionDescription(const FunctionDescription &o, const std::string &text_)
Derived constructor.
Definition: functionDescription.hpp:99
Parameter(const Parameter &o)
Copy constructor.
Definition: functionDescription.hpp:44
Structure that describes a parameter.
Definition: functionDescription.hpp:24
static const char * typeName(Type i)
Definition: functionDescription.hpp:34
const std::string & name() const
Get the name of the parameter.
Definition: functionDescription.hpp:53
Structure that describes a function (weighting or summarizer function) for introspection.
Definition: functionDescription.hpp:20
parameter specifies a feature value passed as posting iterator to the function context ...
Definition: functionDescription.hpp:28
Type type() const
Get the type of the parameter.
Definition: functionDescription.hpp:48