📄 ogresharedptrwrapper.h
字号:
#ifndef PYOGRE_SHAREDPTRWRAPPER_H_INCLUDED
# define PYOGRE_SHAREDPTRWRAPPER_H_INCLUDED
# include <OgreSharedPtr.h>
namespace boost { namespace python {
// Used by boost::python to extract the pointed type
template <class T>
struct pointee< Ogre::SharedPtr<T> >
{
typedef T type;
};
// Used by boost::python to get the actual pointer
template <class T>
T *get_pointer( const Ogre::SharedPtr<T> &p )
{
if ( p.isNull() )
return 0;
return p.get();
}
} }
template<typename T>
void registerOgreSharedPtr()
{
boost::python::register_ptr_to_python< Ogre::SharedPtr<T> >();
}
#endif // PYOGRE_SHAREDPTRWRAPPER_H_INCLUDED
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -