Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
c
d
e
f
g
i
l
m
n
u
v
Typedefs
a
c
d
e
g
i
m
n
o
p
s
u
v
Enumerations
_
e
g
h
i
p
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
x
y
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
y
Typedefs
a
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
v
Enumerations
Enumerator
a
c
d
e
f
i
n
o
r
s
t
w
x
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
y
Functions
c
d
e
g
i
l
m
o
p
r
t
Variables
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
p
s
t
u
Enumerations
a
b
c
d
e
f
g
i
p
s
t
u
Enumerator
a
b
c
d
e
f
g
i
l
m
p
r
s
t
u
y
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
CLAutoBuffer.h
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
// (c) 2008 by Basler Vision Technologies
3
// Section: Vision Components
4
// Project: GenApi
5
// Author: Fritz Dierks
6
// $Header$
7
//
8
// License: This file is published under the license of the EMVA GenICam Standard Group.
9
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10
// If for some reason you are missing this file please contact the EMVA or visit the website
11
// (http://www.genicam.org) for a full copy.
12
//
13
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23
// POSSIBILITY OF SUCH DAMAGE.
24
//-----------------------------------------------------------------------------
29
#ifndef CLPROTOCOL_CLAUTOBUFFER_H
30
#define CLPROTOCOL_CLAUTOBUFFER_H
31
32
33
namespace
CLProtocol
34
{
35
39
template
<
class
T>
40
class
CLAutoBuffer
41
{
42
public
:
43
explicit
CLAutoBuffer
(T* p = NULL)
44
:
m_p
(p)
45
{
46
}
47
CLAutoBuffer
(
CLAutoBuffer<T>
& rhs)
48
:
m_p
(rhs.
Release
())
49
{
50
}
51
~CLAutoBuffer
()
52
{
53
DeleteSafe
();
54
}
55
CLAutoBuffer<T>
&
operator=
(T* p)
56
{
57
if
(
m_p
!= p)
58
{
59
DeleteSafe
();
60
m_p
= p;
61
}
62
63
return
*
this
;
64
}
65
CLAutoBuffer<T>
&
operator=
(
CLAutoBuffer<T>
& rhs)
66
{
67
if
(
m_p
!= rhs.
m_p
)
68
{
69
DeleteSafe
();
70
m_p
= rhs.
Release
();
71
}
72
73
return
*
this
;
74
}
75
T*
operator->
()
const
76
{
77
return
m_p
;
78
}
79
T*
Get
()
const
80
{
81
return
m_p
;
82
}
83
T*
Release
()
84
{
85
T* p(
m_p
);
86
m_p
= NULL;
87
return
p;
88
}
89
private
:
90
void
DeleteSafe
()
91
{
92
if
(
m_p
!= NULL)
93
{
94
delete
[]
m_p
;
95
m_p
= NULL;
96
}
97
}
98
T*
m_p
;
// the wrapped object pointer
99
};
100
101
102
}
103
#endif // CLPROTOCOL_CLAUTOBUFFER_H
104
CLProtocol::CLAutoBuffer
Definition:
CLAutoBuffer.h:40
CLProtocol
Definition:
CLAllAdapter.h:64
CLProtocol::CLAutoBuffer::operator->
T * operator->() const
Definition:
CLAutoBuffer.h:75
CLProtocol::CLAutoBuffer::Get
T * Get() const
Definition:
CLAutoBuffer.h:79
CLProtocol::CLAutoBuffer::Release
T * Release()
Definition:
CLAutoBuffer.h:83
CLProtocol::CLAutoBuffer::m_p
T * m_p
Definition:
CLAutoBuffer.h:98
CLProtocol::CLAutoBuffer::~CLAutoBuffer
~CLAutoBuffer()
Definition:
CLAutoBuffer.h:51
CLProtocol::CLAutoBuffer::CLAutoBuffer
CLAutoBuffer(T *p=NULL)
Definition:
CLAutoBuffer.h:43
CLProtocol::CLAutoBuffer::DeleteSafe
void DeleteSafe()
Definition:
CLAutoBuffer.h:90
CLProtocol::CLAutoBuffer::operator=
CLAutoBuffer< T > & operator=(T *p)
Definition:
CLAutoBuffer.h:55
CLProtocol::CLAutoBuffer::CLAutoBuffer
CLAutoBuffer(CLAutoBuffer< T > &rhs)
Definition:
CLAutoBuffer.h:47
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11