Orb/Doxygen/examples/autolink.cpp
changeset 0 42188c7ea2d9
equal deleted inserted replaced
-1:000000000000 0:42188c7ea2d9
       
     1 /*! \file autolink.cpp
       
     2   Testing automatic link generation.
       
     3   
       
     4   A link to a member of the Test class: Test::member, 
       
     5   
       
     6   More specific links to the each of the overloaded members:
       
     7   Test::member(int) and Test#member(int,int)
       
     8 
       
     9   A link to a protected member variable of Test: Test#var, 
       
    10 
       
    11   A link to the global enumeration type #GlobEnum.
       
    12  
       
    13   A link to the define #ABS(x).
       
    14   
       
    15   A link to the destructor of the Test class: Test::~Test, 
       
    16   
       
    17   A link to the typedef ::B.
       
    18  
       
    19   A link to the enumeration type Test::EType
       
    20   
       
    21   A link to some enumeration values Test::Val1 and ::GVal2
       
    22 */
       
    23 
       
    24 /*!
       
    25   Since this documentation block belongs to the class Test no link to 
       
    26   Test is generated.
       
    27 
       
    28   Two ways to link to a constructor are: #Test and Test().
       
    29 
       
    30   Links to the destructor are: #~Test and ~Test().
       
    31   
       
    32   A link to a member in this class: member().
       
    33 
       
    34   More specific links to the each of the overloaded members: 
       
    35   member(int) and member(int,int). 
       
    36   
       
    37   A link to the variable #var.
       
    38 
       
    39   A link to the global typedef ::B.
       
    40 
       
    41   A link to the global enumeration type #GlobEnum.
       
    42   
       
    43   A link to the define ABS(x).
       
    44   
       
    45   A link to a variable \link #var using another text\endlink as a link.
       
    46   
       
    47   A link to the enumeration type #EType.
       
    48 
       
    49   A link to some enumeration values: \link Test::Val1 Val1 \endlink and ::GVal1.
       
    50 
       
    51   And last but not least a link to a file: autolink.cpp.
       
    52   
       
    53   \sa Inside a see also section any word is checked, so EType, 
       
    54       Val1, GVal1, ~Test and member will be replaced by links in HTML.
       
    55 */
       
    56 
       
    57 class Test
       
    58 {
       
    59   public:
       
    60     Test();               //!< constructor 
       
    61    ~Test();               //!< destructor 
       
    62     void member(int);     /**< A member function. Details. */
       
    63     void member(int,int); /**< An overloaded member function. Details */
       
    64 
       
    65     /** An enum type. More details */
       
    66     enum EType { 
       
    67       Val1,               /**< enum value 1 */ 
       
    68       Val2                /**< enum value 2 */ 
       
    69     };                
       
    70 
       
    71   protected:
       
    72     int var;              /**< A member variable */
       
    73 };
       
    74 
       
    75 /*! details. */
       
    76 Test::Test() { }
       
    77 
       
    78 /*! details. */
       
    79 Test::~Test() { }
       
    80 
       
    81 /*! A global variable. */
       
    82 int globVar;
       
    83 
       
    84 /*! A global enum. */
       
    85 enum GlobEnum { 
       
    86                 GVal1,    /*!< global enum value 1 */ 
       
    87                 GVal2     /*!< global enum value 2 */ 
       
    88               };
       
    89 
       
    90 /*!
       
    91  *  A macro definition.
       
    92  */ 
       
    93 #define ABS(x) (((x)>0)?(x):-(x))
       
    94 
       
    95 typedef Test B;
       
    96 
       
    97 /*! \fn typedef Test B
       
    98  *  A type definition. 
       
    99  */