Michele De Stefano's C++ Utilities
Main Page
Modules
Namespaces
Classes
Files
Examples
File List
File Members
indexing_example.hpp
1
// indexing_example.hpp
2
//
3
// Copyright (c) 2014 - Michele De Stefano (micdestefano@users.sourceforge.net)
4
//
5
// Distributed under the MIT License (See accompanying file LICENSE)
6
19
#include <vector>
20
#include <
mds_utils/python/container_operators.hpp
>
21
22
23
class
Dummy_Container
:
public
mds_utils::python::support_random_getset_access
<Dummy_Container> {
24
25
std::vector<double> m_v;
26
27
public
:
28
29
typedef
double
value_type;
30
31
Dummy_Container
();
32
33
size_t
get_nel()
const
;
34
35
double
get_el_at(
size_t
i)
const
;
36
37
void
set_el_at(
size_t
i,
double
val);
38
};
39
container_operators.hpp
Contains utilities for easy Python operators support into extension modules.
mds_utils::python::support_random_getset_access
Adds support for random get/set access operator (i.e. square brackets) to a class that has to be expo...
Definition:
container_operators.hpp:144
Dummy_Container
Definition:
indexing_example.hpp:23
examples
python
indexing_example
indexing_example.hpp
Generated by
1.8.11