Imported Upstream version 1.8.15
[platform/upstream/doxygen.git] / testing / 074_ref.cpp
1 // objective: test \ref command in combination with const
2 // check: struct_foo.xml
3 /** @brief Foo class.
4  *
5  *  @see @ref Foo::Foo() constructor for details.
6  *  @see @ref Foo constant.
7  *  @see @ref operator<<(int) "less than operator".
8  *  @see @ref operator<<(int) const "const less than operator".
9  *  @see @ref operator()(int) "call operator".
10  *  @see @ref operator()(int) const "const call operator".
11  *  @see @ref operator&=(const Foo&) "and equal operator".
12  *  @see @ref operator->*(int *) "member pointer operator".
13  */
14 struct Foo {
15   /** Constructor */
16   Foo();
17   /**
18    * @brief Fun of two
19    *
20    * - fun() const
21    * - @ref fun() const
22    * - @ref fun() const "title"
23    */
24   static Foo fun(Foo a, Foo b);
25
26   /** overloaded less than operator */
27   Foo& operator<< (int i);
28
29   /** overloaded const less than operator */
30   const Foo& operator<< (int i) const;
31
32   /** overloaded call operator */
33   int operator()(int i);
34
35   /** overloaded call operator */
36   int operator()(int i) const;
37
38   /** and equal operator */
39   Foo& operator&=(const Foo& rhs);
40
41   /** and equal operator */
42   Foo& operator&=(const Foo& rhs);
43
44   /** Member pointer operator */
45   int* operator->*(int *p);
46
47   /** @brief Fun with itself */
48   Foo fun() const;
49 };