summaryrefslogtreecommitdiff
path: root/Examples/test-suite/doxygen_code_blocks.i
blob: 900e8f9bbf898bc022cf05e0d0442c1bd3ace29c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%module doxygen_code_blocks

// This test is only used with Python

%inline %{

/**
 * \brief Test for code blocks
 *
 * \code
 * simple code block
 * \endcode
 *
 * More advanced usage with C++ characters:
 * \code
 * std::vector<int> first;                                // empty vector of ints
 * std::vector<int> second (4,100);                       // four ints with value 100
 * std::vector<int> third (second.begin(),second.end());  // iterating through second
 * std::vector<int> fourth (third);                       // a copy of third
 *  // the iterator constructor can also be used to construct from arrays:
 * int myints[] = {16,2,77,29};
 * std::vector<int> fifth (myints, myints + sizeof(myints) / sizeof(int) );
 *
 * std::cout << "The contents of fifth are:";
 * for (std::vector<int>::iterator it = fifth.begin(); it != fifth.end(); ++it)
 *   std::cout << ' ' << *it;
 * std::cout << '\n'; 
 * \endcode
 *
 * A code block for C:
 * \code{.c}
 * printf("hello world");
 * \endcode
 *
 * A code block for Java:
 * \code{.java}
 * public class HelloWorld {
 *     public static void main(String[] args) {
 *         // Prints "Hello, World" to the terminal window.
 *         System.out.println("Hello, World");
 *     }
 * }
 * \endcode
 * 
 * A code block for python:
 * \code{.py}
 * print('hello world')
 * \endcode
 *
 * A python doctest example:
 * \code{.py}
 * >>> 1 + 1
 * 2
 * \endcode
 */
int function()
{
    return 0;
}  


%}