Smart Pointers

Pyste for now has manual support for smart pointers. Suppose:

    struct C
    {
        int value;
    };

    boost::shared_ptr<C> newC(int value)
    {
        boost::shared_ptr<C> c( new C() );
        c->value = value;
        return c;
    }

    void printC(boost::shared_ptr<C> c)
    {
        std::cout << c->value << std::endl;
    }

To make newC and printC work correctly, you have to tell Pyste that a conversor for boost::shared_ptr<C> is needed.

    C = Class('C', 'C.h')
    use_shared_ptr(C)
    Function('newC', 'C.h')
    Function('printC', 'C.h')

For std::auto_ptr's, use the function use_auto_ptr.

This system is temporary, and in the future the conversors will automatically be exported if needed, without the need to tell Pyste about them explicitly.