3030#include " export_main.h"
3131#include " sp_main.h"
3232#include " core.h"
33+ #include " utilities/array.h"
3334
3435
3536// -----------------------------------------------------------------------------
@@ -46,6 +47,7 @@ static void export_message_severity(scope);
4647static void export_output_return (scope);
4748static void export_constants (scope);
4849static void export_functions (scope);
50+ static void export_arrays (scope);
4951
5052
5153// -----------------------------------------------------------------------------
@@ -58,6 +60,7 @@ DECLARE_SP_MODULE(_core)
5860 export_output_return (_core);
5961 export_constants (_core);
6062 export_functions (_core);
63+ export_arrays (_core);
6164
6265 scope ().attr (" BoostPythonClass" ) = objects::class_metatype ();
6366}
@@ -135,3 +138,65 @@ void export_functions(scope _core)
135138 " Return a list of all modules exposed by Source.Python's core.\n\n "
136139 " :rtype: list" );
137140}
141+
142+ // -----------------------------------------------------------------------------
143+ // Expose functions.
144+ // -----------------------------------------------------------------------------
145+ void export_arrays (scope _core)
146+ {
147+ class_< Array<bool > >( " BoolArray" )
148+ .def (array_indexing_suite< Array<bool > >())
149+ ;
150+
151+ class_< Array<char > >( " CharArray" )
152+ .def (array_indexing_suite< Array<char > >())
153+ ;
154+
155+ class_< Array<unsigned char > >( " UCharArray" )
156+ .def (array_indexing_suite< Array<unsigned char > >())
157+ ;
158+
159+ class_< Array<unsigned short > >( " UShortArray" )
160+ .def (array_indexing_suite< Array<unsigned short > >())
161+ ;
162+
163+ class_< Array<short > >( " ShortArray" )
164+ .def (array_indexing_suite< Array<short > >())
165+ ;
166+
167+ class_< Array<int > >( " IntArray" )
168+ .def (array_indexing_suite< Array<int > >())
169+ ;
170+
171+ class_< Array<unsigned int > >( " UIntArray" )
172+ .def (array_indexing_suite< Array<unsigned int > >())
173+ ;
174+
175+ class_< Array<long > >( " LongArray" )
176+ .def (array_indexing_suite< Array<long > >())
177+ ;
178+
179+ class_< Array<unsigned long > >( " ULongArray" )
180+ .def (array_indexing_suite< Array<unsigned long > >())
181+ ;
182+
183+ class_< Array<long long > >( " LongLongArray" )
184+ .def (array_indexing_suite< Array<long long > >())
185+ ;
186+
187+ class_< Array<unsigned long long > >( " ULongLongArray" )
188+ .def (array_indexing_suite< Array<unsigned long long > >())
189+ ;
190+
191+ class_< Array<float > >( " FloatArray" )
192+ .def (array_indexing_suite< Array<float > >())
193+ ;
194+
195+ class_< Array<double > >( " DoubleArray" )
196+ .def (array_indexing_suite< Array<double > >())
197+ ;
198+
199+ // class_< Array<const char*> >( "StringArray" )
200+ // .def(array_indexing_suite< Array<const char*> >())
201+ // ;
202+ }
0 commit comments