Commits

wlav committed d988ba7

add needed test files for io tests

  • Participants
  • Parent commits 63b2442
  • Branches reflex-support

Comments (0)

Files changed (4)

File pypy/module/cppyy/test/iotypes.cxx

+#include "iotypes.h"
+
+const IO::Floats_t& IO::SomeDataObject::get_floats() { return m_floats; }
+const IO::Tuples_t& IO::SomeDataObject::get_tuples() { return m_tuples; }
+
+void IO::SomeDataObject::add_float(float f) { m_floats.push_back(f); }
+void IO::SomeDataObject::add_tuple(const std::vector<float>& t) { m_tuples.push_back(t); }

File pypy/module/cppyy/test/iotypes.h

+#include <vector>
+
+namespace IO {
+
+typedef std::vector<float>                Floats_t;
+typedef std::vector<std::vector<float> >  Tuples_t;
+
+class SomeDataObject {
+public:
+   const Floats_t& get_floats();
+   const Tuples_t& get_tuples();
+
+public:
+   void add_float(float f);
+   void add_tuple(const std::vector<float>& t);
+
+private:
+   Floats_t m_floats;
+   Tuples_t m_tuples;
+};
+
+struct SomeDataStruct {
+   Floats_t Floats;
+   char     Label[3];
+   int      NLabel;
+};
+
+} // namespace IO

File pypy/module/cppyy/test/iotypes.xml

+<lcgdict>
+<!-- empty -->
+</lcgdict>

File pypy/module/cppyy/test/iotypes_LinkDef.h

+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+using namespace std;
+#pragma link C++ class vector<vector<float> >+;
+#pragma link C++ class vector<vector<float> >::iterator;
+#pragma link C++ class vector<vector<float> >::const_iterator;
+
+#pragma link C++ namespace IO;
+#pragma link C++ class IO::SomeDataObject+;
+#pragma link C++ class IO::SomeDataStruct+;
+
+#endif