Trees | Indices | Help |
|
---|
|
object --+ | decl_wrapper.decl_wrapper_t --+ | object --+ | | | pygccxml.declarations.declaration.declaration_t --+ | | | pygccxml.declarations.variable.variable_t --+ | variable_t
defines a set of properties, that will instruct Py++ how to expose the variable
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
Class Variables | |
__call_policies_doc__ =
|
|
__use_make_functions_doc__ =
|
|
__expose_address_doc__ =
|
|
__expose_value_doc__ =
|
|
Inherited from |
Properties | |
getter_call_policies There are usecase, when exporting member variable forces Py++ to create accessors functions. |
|
setter_call_policies There are usecase, when exporting member variable forces Py++ to create accessors functions. |
|
apply_smart_ptr_wa Generate code using make_getter and make_setter functions |
|
use_make_functions Generate code using make_getter and make_setter functions |
|
expose_address There are some cases when Boost.Python doesn't provide a convenient way to expose the variable to Python. |
|
expose_value Boost.Python is not able to expose unions. |
|
is_read_only | |
Inherited from Inherited from Inherited from |
Method Details |
creates class that describes C++ global or member variable |
returns an explanation( list of str ) why wrapper is needed. If wrapper is not needed than [] will be returned. |
Class Variable Details |
__call_policies_doc__
|
__use_make_functions_doc__
|
__expose_address_doc__
|
__expose_value_doc__
|
Property Details |
getter_call_policiesThere are usecase, when exporting member variable forces Py++ to create accessors functions. Sometime, those functions requires call policies. To be more specific: when you export member variable that has reference or pointer type, you need to tell Boost.Python library how to manage object life-time. In all cases, Py++ will give reasonable default value. I am sure, that there are use cases, when you will have to change it. You should use this property to change it.
|
setter_call_policiesThere are usecase, when exporting member variable forces Py++ to create accessors functions. Sometime, those functions requires call policies. To be more specific: when you export member variable that has reference or pointer type, you need to tell Boost.Python library how to manage object life-time. In all cases, Py++ will give reasonable default value. I am sure, that there are use cases, when you will have to change it. You should use this property to change it.
|
apply_smart_ptr_waGenerate code using make_getter and make_setter functions Basically you don't need to use this, untill you have one of the next use-cases: * member variable is smart pointer - in this case Boost.Python has small problem to expose it right. Using the functions is a work around to the problem. * member variable defined custom r-value converter - may be you don't know but the conversion is applied only on functions arguments. So you need to use make_getter/make_setter in order to allow user to enjoy from the conversion. Setting "apply_smart_ptr_wa" and/or "use_make_functions" to "True" will tell Py++ to generate such code.
|
use_make_functionsGenerate code using make_getter and make_setter functions Basically you don't need to use this, untill you have one of the next use-cases: * member variable is smart pointer - in this case Boost.Python has small problem to expose it right. Using the functions is a work around to the problem. * member variable defined custom r-value converter - may be you don't know but the conversion is applied only on functions arguments. So you need to use make_getter/make_setter in order to allow user to enjoy from the conversion. Setting "apply_smart_ptr_wa" and/or "use_make_functions" to "True" will tell Py++ to generate such code.
|
expose_addressThere are some cases when Boost.Python doesn't provide a convenient way to expose the variable to Python. For example: double* x[10]; //or char* buffer; //in case you want to modify the buffer in place In this cases Py++ doesn't help too. In these cases it is possible to expose the actual address of the variable. After that, you can use built-in "ctypes" package to edit the content of the variable.
|
expose_valueBoost.Python is not able to expose unions. Using ctypes module it is possible to get access to the data stored in a variable, which has some union type. This property controls whether Py++ should expose the variable value or not. In case, this variable has type union, this property will be False.
|
is_read_only
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 20 08:51:13 2008 | http://epydoc.sourceforge.net |