blob: 9663033ae743c61b376848badb1bde7bb7544f61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
//
// shared_ptr
//
// An enhanced relative of scoped_ptr with reference counted copy semantics.
// The object pointed to is deleted when the last shared_ptr pointing to it
// is destroyed or reset.
//
//
// This is highly hacked up version of boost::shared_ptr
// We just need enough to get SWIG to "do the right thing" and
// generate "Smart Pointer" code.
//
namespace boost {
template<class T> class shared_ptr
{
public:
shared_ptr()
{
}
shared_ptr (T * p)
{
}
T * operator-> () // never throws
{
return px;
}
private:
T * px; // contained pointer
int pn;
}; // shared_ptr
};
|