It appears that I forgot comments in constructors.

2009/9/5 Ismail Pazarbasi <pazarb...@gmail.com>:
[snip]
class MyAdapter
{
 typedef osg::ref_ptr<osg::PAT> osg_pat_type;
 osg_pat_type m_sppat;
public:
 // here is missing part

 // you will use this constructor to pass a osg::ref_ptr<osg::PAT>
 explicit MyAdapter(osg_pat_type pat) : m_sppat(pat) { }
 // you will use this constructor to pass a raw PAT*
 explicit MyAdapter(PAT* pat) : m_sppat(pat) { }
 // default constructor will create a new one.
 // you may alternatively set default value of pat to NULL in above
 // constructor and instantiate the object when pat is NULL.
 MyAdapter() : m_sppat(new osg::PAT) { }
 osg::PAT* release() { m_sppat.release(); }
 osg::ref_ptr<osg::PAT> GetPAT() /*const*/ { return m_sppat; }
 // if you want conversions, provide conversion operators...
 operator PAT*() { return m_sppat.get(); }
};
[snip]
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to