3
MediaTomb - http://www.mediatomb.cc/
5
ref.h - this file is part of MediaTomb.
7
Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
10
Copyright (C) 2006-2007 Gena Batyan <bgeradz@mediatomb.cc>,
11
Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
Leonhard Wimmer <leo@mediatomb.cc>
14
MediaTomb is free software; you can redistribute it and/or modify
15
it under the terms of the GNU General Public License version 2
16
as published by the Free Software Foundation.
18
MediaTomb is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
GNU General Public License for more details.
23
You should have received a copy of the GNU General Public License
24
version 2 along with MediaTomb; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
27
$Id: ref.h 1294 2007-05-13 16:28:24Z lww $
50
explicit Ref(T* ptr = NULL) : _ptr(ptr)
65
Ref& operator=(const Ref& other)
74
inline Ref& operator=(NIL_VAR)
82
inline T& operator*() const
86
inline T* operator->() const
94
inline int operator==(NIL_VAR)
96
return (_ptr == NULL);
98
inline int operator!=(NIL_VAR)
100
return (_ptr != NULL);
102
inline int operator==(const Ref& other)
104
return (_ptr == other._ptr);
106
inline int operator!=(const Ref& other)
108
return (_ptr != other._ptr);
116
#define RefCast(ref, klass) zmm::Ref<klass>((klass *)ref.getPtr())
118
#endif // __ZMM_REF_H__