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
5398cbea
Commit
5398cbea
authored
14 years ago
by
Adam Wardyński
Browse files
Options
Downloads
Patches
Plain Diff
Base class for predicates that operate on two sets
parent
fa524598
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/ops/setpredicate.h
+46
-0
46 additions, 0 deletions
libwccl/ops/setpredicate.h
with
46 additions
and
0 deletions
libwccl/ops/setpredicate.h
0 → 100644
+
46
−
0
View file @
5398cbea
#ifndef SETPREDICATE_H
#define SETPREDICATE_H
#include
<boost/shared_ptr.hpp>
#include
<boost/mpl/list.hpp>
#include
<boost/mpl/assert.hpp>
#include
<boost/mpl/count.hpp>
#include
<libwccl/ops/predicate.h>
#include
<libwccl/ops/formatters.h>
namespace
Wccl
{
/**
* Abstract base class for predicates which operate on two sets
*/
template
<
class
T
>
class
SetPredicate
:
public
Predicate
{
BOOST_MPL_ASSERT
((
boost
::
mpl
::
count
<
boost
::
mpl
::
list
<
StrSet
,
TSet
>
,
T
>
));
public:
typedef
boost
::
shared_ptr
<
Function
<
T
>
>
SetFunctionPtr
;
SetPredicate
(
const
SetFunctionPtr
&
set1_expr
,
const
SetFunctionPtr
&
set2_expr
)
:
set1_expr_
(
set1_expr
),
set2_expr_
(
set2_expr
)
{
BOOST_ASSERT
(
set1_expr_
);
BOOST_ASSERT
(
set2_expr_
);
}
virtual
std
::
string
to_string
(
const
Corpus2
::
Tagset
&
tagset
)
const
{
return
BinaryFunctionFormatter
::
to_string
(
tagset
,
*
this
,
*
set1_expr_
,
*
set2_expr_
);
}
virtual
std
::
string
to_raw_string
()
const
{
return
BinaryFunctionFormatter
::
to_raw_string
(
*
this
,
*
set1_expr_
,
*
set2_expr_
);
}
protected
:
const
SetFunctionPtr
set1_expr_
;
const
SetFunctionPtr
set2_expr_
;
typedef
FunctionBase
::
BaseRetValPtr
BaseRetValPtr
;
};
}
/* end ns Wccl */
#endif // SETPREDICATE_H
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