Loading...
Searching...
No Matches
tbindable.inl
1
#pragma once
2
3
#include "
memlite/binder/tbindable.hpp
"
4
5
namespace
by {
6
7
#define TEMPL template <typename T>
8
#define ME tbindable<T>
9
10
TEMPL ME::operator nbool()
const
{
return
isBind(); }
11
12
TEMPL nbool ME::canBind(
const
T& it)
const
{
return
canBind(it.getType()); }
13
14
TEMPL
15
nbool ME::bind(
const
T& it) {
16
// type checking before binding only is required to bind class.
17
// derived classes from this doesn't need it. because its type is specified.
18
// prevent wrong type providing by compiler.
19
return
canBind(it);
20
}
21
22
TEMPL
23
nbool ME::bind(
const
T* it) {
24
if
(!it) {
25
rel();
26
return
false
;
27
}
28
29
return
bind(*it);
30
}
31
32
#undef ME
33
#undef TEMPL
34
}
tbindable.hpp