shared_ptr.i

来自「这是用python语言写的一个数字广播的信号处理工具包。利用它」· I 代码 · 共 43 行

I
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};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?