library of assembled shared sources

http://lass.cocamware.com

lass::python::PyExportTraitsEnum< EnumType, IntegerType > Struct Template Reference
[Python]

Helper to specialise PyExportTraits for enumerations. More...

#include <pyobject_plus.h>


Static Public Member Functions

static PyObject * build (const EnumType iv)
static int get (PyObject *iv, EnumType &ov)


Detailed Description

template<typename EnumType, typename IntegerType = long>
struct lass::python::PyExportTraitsEnum< EnumType, IntegerType >

Helper to specialise PyExportTraits for enumerations.

When you want to export enumeration types, you need to specialize PyExportTraits for it. This structure will help you

    enum MyEnumeration { meFoo, meBar, meFuz };
    namespace lass
    {
    namespace python
    {
    template <> struct PyExportTraits<MyEnumeration>: public PyExportTraitsEnum<MyEnumeration> {};
    }
    }

Definition at line 383 of file pyobject_plus.h.


Member Function Documentation

template<typename EnumType , typename IntegerType = long>
static PyObject* lass::python::PyExportTraitsEnum< EnumType, IntegerType >::build ( const EnumType  iv  )  [inline, static]

Definition at line 385 of file pyobject_plus.h.

References lass::python::pyBuildSimpleObject().

template<typename EnumType , typename IntegerType = long>
static int lass::python::PyExportTraitsEnum< EnumType, IntegerType >::get ( PyObject *  iv,
EnumType &  ov 
) [inline, static]

Definition at line 389 of file pyobject_plus.h.

References lass::python::pyGetSimpleObject().


The documentation for this struct was generated from the following file:

Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo