bindings/python/chain.cpp
author Dmitriy Morozov <dmitriy@mrzv.org>
Mon, 13 Apr 2009 20:44:31 -0700
branchdev
changeset 128 a5fd0c2a1c88
parent 126 3c3e77ac43d2
child 129 95454ea3f9c0
permissions -rw-r--r--
Renamed header files in bindings/python to get rid of the "python-" prefix

#include <topology/chain.h>
#include "static-persistence.h"
#include <boost/python.hpp>

using namespace boost::python;

typedef     SPersistence::Chain                                 VChain;


VChain::const_iterator      begin(const VChain& c)              { return c.begin(); }
VChain::const_iterator      end(const VChain& c)                { return c.end(); }

void export_chain()
{
    class_<VChain>("Chain")
        .def("__iter__",    range(&begin, &end))
    ;
}