Go to the documentation of this file.
20 template <
typename TE>
25 template <
typename TE>
30 template <
typename TE>
35 template <
typename TE>
42 this->push_back(it.
next());
46 template <
typename TE>
52 template <
typename TE>
59 if ((i >=
static_cast<int>(this->size())) || (i < 0))
61 PyErr_SetString(PyExc_IndexError,
"Index out of range");
62 boost::python::throw_error_already_set();
64 return static_cast<size_t>(i);
67 template <
typename TE>
70 return (*
this)[getIndex(i)];
73 template <
typename TE>
76 (*this)[getIndex(i)] = e;
79 template <
typename TE>
83 return boost::python::make_tuple(boost::python::list(v));
86 template <
typename TE>
87 boost::python::class_<VectorPy<TE> >
89 const std::string &pyClassName,
90 const std::string &pyClassDocString
94 boost::python::class_<VectorPy<TE> >(
96 pyClassDocString.c_str(),
97 boost::python::init<>()
101 (boost::python::arg(
"iterable"))
105 boost::python::init<boost::python::object &>(
106 (boost::python::arg(
"iterable")),
109 "Constructs vec of elements from specifed sequence.\n" +
110 "@type iterable: iterable\n" +
111 "@kwarg iterable: copy and insert elements from C{iterable}" +
118 boost::python::iterator<
120 boost::python::return_internal_reference<>
130 boost::python::return_internal_reference<>()
139 (boost::python::arg(
"elem")),
140 "Appends an element to the end of this vector.\n"
141 "@type elem: object\n"
142 "@kwarg elem: Copy this element as the new last element."
147 "Removes all elements from this vector."
150 boost::python::self == boost::python::self
bool hasNext() const
Definition: PythonIterIterator.hpp:32
Definition: VectorPy.h:26
Inherited::const_reference const_reference
Definition: VectorPy.h:29
std::vector< TmplElem > Inherited
Definition: VectorPy.h:28
void setItem(int i, const_reference e)
Definition: VectorPy.hpp:74
Definition: CheckPointable.cpp:17
Inherited::reference reference
Definition: VectorPy.h:30
static boost::python::class_< VectorPy > exportVector(const std::string &pyClassName, const std::string &pyClassDocString)
Definition: VectorPy.hpp:88
VectorPy()
Definition: VectorPy.hpp:21
void append(const_reference e)
Definition: VectorPy.hpp:47
Definition: VectorPy.h:33
Definition: PythonIterIterator.h:28
reference getItem(int i)
Definition: VectorPy.hpp:68
value_type next()
Definition: PythonIterIterator.hpp:38
static boost::python::tuple getinitargs(VectorPy const &v)
Definition: VectorPy.hpp:81
size_t getIndex(int i) const
Definition: VectorPy.hpp:53