BALL
1.4.2
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
KERNEL
KERNEL/predicate.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
// $Id: predicate.h,v 1.24 2005/10/23 12:02:19 oliver Exp $
5
//
6
7
#ifndef BALL_KERNEL_PREDICATE_H
8
#define BALL_KERNEL_PREDICATE_H
9
10
#ifndef BALL_COMMON_RTTI_H
11
# include <
BALL/COMMON/rtti.h
>
12
#endif
13
14
#ifndef BALL_CONCEPT_PREDICATE_H
15
# include <
BALL/CONCEPT/predicate.h
>
16
#endif
17
18
#ifndef BALL_CONCEPT_COMPOSITE_H
19
# include <
BALL/CONCEPT/composite.h
>
20
#endif
21
22
namespace
BALL
23
{
48
49
50
#ifndef BALL_KERNEL_PREDICATE_TYPE
51
#define BALL_KERNEL_PREDICATE_TYPE
52
typedef
UnaryPredicate<Composite>
KernelPredicateType
;
53
#endif
54
56
template
<
class
T>
57
class
KernelPredicate
58
:
public
UnaryPredicate
<Composite>
59
{
60
public
:
61
63
virtual
bool
operator ()
(
const
Composite
& composite)
const
;
64
virtual
~KernelPredicate
() {}
65
};
66
67
template
<
class
T>
68
bool
KernelPredicate<T>::operator ()
(
const
Composite
& composite)
const
69
{
70
return
RTTI::isKindOf<T>(composite);
71
}
72
74
75
}
// namespace BALL
76
77
78
#endif // BALL_KERNEL_PREDICATE_H
Generated by
1.8.3.1