C++ Standard Library Converters – pyne.stlcontainers
¶
This module contains wrapper classes for commonly used constructs in the C++ standard library. Because Cython does not yet do templating, these classes must be declared and defined for every type.
All functionality may be found in the stlcontainers
module:
from pyne import stlcontainers
This module is largely used by PyNE under the convers, in Cython and elsewhere. However, these classes are of more general interest, so feel free to use them in your own code as well.
Set Proxies¶
-
class
pyne.stlcontainers.
SetInt
¶ Wrapper class for C++ standard library sets of type <integer>. Provides set like interface on the Python level.
- Parameters
- new_setbool or set-like
Boolean on whether to make a new set or not, or set-like object with values which are castable to the appropriate type.
- free_setbool
Flag for whether the pointer to the C++ set should be deallocated when the wrapper is dereferenced.
-
class
pyne.stlcontainers.
SetStr
¶ Wrapper class for C++ standard library sets of type <string>. Provides set like interface on the Python level.
- Parameters
- new_setbool or set-like
Boolean on whether to make a new set or not, or set-like object with values which are castable to the appropriate type.
- free_setbool
Flag for whether the pointer to the C++ set should be deallocated when the wrapper is dereferenced.
Map Proxies¶
-
class
pyne.stlcontainers.
MapStrInt
¶ Wrapper class for C++ standard library maps of type <string, integer>. Provides dictionary like interface on the Python level.
- Parameters
- new_mapbool or dict-like
Boolean on whether to make a new map or not, or dict-like object with keys and values which are castable to the appropriate type.
- free_mapbool
Flag for whether the pointer to the C++ map should be deallocated when the wrapper is dereferenced.
-
class
pyne.stlcontainers.
MapIntStr
¶ Wrapper class for C++ standard library maps of type <integer, string>. Provides dictionary like interface on the Python level.
- Parameters
- new_mapbool or dict-like
Boolean on whether to make a new map or not, or dict-like object with keys and values which are castable to the appropriate type.
- free_mapbool
Flag for whether the pointer to the C++ map should be deallocated when the wrapper is dereferenced.
-
class
pyne.stlcontainers.
MapIntDouble
¶ Wrapper class for C++ standard library maps of type <integer, double>. Provides dictionary like interface on the Python level.
- Parameters
- new_mapbool or dict-like
Boolean on whether to make a new map or not, or dict-like object with keys and values which are castable to the appropriate type.
- free_mapbool
Flag for whether the pointer to the C++ map should be deallocated when the wrapper is dereferenced.
-
class
pyne.stlcontainers.
MapIntComplex
¶ Wrapper class for C++ standard library maps of type <integer, complex>. Provides dictionary like interface on the Python level.
- Parameters
- new_mapbool or dict-like
Boolean on whether to make a new map or not, or dict-like object with keys and values which are castable to the appropriate type.
- free_mapbool
Flag for whether the pointer to the C++ map should be deallocated when the wrapper is dereferenced.