Skip to content
Snippets Groups Projects
Commit 6ab15e8f authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Added wrapper for Wccl::ParsedExpression

parent 031e2cb5
Branches
No related merge requests found
......@@ -6,33 +6,47 @@
#include <libwccl/ops/parsedexpression.h>
%}
%include "libcclvalue.i"
%include "libcclmatch.i"
%include "libcclbool.i"
%include "libccltset.i"
%include "libcclstrset.i"
%include "libcclposition.i"
%include "libcclexpression.i"
%include "std_string.i"
%include "boost_shared_ptr.i"
%rename(__op_get__) Wccl::ParsedExpression::operator[](const std::string& var_name) const;
namespace Wccl {
class ParsedExpression : public Expression {
public:
// TODO
// const Value& operator[](const std::string& var_name) const;
const Value& operator[](const std::string& var_name) const;
// template<class T>
// const T& get(const std::string& var_name) const;
template<class T> T& get(const std::string& var_name);
%template(get_bool) get<Bool>;
%template(get_tset) get<TSet>;
%template(get_strset) get<StrSet>;
%template(get_position) get<Position>;
%template(get_match) get<Match>;
// template<class T>
// T& get(const std::string& var_name)
// template<class T>
// void set(const std::string& var_name, const T& value);
template<class T> void set(const std::string& var_name, const T& value);
%template(set_bool) set<Bool>;
%template(set_tset) set<TSet>;
%template(set_strset) set<StrSet>;
%template(set_position) set<Position>;
%template(set_match) set<Match>;
void clean();
// boost::shared_ptr<ParsedExpression> clone_ptr() const;
// boost::shared_ptr<ParsedExpression> clone_clean_ptr() const;
boost::shared_ptr<ParsedExpression> clone_ptr() const;
boost::shared_ptr<ParsedExpression> clone_clean_ptr() const;
std::string variables_string(const Corpus2::Tagset& tagset) const;
// std::ostream& dump_variables(std::ostream& ostream, const Corpus2::Tagset& tagset) const;
std::ostream& dump_variables(std::ostream& ostream, const Corpus2::Tagset& tagset) const;
protected:
// explicit ParsedExpression(const Variables& variables);
// boost::shared_ptr<Variables> variables_;
explicit ParsedExpression(const Variables& variables);
virtual ParsedExpression* clone_internal() const = 0;
};
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment