-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseExpression.cpp
More file actions
56 lines (42 loc) · 1.05 KB
/
BaseExpression.cpp
File metadata and controls
56 lines (42 loc) · 1.05 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "stdafx.h"
#include "BaseExpression.h"
#include "ISqlPredicateBuilder.h"
#include "MappingRegistry.h"
#include "SqlPredicate.h"
void swap(BaseExpression &left, BaseExpression &right)
{
using std::swap;
swap(left._predicateBuilder, right._predicateBuilder);
}
BaseExpression::BaseExpression()
{
}
BaseExpression::BaseExpression(const std::shared_ptr<ISqlPredicateBuilder> &predicateBuilder) :
_predicateBuilder(predicateBuilder)
{
}
BaseExpression::BaseExpression(const BaseExpression &other) :
_predicateBuilder(other._predicateBuilder)
{
}
BaseExpression::BaseExpression(BaseExpression &&other)
{
swap(*this, other);
}
BaseExpression::~BaseExpression()
{
}
BaseExpression &BaseExpression::operator =(BaseExpression other)
{
swap(*this, other);
return *this;
}
SqlPredicate BaseExpression::GetSqlPredicate(const MappingRegistry ®istry) const
{
SqlPredicate result = _predicateBuilder->Build(registry);
return result;
}
std::shared_ptr<ISqlPredicateBuilder> BaseExpression::GetSqlPredicateBuilder() const
{
return _predicateBuilder;
}