• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2006 Joel de Guzman
3     http://spirit.sourceforge.net/
4 
5     Use, modification and distribution is subject to the Boost Software
6     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7     http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
9 #include <string>
10 
11 //[ bar
12 //` This is the [*/bar/] function
bar()13 std::string bar()
14 {
15     // return 'em, bar man!
16     return "bar";
17 }
18 //]
19 
20 //[ foo
21 /*` This is the [*['foo]] function. */
foo()22 std::string foo()
23 {
24     // return 'em, foo man!
25     return "foo";
26 }
27 //]
28 
29 //[ foo_bar
foo_bar()30 std::string foo_bar() /*< The /Mythical/ FooBar.
31                       See [@http://en.wikipedia.org/wiki/Foobar Foobar for details] >*/
32 {
33     return "foo-bar"; /*< return 'em, foo-bar man! >*/
34 }
35 //]
36 
37 //[ class_
38 class x
39 {
40 public:
41 
42     /*<< Constructor >>*/
x()43     x() : n(0)
44     {
45     }
46 
47     /*<< Destructor >>*/
~x()48     ~x()
49     {
50     }
51 
52     /*<< Get the `n` member variable >>*/
get() const53     int get() const
54     {
55         return n; /*<- this will be ignored by quickbook ->*/
56     }
57 
58     /*<< Set the `n` member variable >>*/
set(int n_)59     void set(int n_)
60     {
61         n = n_;
62     }
63 //<- this will be ignored by quickbook
64 private:
65 
66     int n;
67 //->
68 };
69 //]
70