Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
e8185fae
Commit
e8185fae
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
Add wrapper for Wccl::Operator
parent
0c536115
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swig/libccloperator.i
+71
-0
71 additions, 0 deletions
swig/libccloperator.i
with
71 additions
and
0 deletions
swig/libccloperator.i
0 → 100644
+
71
−
0
View file @
e8185fae
#
ifndef
SWIG_LIBWCCL_OPERATOR_I
#
define
SWIG_LIBWCCL_OPERATOR_I
%
module
libccloperator
%
{
#include <libwccl/ops/operator.h>
%}
%
include
"
libcclvalue.i
"
%
include
"
libcclsentencecontext.i
"
%
include
"
libcclfunctionaloperator.i
"
/*
%include "libcclvariables.i"
%include "libcclparsedexpression.i"
*/
%
include
"
std_string.i
"
%
include
"
boost_shared_ptr.i
"
%
feature
(
"
notabstract
"
)
Wccl
::
Operator
;
%
rename
(
__op_cop__
)
Wccl
::
Operator
::
operator
=
(
const
Operator&
other
)
;
%
rename
(
__op_fun__
)
Wccl
::
Operator
::
operator
()(
const
SentenceContext&
sentence_context
)
;
namespace
Wccl
{
template <class T> class Operator : public FunctionalOperator {
public:
Operator();
Operator& operator=(const Operator& other);
/*
Operator(const boost::shared_ptr<const Function<T> >& body, const Variables& variables);
*/
Operator(const Operator& other, bool clean = false);
boost::shared_ptr<const T> operator()(const SentenceContext& sentence_context);
boost::shared_ptr<const T> apply(const SentenceContext& sentence_context);
boost::shared_ptr<T> copy_apply(const SentenceContext& sentence_context);
boost::shared_ptr<const Value> base_apply(const SentenceContext& sc);
Operator clone() const;
Operator clone_clean() const;
boost::shared_ptr<Operator<T> > clone_ptr() const;
boost::shared_ptr<Operator<T> > clone_clean_ptr() const;
std::string to_string(const Corpus2::Tagset& tagset) const;
protected:
Operator* clone_internal() const;
std::ostream& write_to(std::ostream& ostream) const;
};
%template (BoolOperator) Operator<Bool>;
%template (TSetOperator) Operator<TSet>;
%template (StrSetOperator) Operator<StrSet>;
%template (PositionOperator) Operator<Position>;
%template (SharedPtrBoolOperator) boost::shared_ptr<Operator<Bool> >;
%template (SharedPtrTSetOperator) boost::shared_ptr<Operator<TSet> >;
%template (SharedPtrStrSetOperator) boost::shared_ptr<Operator<StrSet> >;
%template (SharedPtrPositionOperator) boost::shared_ptr<Operator<Position> >;
}
using
namespace
boost
;
using
namespace
std
;
using
namespace
Wccl
;
#
endif
/* SWIG_LIBWCCL_OPERATOR_I */
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment