From: Gunnar Beutner Date: Sat, 19 May 2012 09:04:52 +0000 (+0200) Subject: Even more documentation updastes. X-Git-Tag: v0.0.1~501 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9beef6446f9d00f318b3b77a367de1200ed18f5b;p=icinga2 Even more documentation updastes. --- diff --git a/Doxyfile.in b/Doxyfile.in index dc9b0b584..6cfe8cf36 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -648,7 +648,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @top_srcdir@/base @top_srcdir@/icinga @top_srcdir@/jsonrpc @top_srcdir@/components @top_srcdir@/icinga-app +INPUT = @top_srcdir@/base @top_srcdir@/jsonrpc @top_srcdir@/icinga @top_srcdir@/components @top_srcdir@/icinga-app # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/base/component.h b/base/component.h index b5d260294..f70fff74b 100644 --- a/base/component.h +++ b/base/component.h @@ -58,6 +58,12 @@ typedef Component *(*CreateComponentFunction)(void); # define SYM_CREATECOMPONENT(component) component ## _LTX_CreateComponent #endif /* _WIN32 */ +/** + * Implements the loader function for a component. + * + * @param component The name of the component. + * @param klass The component class. + */ #define EXPORT_COMPONENT(component, klass) \ extern "C" I2_EXPORT icinga::Component *SYM_CREATECOMPONENT(component)(void) \ { \ diff --git a/base/i2-base.h b/base/i2-base.h index 010c44374..3af92e031 100644 --- a/base/i2-base.h +++ b/base/i2-base.h @@ -30,16 +30,18 @@ * * The framework's code critically depends on the following patterns: * - * -Smart pointers + * + * Smart pointers * * The shared_ptr and weak_ptr template classes are used to simplify memory - * management and to avoid accidental memory leaks and use-after-free bugs. + * management and to avoid accidental memory leaks and use-after-free bugs. * - * -Observer pattern + * Observer pattern * * Framework classes expose events which other objects can subscribe to. This * is used to decouple clients of a class from the class' internal - * implementation. + * implementation. + * */ /** diff --git a/components/configfile/configfilecomponent.h b/components/configfile/configfilecomponent.h index b46904f9f..fd4d4df85 100644 --- a/components/configfile/configfilecomponent.h +++ b/components/configfile/configfilecomponent.h @@ -23,8 +23,16 @@ namespace icinga { +/** + * Thrown when a parser error occurs while reading a config file. + * + * @ingroup configfile + */ DEFINE_EXCEPTION_CLASS(ConfigParserException); +/** + * @ingroup configfile + */ class ConfigFileComponent : public IcingaComponent { public: diff --git a/components/configfile/i2-configfile.h b/components/configfile/i2-configfile.h index 589f8d4e4..25dbe9334 100644 --- a/components/configfile/i2-configfile.h +++ b/components/configfile/i2-configfile.h @@ -20,6 +20,13 @@ #ifndef I2CONFIGFILECOMPONENT_H #define I2CONFIGFILECOMPONENT_H +/** + * @defgroup configfile ConfigFile component + * + * The ConfigFile component reads configuration objects from a configuration + * file + */ + #include #include diff --git a/components/configrpc/configrpccomponent.h b/components/configrpc/configrpccomponent.h index b91f64649..a7fb6d6fc 100644 --- a/components/configrpc/configrpccomponent.h +++ b/components/configrpc/configrpccomponent.h @@ -23,6 +23,9 @@ namespace icinga { +/** + * @ingroup configrpc + */ class ConfigRpcComponent : public IcingaComponent { private: @@ -38,7 +41,8 @@ private: int RemoteObjectCommittedHandler(const NewRequestEventArgs& ea); int RemoteObjectRemovedHandler(const NewRequestEventArgs& ea); - static RpcRequest MakeObjectMessage(const ConfigObject::Ptr& object, string method, bool includeProperties); + static RpcRequest MakeObjectMessage(const ConfigObject::Ptr& object, + string method, bool includeProperties); static bool ShouldReplicateObject(const ConfigObject::Ptr& object); public: diff --git a/components/configrpc/i2-configrpc.h b/components/configrpc/i2-configrpc.h index 8204b729d..fee0b754b 100644 --- a/components/configrpc/i2-configrpc.h +++ b/components/configrpc/i2-configrpc.h @@ -20,6 +20,12 @@ #ifndef I2CONFIGRPC_H #define I2CONFIGRPC_H +/** + * @defgroup configrpc ConfigRpc component + * + * The ConfigRpc component replicates configuration objects to other peers. + */ + #include #include #include diff --git a/components/demo/democomponent.h b/components/demo/democomponent.h index 155e04e4a..1046ccf68 100644 --- a/components/demo/democomponent.h +++ b/components/demo/democomponent.h @@ -23,6 +23,9 @@ namespace icinga { +/** + * @ingroup demo + */ class DemoComponent : public IcingaComponent { private: diff --git a/components/demo/i2-demo.h b/components/demo/i2-demo.h index 7810456e4..43a907db3 100644 --- a/components/demo/i2-demo.h +++ b/components/demo/i2-demo.h @@ -20,6 +20,12 @@ #ifndef I2DEMO_H #define I2DEMO_H +/** + * @defgroup demo Demo component + * + * The demo component periodically sends demo messages. + */ + #include #include #include diff --git a/components/discovery/discoverycomponent.h b/components/discovery/discoverycomponent.h index ad7f6a0ea..a513f4cb2 100644 --- a/components/discovery/discoverycomponent.h +++ b/components/discovery/discoverycomponent.h @@ -23,6 +23,9 @@ namespace icinga { +/** + * @ingroup discovery + */ class ComponentDiscoveryInfo : public Object { public: @@ -38,6 +41,9 @@ public: time_t LastSeen; }; +/** + * @ingroup discovery + */ class DiscoveryComponent : public IcingaComponent { private: diff --git a/components/discovery/discoverymessage.h b/components/discovery/discoverymessage.h index 6390f530d..cad11aa03 100644 --- a/components/discovery/discoverymessage.h +++ b/components/discovery/discoverymessage.h @@ -4,6 +4,9 @@ namespace icinga { +/** + * @ingroup discovery + */ class DiscoveryMessage : public MessagePart { diff --git a/components/discovery/i2-discovery.h b/components/discovery/i2-discovery.h index febbfbfcf..834454087 100644 --- a/components/discovery/i2-discovery.h +++ b/components/discovery/i2-discovery.h @@ -20,6 +20,13 @@ #ifndef I2DISCOVERY_H #define I2DISCOVERY_H +/** + * @defgroup discovery Discovery component + * + * The Discovery component takes care of connecting peers to each other + * and performs authorisation checks for the message subscriptions. + */ + #include #include #include diff --git a/jsonrpc/netstring.h b/jsonrpc/netstring.h index eb1da9765..bd21b2f3f 100644 --- a/jsonrpc/netstring.h +++ b/jsonrpc/netstring.h @@ -32,7 +32,8 @@ DEFINE_EXCEPTION_CLASS(InvalidNetstringException); /** * Helper functions for reading/writing messages in the netstring format. - * See http://cr.yp.to/proto/netstrings.txt for details. + * + * @see http://cr.yp.to/proto/netstrings.txt * * @ingroup jsonrpc */