로딩중...
검색중...
일치하는것 없음
tpriorities.inl
1#pragma once
2
4
5namespace by {
6
7#define TEMPLATE template <typename T>
8#define ME tprior<T>
9
10 TEMPLATE
11 ME::tprior(const node& newElem, priorType newType, ncnt newLv): type(newType), lv(newLv) { elem.bind(newElem); }
12
13 TEMPLATE T* ME::operator->() { return get(); }
14
15 TEMPLATE T& ME::operator*() { return *get(); }
16
17 TEMPLATE T* ME::get() { return elem.get(); }
18
19 TEMPLATE nbool ME::isSamePrecedence(const ME& rhs) const { return type == rhs.type && lv == rhs.lv; }
20
21#undef ME
22#define ME tpriorities<T>
23
24 TEMPLATE
25 ME::tpriorities(): _type(priorType::NO_MATCH) {}
26
27 TEMPLATE
28 nbool ME::isMatched() const { return this->len() == 1; }
29
30 TEMPLATE
31 priorType ME::getPriorType() const { return _type; }
32
33 TEMPLATE
34 T* ME::get() {
35 WHEN(this->len() != 1) .ret(nullptr);
36
37 return this->get(0);
38 }
39
40 TEMPLATE
41 void ME::setPriorType(priorType new1) { _type = new1; }
42
43#undef ME
44#undef TEMPLATE
45} // namespace by
priorType
Definition tpriorities.hpp:10
@ NO_MATCH
Definition tpriorities.hpp:18
to Top