19 #ifndef NAF_QUERY_PARAMETER
20 #define NAF_QUERY_PARAMETER
25 #include "tools/dvalue.h"
26 #include "query/results.h"
27 #include "query/condition.h"
34 enum class ParameterType;
40 enum class NAF::Query::ParameterType
49 using Ptr = std::shared_ptr<Parameter>;
54 ParameterType get_parameter_type()
const {
return parameter_type_; }
55 std::string get_name()
const {
return name_; }
56 std::string get_error()
const {
return error_; }
57 bool get_editable()
const {
return editable_; }
65 auto& var = field_position_;
68 std::string get_related_action()
const {
return related_action_; }
69 Query::Condition<Ptr>::Ptr& get_condition()
71 auto& var = condition_;
75 void set_parameter_type(ParameterType parameter_type) { parameter_type_ = parameter_type; }
76 void set_name(std::string name) { name_ = name; }
77 void set_error(std::string error) { error_ = error; }
78 void set_editable(
bool editable) { editable_ = editable; }
80 void set_related_action(std::string related_action) { related_action_ = related_action; }
82 std::string ToString_();
83 std::string StringValue_();
87 void SetupCondition_(std::string identifier, Query::ConditionType type, Query::Condition<Ptr>::Functor functor);
90 ParameterType parameter_type_;
96 std::string related_action_;
97 Query::Condition<Ptr>::Ptr condition_;
Definition: parameter.h:47