| 3 | #include <vector> |
| 4 | |
| 5 | class Example { |
| 6 | public: |
| 7 | Example() {} |
| 8 | void add(const std::string& s) |
| 9 | { |
| 10 | mS.push_back(s); |
| 11 | } |
| 12 | |
| 13 | std::vector<std::string>::iterator begin() |
| 14 | { |
| 15 | return mS.begin(); |
| 16 | } |
| 17 | std::vector<std::string>::iterator end() |
| 18 | { |
| 19 | return mS.end(); |
| 20 | } |
| 21 | |
| 22 | private: |
| 23 | std::vector<std::string> mS; |
| 24 | }; |
| 25 | |
| 26 | #include <boost/python.hpp> |
| 27 | using namespace boost::python; |