Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/pyste/tests/wrappertest.h @ 45

Last change on this file since 45 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 942 bytes
Line 
1/* Copyright Bruno da Silva de Oliveira 2003. Use, modification and
2 distribution is subject to the Boost Software License, Version 1.0.
3 (See accompanying file LICENSE_1_0.txt or copy at
4 http:#www.boost.org/LICENSE_1_0.txt)
5 */
6#ifndef WRAPPER_TEST
7#define WRAPPER_TEST
8
9
10#include <vector>
11
12namespace wrappertest {
13
14inline std::vector<int> Range(int count)
15{
16    std::vector<int> v;
17    v.reserve(count);
18    for (int i = 0; i < count; ++i){
19        v.push_back(i);
20    }
21    return v;
22}
23
24
25struct C
26{
27    C() {}
28
29    std::vector<int> Mul(int value)
30    {
31        std::vector<int> res;
32        res.reserve(value);
33        std::vector<int>::const_iterator it;
34        std::vector<int> v(Range(value));
35        for (it = v.begin(); it != v.end(); ++it){
36            res.push_back(*it * value);
37        }
38        return res;
39    }
40};
41
42
43struct A
44{
45    virtual int f() { return 1; };
46};
47
48inline int call_foo(A* a){ return a->f(); }
49} 
50#endif
51
Note: See TracBrowser for help on using the repository browser.