3#include "memlite/binder/tbindable.inl"
9#define TEMPL template <typename T, typename TACTIC>
10#define ME tweak<T, TACTIC>
13 TEMPL ME::tweak(): SUPER(ttype<T>::get(), TACTIC::singleton) {}
15 TEMPL ME::tweak(
const type& subtype):
16 SUPER(subtype.isSub(ttype<T>::get()) ? subtype : ttype<T>::get(), TACTIC::singleton) {}
18 TEMPL ME::tweak(
const T& it): SUPER(ttype<T>::get(), TACTIC::singleton) { this->bind(it); }
20 TEMPL ME::tweak(
const T* it): SUPER(ttype<T>::get(), TACTIC::singleton) { this->bind(it); }
22 TEMPL ME::tweak(
const tmedium<T>& it): SUPER(ttype<T>::get(), TACTIC::singleton) { this->bind(it.get()); }
24 TEMPL ME::tweak(
const ME& rhs): SUPER(ttype<T>::get(), TACTIC::singleton) { this->_assign(rhs); }
26 TEMPL ME::tweak(
const binder& rhs): SUPER(ttype<T>::get(), TACTIC::singleton) { this->bind(*rhs); }
28 TEMPL T* ME::operator->() {
return this->get(); }
30 TEMPL T& ME::operator*() {
return *get(); }
32 TEMPL ME& ME::operator=(
const binder& rhs) {
33 if(
this == &rhs)
return *
this;
35 SUPER::operator=(rhs);
39 TEMPL ME& ME::operator=(
const me& rhs) {
return operator=((
const binder&) rhs); }
42 instance& got = SUPER::get() OR.ret(
nullptr);
46 TEMPL nbool ME::bind(const T& new1) {
return SUPER::bind(new1); }