⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pyogre_string.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
#ifndef PYOGRE_STRING_H_INCLUDED
# define PYOGRE_STRING_H_INCLUDED

# include <OgreString.h>

namespace py
{

struct StringToPython
{
   static PyObject *convert( const Ogre::String &s )
   {
      return PyString_FromString( s.c_str() );
   }
};


void registerStringConversion()
{
   boost::python::to_python_converter<Ogre::String, py::StringToPython>();
   boost::python::implicitly_convertible<std::string, Ogre::String>();
}

} // namespace py

#endif // PYOGRE_STRING_H_INCLUDED

⌨️ 快捷键说明

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