FotoSHOCK
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
src
core
ConstPtr.hpp
1
#ifndef CONSTPTR_H
2
#define CONSTPTR_H
3
4
// TODO: doc
5
template
<
typename
T>
6
class
ConstPtr
{
7
public
:
8
explicit
ConstPtr
(T * t) : p(t)
9
{}
10
11
~
ConstPtr
() {
12
delete
p;
13
}
14
15
const
T & operator*()
const
{
16
return
*p;
17
}
18
T & operator*() {
19
return
*p;
20
}
21
22
const
T * operator->()
const
{
23
return
p;
24
}
25
T * operator->() {
26
return
p;
27
}
28
private
:
29
T* p;
30
};
31
32
#endif
Generated on Sat Jun 29 2013 14:25:17 for FotoSHOCK by
1.8.4