Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/examples/manual.c

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/**
2 * \file manual.c
3 */
4
5typedef struct Object Object; //!< Object type
6typedef struct Vehicle Vehicle; //!< Vehicle type
7typedef struct Car Car; //!< Car type
8typedef struct Truck Truck; //!< Truck type
9
10/*!
11 * Base object class.
12 */
13struct Object
14{
15 int ref; //!< \private Reference count.
16};
17
18
19/*!
20 * Increments object reference count by one.
21 * \public \memberof Object
22 */
23static Object * objRef(Object *obj);
24
25
26/*!
27 * Decrements object reference count by one.
28 * \public \memberof Object
29 */
30static Object * objUnref(Object *obj);
31
32
33/*!
34 * Vehicle class.
35 * \extends Object
36 */
37struct Vehicle
38{
39 Object base; //!< \protected Base class.
40};
41
42
43/*!
44 * Starts the vehicle.
45 * \public \memberof Vehicle
46 */
47void vehicleStart(Vehicle *obj);
48
49
50/*!
51 * Stops the vehicle.
52 * \public \memberof Vehicle
53 */
54void vehicleStop(Vehicle *obj);
55
56
57/*!
58 * Car class.
59 * \extends Vehicle
60 */
61struct Car
62{
63 Vehicle base; //!< \protected Base class.
64};
65
66
67/*!
68 * Truck class.
69 * \extends Vehicle
70 */
71struct Truck
72{
73 Vehicle base; //!< \protected Base class.
74};
75
76
77/*!
78 * Main function.
79 *
80 * Ref vehicleStart(), objRef(), objUnref().
81 */
82int main(void)
83{
84 Car c;
85 vehicleStart((Vehicle*) &c);
86}
87
88

Archive Download this file

Revision: 1322