BALL
1.4.79
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
CONCEPT
CONCEPT/predicate.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_CONCEPT_PREDICATE_H
6
#define BALL_CONCEPT_PREDICATE_H
7
8
#ifndef BALL_COMMON_GLOBAL_H
9
# include <
BALL/COMMON/global.h
>
10
#endif
11
12
#include <functional>
13
14
namespace
BALL
15
{
16
using
std::unary_function;
17
using
std::binary_function;
18
24
27
template
<
typename
T>
28
class
UnaryPredicate
29
:
public
unary_function<T, bool>
30
{
31
public
:
33
virtual
~UnaryPredicate
() {}
34
36
virtual
bool
operator()
(
const
T&
/* x */
)
const
37
;
38
};
39
42
template
<
typename
T1,
typename
T2>
43
class
BinaryPredicate
44
:
public
binary_function<T1, T2, bool>
45
{
46
public
:
47
49
virtual
bool
operator()
(
const
T1& x,
const
T2& y)
const
50
;
51
53
virtual
~BinaryPredicate
() {}
54
};
55
56
template
<
typename
T>
57
bool
UnaryPredicate<T>::operator()
(
const
T&
/* x */
)
const
58
59
{
60
return
true
;
61
}
62
63
template
<
typename
T1,
typename
T2>
64
bool
BinaryPredicate<T1, T2>::operator()
(
const
T1&,
const
T2&)
const
65
66
{
67
return
true
;
68
}
70
}
// namespace BALL
71
72
73
#endif // BALL_CONCEPT_PREDICATE_H
BALL::BinaryPredicate
Definition:
CONCEPT/predicate.h:43
BALL::BinaryPredicate::operator()
virtual bool operator()(const T1 &x, const T2 &y) const
Definition:
CONCEPT/predicate.h:64
BALL::UnaryPredicate::~UnaryPredicate
virtual ~UnaryPredicate()
Definition:
CONCEPT/predicate.h:33
BALL::BinaryPredicate::~BinaryPredicate
virtual ~BinaryPredicate()
Definition:
CONCEPT/predicate.h:53
BALL::UnaryPredicate
Definition:
CONCEPT/predicate.h:28
BALL::UnaryPredicate::operator()
virtual bool operator()(const T &) const
Definition:
CONCEPT/predicate.h:57
global.h
Generated by
1.8.7