diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2008-07-27 14:59:10 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2008-07-27 14:59:10 (GMT) |
commit | 6bf92c5d7efffb6a04c3ccbfc144ad944200fed2 (patch) | |
tree | 201e94696e0c1cb55ffa8fd45c97dfa1ac586f0f /examples | |
parent | 956cf8647cb54a930d1d9c65fb01cc4d9498f2bd (diff) | |
download | Doxygen-6bf92c5d7efffb6a04c3ccbfc144ad944200fed2.zip Doxygen-6bf92c5d7efffb6a04c3ccbfc144ad944200fed2.tar.gz Doxygen-6bf92c5d7efffb6a04c3ccbfc144ad944200fed2.tar.bz2 |
Release-1.5.6-20080727
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.in | 8 | ||||
-rw-r--r-- | examples/Makefile.win.in | 8 | ||||
-rw-r--r-- | examples/manual.c | 87 | ||||
-rw-r--r-- | examples/manual.cfg | 15 |
4 files changed, 114 insertions, 4 deletions
diff --git a/examples/Makefile.in b/examples/Makefile.in index 1176e6d..6db4f01 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -24,13 +24,14 @@ all: class/html/index.html \ memgrp/html/index.html \ docstring/html/index.html \ pyexample/html/index.html \ - mux/html/index.html + mux/html/index.html \ + manual/html/index.html clean: rm -rf class define enum file func page relates author \ par overload example include qtstyle jdstyle structcmd \ autolink tag restypedef afterdoc template tag group diagrams \ - memgrp docstring pyexample mux + memgrp docstring pyexample mux manual class/html/index.html: class.h class.cfg $(DOXYGEN)/bin/doxygen class.cfg @@ -106,6 +107,9 @@ pyexample/html/index.html: pyexample.py pyexample.cfg mux/html/index.html: mux.vhdl mux.cfg $(DOXYGEN)/bin/doxygen mux.cfg +manual/html/index.html: manual.c manual.cfg + $(DOXYGEN)/bin/doxygen manual.cfg + docstring/html/index.html: docstring.py docstring.cfg $(DOXYGEN)/bin/doxygen docstring.cfg diff --git a/examples/Makefile.win.in b/examples/Makefile.win.in index a6c6956..0d5e64e 100644 --- a/examples/Makefile.win.in +++ b/examples/Makefile.win.in @@ -25,13 +25,14 @@ all: class/html/index.html \ memgrp/html/index.html \ docstring/html/index.html \ pyexample/html/index.html \ - mux/html/index.html + mux/html/index.html \ + manual/html/index.html clean: del /s/y class define enum file pyexample docstring del /s/y func page relates author del /s/y par overload example include qtstyle - del /s/y jdstyle structcmd autolink resdefine mux + del /s/y jdstyle structcmd autolink resdefine mux manual del /s/y restypedef afterdoc template tag group diagrams memgrp class/html/index.html: class.h class.cfg @@ -106,6 +107,9 @@ pyexample/html/index.html: pyexample.py pyexample.cfg mux/html/index.html: mux.vhdl mux.cfg $(DOXYDIR)\doxygen mux.cfg +manual/html/index.html: manual.c manual.cfg + $(DOXYDIR)\doxygen manual.cfg + docstring/html/index.html: docstring.py docstring.cfg $(DOXYDIR)\doxygen docstring.cfg diff --git a/examples/manual.c b/examples/manual.c new file mode 100644 index 0000000..fac6832 --- /dev/null +++ b/examples/manual.c @@ -0,0 +1,87 @@ +/** + * \file manual.c + */ + +typedef struct Object Object; //!< Object type +typedef struct Vehicle Vehicle; //!< Vehicle type +typedef struct Car Car; //!< Car type +typedef struct Truck Truck; //!< Truck type + +/*! + * Base object class. + */ +struct Object +{ + int ref; //!< \private Reference count. +}; + + +/*! + * Increments object reference count by one. + * \public \memberof Object + */ +static Object * objRef(Object *obj); + + +/*! + * Decrements object reference count by one. + * \public \memberof Object + */ +static Object * objUnref(Object *obj); + + +/*! + * Vehicle class. + * \extends Object + */ +struct Vehicle +{ + Object base; //!< \protected Base class. +}; + + +/*! + * Starts the vehicle. + * \public \memberof Vehicle + */ +void vehicleStart(Vehicle *obj); + + +/*! + * Stops the vehicle. + * \public \memberof Vehicle + */ +void vehicleStop(Vehicle *obj); + + +/*! + * Car class. + * \extends Vehicle + */ +struct Car +{ + Vehicle base; //!< \protected Base class. +}; + + +/*! + * Truck class. + * \extends Vehicle + */ +struct Truck +{ + Vehicle base; //!< \protected Base class. +}; + + +/*! + * Main function. + * + * Ref vehicleStart(), objRef(), objUnref(). + */ +int main(void) +{ + Car c; + vehicleStart((Vehicle*) &c); +} + diff --git a/examples/manual.cfg b/examples/manual.cfg new file mode 100644 index 0000000..0b9f798 --- /dev/null +++ b/examples/manual.cfg @@ -0,0 +1,15 @@ +PROJECT_NAME = "Manual inheritance and membership" +OUTPUT_DIRECTORY = manual +GENERATE_LATEX = NO +GENERATE_MAN = NO +GENERATE_RTF = NO +CASE_SENSE_NAMES = NO +INPUT = manual.c +QUIET = YES +JAVADOC_AUTOBRIEF = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +TYPEDEF_HIDES_STRUCT = YES +INLINE_SOURCES = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES |