Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/python/pyste/tests/header_test.h @ 13

Last change on this file since 13 was 12, checked in by landauf, 17 years ago

added boost

File size: 796 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 HEADER_TEST_H
7#define HEADER_TEST_H
8
9#include <map>
10#include <string>
11
12namespace header_test {
13   
14enum choice { red, blue };
15
16inline std::string choice_str(choice c)
17{
18    std::map<choice, std::string> choice_map;
19    choice_map[red] = "red";
20    choice_map[blue] = "blue";
21    return choice_map[c];
22}
23
24struct C
25{
26    choice c;
27
28    std::string get()
29    {
30        return choice_str(c);
31    }
32};
33
34// test the exclusion of the following
35
36struct ForwardDeclared; // should be excluded automatically
37struct A {};
38void foo();
39enum bar { value };
40
41}
42
43#endif
Note: See TracBrowser for help on using the repository browser.