aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/ptr.pxd
blob: 16e8d191443185118ee568da1c1883fa317e6d98 (plain) (blame)
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
cdef extern from "<util/generic/ptr.h>" nogil:
    cdef cppclass THolder[T]:
        THolder(...)
        T* Get()
        void Destroy()
        T* Release()
        void Reset()
        void Reset(T*)
        void Swap(THolder[T])


    cdef THolder[T] MakeHolder[T](...)


    cdef cppclass TIntrusivePtr[T]:
        TIntrusivePtr()
        TIntrusivePtr(T*)
        TIntrusivePtr& operator=(...)
        void Reset(T*)
        T* Get()
        T* Release()
        void Drop()


    cdef cppclass TIntrusiveConstPtr[T]:
        TIntrusiveConstPtr()
        TIntrusiveConstPtr(T*)
        TIntrusiveConstPtr& operator=(...)
        void Reset(T*)
        const T* Get()
        void Drop()


    cdef cppclass TAtomicSharedPtr[T]:
        TAtomicSharedPtr()
        TAtomicSharedPtr(T*)
        T& operator*()
        T* Get()
        void Reset(T*)


    cdef TAtomicSharedPtr[T] MakeAtomicShared[T](...)