CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
src
include
base
obj_handle.cc.h
Go to the documentation of this file.
1
// -*- C++ -*-
14
#ifndef __cxz_obj_handle_cc_h__
15
#define __cxz_obj_handle_cc_h__
16
17
#include "
obj_handle.h
"
18
19
namespace
CNORXZ
20
{
21
22
template
<
typename
T>
23
ObjHandle<T>::ObjHandle
() {}
24
25
template
<
typename
T>
26
ObjHandle<T>::ObjHandle
(
Uptr<T>
&& a) : mC(std::
forward
<
Uptr
<
T
>>(a)) {}
27
28
template
<
typename
T>
29
ObjHandle<T>::ObjHandle
(
const
ObjHandle
& a) : mC(a.mC->copy()) {}
30
31
template
<
typename
T>
32
ObjHandle<T>::ObjHandle
(
ObjHandle
&& a) : mC(a.mC) {}
33
34
template
<
typename
T>
35
ObjHandle<T>
&
ObjHandle<T>::operator=
(
const
ObjHandle
& a)
36
{
37
mC = std::make_unique<T>(*a.
mC
);
38
return
*
this
;
39
}
40
41
template
<
typename
T>
42
ObjHandle<T>
&
ObjHandle<T>::operator=
(
ObjHandle
&& a)
43
{
44
mC = a.
mC
;
45
return
*
this
;
46
}
47
48
template
<
typename
T>
49
T
&
ObjHandle<T>::operator*
()
50
{
51
return
*mC;
52
}
53
54
template
<
typename
T>
55
T
*
ObjHandle<T>::operator->
()
56
{
57
return
&*mC;
58
}
59
60
template
<
typename
T>
61
const
T
&
ObjHandle<T>::operator*
()
const
62
{
63
return
*mC;
64
}
65
66
template
<
typename
T>
67
const
T
*
ObjHandle<T>::operator->
()
const
68
{
69
return
&*mC;
70
}
71
72
}
73
74
#endif
CNORXZ::ObjHandle
Definition
obj_handle.h:35
CNORXZ::ObjHandle::operator->
T * operator->()
Definition
obj_handle.cc.h:55
CNORXZ::ObjHandle::operator=
ObjHandle & operator=(const ObjHandle &a)
Definition
obj_handle.cc.h:35
CNORXZ::ObjHandle::ObjHandle
ObjHandle()
Definition
obj_handle.cc.h:23
CNORXZ::ObjHandle::mC
Uptr< T > mC
Definition
obj_handle.h:37
CNORXZ::ObjHandle::operator*
T & operator*()
Definition
obj_handle.cc.h:49
CNORXZ
Definition
aindex.cc.h:18
CNORXZ::Uptr
std::unique_ptr< T > Uptr
Definition
types.h:54
CNORXZ::rangeCast
Sptr< Range > rangeCast(const RangePtr r)
Definition
range_base.cc.h:53
obj_handle.h
ObjHandle template declaration.
Generated by
1.10.0