w11 - cpp
0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclOPtr.ipp
Go to the documentation of this file.
1
// $Id: RtclOPtr.ipp 1186 2019-07-12 17:49:59Z mueller $
2
// SPDX-License-Identifier: GPL-3.0-or-later
3
// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
5
// Revision History:
6
// Date Rev Version Comment
7
// 2011-02-20 363 1.0 Initial version
8
// ---------------------------------------------------------------------------
9
19
// all method definitions in namespace Retro
20
namespace
Retro
{
21
22
//------------------------------------------+-----------------------------------
24
25
inline
RtclOPtr::RtclOPtr
()
26
: fpObj(nullptr)
27
{}
28
29
//------------------------------------------+-----------------------------------
31
32
inline
RtclOPtr::RtclOPtr
(Tcl_Obj* pobj)
33
: fpObj(pobj)
34
{
35
if
(
fpObj
) Tcl_IncrRefCount(
fpObj
);
36
}
37
38
//------------------------------------------+-----------------------------------
40
41
inline
RtclOPtr::RtclOPtr
(
const
RtclOPtr
& rhs)
42
: fpObj(rhs.fpObj)
43
{
44
if
(
fpObj
) Tcl_IncrRefCount(
fpObj
);
45
}
46
47
//------------------------------------------+-----------------------------------
49
50
inline
RtclOPtr::~RtclOPtr
()
51
{
52
if
(
fpObj
) Tcl_DecrRefCount(
fpObj
);
53
}
54
55
//------------------------------------------+-----------------------------------
57
58
inline
RtclOPtr::operator Tcl_Obj*()
const
59
{
60
return
fpObj;
61
}
62
63
//------------------------------------------+-----------------------------------
65
66
inline
bool
RtclOPtr::operator !
()
const
67
{
68
return
fpObj
==
nullptr
;
69
}
70
71
//------------------------------------------+-----------------------------------
73
74
inline
RtclOPtr
&
RtclOPtr::operator=
(
const
RtclOPtr
& rhs)
75
{
76
if
(&rhs ==
this
)
return
*
this
;
77
return
operator=
(rhs.
fpObj
);
78
}
79
80
//------------------------------------------+-----------------------------------
82
83
inline
RtclOPtr
&
RtclOPtr::operator=
(Tcl_Obj* pobj)
84
{
85
if
(
fpObj
) Tcl_DecrRefCount(
fpObj
);
86
fpObj
= pobj;
87
if
(
fpObj
) Tcl_IncrRefCount(
fpObj
);
88
return
*
this
;
89
}
90
91
}
// end namespace Retro
Retro::RtclOPtr
Implemenation (inline) of RtclOPtr.
Definition:
RtclOPtr.hpp:23
Retro::RtclOPtr::~RtclOPtr
~RtclOPtr()
Destructor.
Definition:
RtclOPtr.ipp:50
Retro::RtclOPtr::operator!
bool operator!() const
FIXME_docs.
Definition:
RtclOPtr.ipp:66
Retro::RtclOPtr::fpObj
Tcl_Obj * fpObj
pointer to tcl object
Definition:
RtclOPtr.hpp:36
Retro::RtclOPtr::RtclOPtr
RtclOPtr()
Default constructor.
Definition:
RtclOPtr.ipp:25
Retro::RtclOPtr::operator=
RtclOPtr & operator=(const RtclOPtr &rhs)
FIXME_docs.
Definition:
RtclOPtr.ipp:74
Retro
Declaration of class ReventLoop.
Definition:
ReventLoop.cpp:47
librtcltools
RtclOPtr.ipp
Generated on Thu Feb 9 2023 12:40:57 for w11 - cpp by
1.9.6