mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
Core: Improving Ref
git-svn-id: svn://ultimatepp.org/upp/trunk@4665 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3415d44f3c
commit
dd3a28d1dd
3 changed files with 124 additions and 19 deletions
|
|
@ -87,7 +87,6 @@ struct RefManager {
|
|||
virtual bool IsNull(const void *) { return false; }
|
||||
virtual void SetValue(void *, const Value& v) { NEVER(); }
|
||||
virtual void SetNull(void *) { NEVER(); }
|
||||
virtual void Assign(void *t, const void *s) { NEVER(); }
|
||||
virtual ~RefManager() {}
|
||||
};
|
||||
|
||||
|
|
@ -98,7 +97,6 @@ struct StdRef : public RefManager {
|
|||
virtual int GetType() { return GetValueTypeNo<T>(); }
|
||||
virtual bool IsNull(const void *p) { return UPP::IsNull(*(T *) p); }
|
||||
virtual void SetNull(void *p) { UPP::SetNull(*(T *)p); }
|
||||
void Assign(void *t, const void *s) { *(T*)t = *(T*)s; }
|
||||
virtual ~StdRef() {}
|
||||
};
|
||||
|
||||
|
|
@ -126,8 +124,6 @@ public:
|
|||
operator Value() const { return GetValue(); }
|
||||
Value operator~() const { return GetValue(); }
|
||||
Ref& operator=(const Value& v) { SetValue(v); return *this; }
|
||||
// Ref& operator=(const Ref& r);
|
||||
// Ref& operator=(ValueTypeRef& r);
|
||||
|
||||
Ref(String& s);
|
||||
Ref(WString& s);
|
||||
|
|
@ -176,21 +172,6 @@ Ref::Ref(const ValueTypeRef& r)
|
|||
ptr = r.ptr;
|
||||
m = r.m;
|
||||
}
|
||||
/*
|
||||
Ref& Ref::operator=(ValueTypeRef& r)
|
||||
{
|
||||
ASSERT(r.m->GetType() == GetType());
|
||||
m->Assign(ptr, r.ptr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Ref& Ref::operator=(const Ref& r)
|
||||
{
|
||||
ASSERT(r.m->GetType() == GetType());
|
||||
m->Assign(ptr, r.ptr);
|
||||
return *this;
|
||||
}
|
||||
*/
|
||||
|
||||
template <class T, dword type, class B>
|
||||
ValueType<T, type, B>::operator ValueTypeRef()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue