1
2
3
4
5
6 """defines interface for exposing STD containers, using current version of indexing suite"""
7
8 from pygccxml import declarations
9 import python_traits
10
11
12
13
14
15 containers = {
16 'vector' : "boost/python/suite/indexing/vector_indexing_suite.hpp"
17 , 'map' : "boost/python/suite/indexing/map_indexing_suite.hpp"
18 }
22 """
23 This class helps user to export STD containers, using built-in Boost.Python
24 indexing suite.
25 """
26
27 - def __init__( self, container_class, no_proxy=None, derived_policies=None ):
34
35 @property
37 """reference to the parent( STD container ) class"""
38 return self.__container_class
39
40 @property
46
47 @property
51
56
59 no_proxy = property( _get_no_proxy, _set_no_proxy
60 , doc="NoProxy value, the initial value depends on container"
61 +" element_type( mapped_type ) type. In most cases, "
62 +"Py++ is able to guess this value, right. If you are not "
63 +"lucky, you will have to set the property value.")
64
66 return self.__derived_policies
69 derived_policies = property( _get_derived_policies, _set_derived_policies
70 , doc="This proprty contains DerivedPolicies string. "
71 +"It will be added as is to the generated code.")
72
73 @property
75 """Return list of header files to be included in generated code"""
76 if self.__include_files is None:
77 name = self.container_class.name.split( '<' )[0]
78 if name not in containers:
79 self.__include_files = []
80 else:
81 self.__include_files = [containers[ name ]]
82 return self.__include_files
83