blob: c457091576db10e0218f6e18e4e3aa7c9fc57164 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright Joakim Karlsson & Kim Gräsman 2010-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef IGLOO_NONEOPERATOR_H
#define IGLOO_NONEOPERATOR_H
namespace snowhouse {
struct NoneOperator : public CollectionOperator
{
template <typename ConstraintListType, typename ActualType>
void Evaluate(ConstraintListType& list, ResultStack& result, OperatorStack& operators, const ActualType& actual)
{
unsigned int passed_elements = CollectionConstraintEvaluator<ConstraintListType, ActualType>::Evaluate(*this, list, result, operators, actual);
result.push(passed_elements == 0);
}
};
template<>
struct Stringizer<NoneOperator>
{
static std::string ToString(const NoneOperator&)
{
return "none";
}
};
}
#endif
|