50分 求教boost.python里 类属性和类数据成员变量的区别解决思路
50分 求教boost.python里 类属性和类数据成员变量的区别
小弟在看boost.python,下文中提到了两项,
分别是:Class Data Members和Class Properties
原文:(中英双语的)
http://www.maycode.com/boostdoc/boost-doc/libs/python/doc/tutorial/doc/html/python/exposing.html
请教下它提到的Class Properties是什么意思?
.add_property和.def_readonly有啥区别?
Class Data Members和Class Properties又是什么区别?
------解决方案--------------------
这些都是导出到python中的,属性是python中有的而c++中没有的,所以要实现这样的接口
add_property是添加属性
def_readonly是定义只读数据成员
------解决方案--------------------
up
------解决方案--------------------
:)
小弟在看boost.python,下文中提到了两项,
分别是:Class Data Members和Class Properties
原文:(中英双语的)
http://www.maycode.com/boostdoc/boost-doc/libs/python/doc/tutorial/doc/html/python/exposing.html
请教下它提到的Class Properties是什么意思?
.add_property和.def_readonly有啥区别?
Class Data Members和Class Properties又是什么区别?
------解决方案--------------------
这些都是导出到python中的,属性是python中有的而c++中没有的,所以要实现这样的接口
add_property是添加属性
def_readonly是定义只读数据成员
------解决方案--------------------
up
------解决方案--------------------
:)