From 257988539aff1feaed44ae7c5239a76057ee46ef Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 18 May 2012 22:21:28 +0200 Subject: [PATCH] Updated documentation. --- attic/condvar.h | 2 ++ attic/lock.h | 2 ++ attic/mutex.h | 2 ++ attic/thread.h | 2 ++ base/application.h | 2 ++ base/component.h | 2 ++ base/configcollection.h | 2 ++ base/confighive.h | 2 ++ base/configobject.h | 2 ++ base/dictionary.h | 2 ++ base/exception.h | 22 ++++++++++++++++++++++ base/fifo.h | 2 ++ base/i2-base.h | 10 ++++++++++ base/memory.h | 2 ++ base/object.h | 2 ++ base/observable.h | 8 ++++++-- base/socket.h | 4 ++++ base/tcpclient.h | 4 ++++ base/tcpserver.h | 7 ++++++- base/tcpsocket.h | 2 ++ base/timer.h | 4 ++++ base/tlsclient.h | 4 ++++ base/utility.h | 2 ++ base/variant.h | 4 ++++ icinga/endpoint.h | 2 ++ icinga/endpointmanager.h | 4 ++++ icinga/i2-icinga.h | 4 ++++ icinga/icingaapplication.h | 2 ++ icinga/icingacomponent.h | 2 ++ icinga/jsonrpcendpoint.h | 5 ++++- icinga/virtualendpoint.h | 7 +++++++ jsonrpc/i2-jsonrpc.h | 4 ++++ jsonrpc/jsonrpcclient.h | 10 ++++++++++ jsonrpc/jsonrpcserver.h | 5 +++++ jsonrpc/messagepart.h | 5 +++++ jsonrpc/netstring.h | 6 ++++++ jsonrpc/rpcrequest.h | 5 +++++ jsonrpc/rpcresponse.h | 5 +++++ 38 files changed, 159 insertions(+), 4 deletions(-) diff --git a/attic/condvar.h b/attic/condvar.h index b8cbcd41b..d768fe7b2 100644 --- a/attic/condvar.h +++ b/attic/condvar.h @@ -25,6 +25,8 @@ namespace icinga /** * A wrapper around OS-specific condition variable functionality. + * + * @ingroup base */ class I2_BASE_API CondVar { diff --git a/attic/lock.h b/attic/lock.h index 62db329d4..a5e7894c8 100644 --- a/attic/lock.h +++ b/attic/lock.h @@ -26,6 +26,8 @@ namespace icinga /** * A lock that is held on a mutex and automatically released when the Lock * object is destroyed. + * + * @ingroup base */ class I2_BASE_API Lock { diff --git a/attic/mutex.h b/attic/mutex.h index 8c48b487a..cdc65da74 100644 --- a/attic/mutex.h +++ b/attic/mutex.h @@ -25,6 +25,8 @@ namespace icinga /** * A wrapper around OS-specific mutex functionality. + * + * @ingroup base */ class I2_BASE_API Mutex { diff --git a/attic/thread.h b/attic/thread.h index 7f3237025..8e9928068 100644 --- a/attic/thread.h +++ b/attic/thread.h @@ -33,6 +33,8 @@ struct ThreadParameters /** * A wrapper around OS-specific thread functionality. + * + * @ingroup base */ class I2_BASE_API Thread { diff --git a/base/application.h b/base/application.h index 1bec71194..6fce49614 100644 --- a/base/application.h +++ b/base/application.h @@ -28,6 +28,8 @@ DEFINE_EXCEPTION_CLASS(ComponentLoadException); /** * Abstract base class for applications. + * + * @ingroup base */ class I2_BASE_API Application : public Object { private: diff --git a/base/component.h b/base/component.h index a1eda5e58..b5d260294 100644 --- a/base/component.h +++ b/base/component.h @@ -26,6 +26,8 @@ namespace icinga /** * An application extension that can be dynamically loaded * at run-time. + * + * @ingroup base */ class I2_BASE_API Component : public Object { diff --git a/base/configcollection.h b/base/configcollection.h index a37332ab1..21db9af4f 100644 --- a/base/configcollection.h +++ b/base/configcollection.h @@ -27,6 +27,8 @@ class ConfigHive; /** * A collection of configuration objects that each have the same type. + * + * @ingroup base */ class I2_BASE_API ConfigCollection : public Object { diff --git a/base/confighive.h b/base/confighive.h index 0bb3b708a..57e384869 100644 --- a/base/confighive.h +++ b/base/confighive.h @@ -25,6 +25,8 @@ namespace icinga /** * A collection of all configuration objects that belong to an application. + * + * @ingroup base */ class I2_BASE_API ConfigHive : public Object { diff --git a/base/configobject.h b/base/configobject.h index 9f9bdeec7..3056e52f2 100644 --- a/base/configobject.h +++ b/base/configobject.h @@ -29,6 +29,8 @@ class ConfigHive; /** * A configuration object that has arbitrary properties. + * + * @ingroup base */ class I2_BASE_API ConfigObject : public Dictionary { diff --git a/base/dictionary.h b/base/dictionary.h index 9891335e5..58d35911a 100644 --- a/base/dictionary.h +++ b/base/dictionary.h @@ -28,6 +28,8 @@ typedef map::iterator DictionaryIterator; /** * A container that holds key-value pairs. + * + * @ingroup base */ class I2_BASE_API Dictionary : public Object { diff --git a/base/exception.h b/base/exception.h index b3638a15b..a85b039ba 100644 --- a/base/exception.h +++ b/base/exception.h @@ -25,6 +25,8 @@ namespace icinga /** * Base class for all exceptions. + * + * @ingroup base */ class I2_BASE_API Exception : exception { @@ -65,8 +67,28 @@ public: } \ } +/** + * An exception that is thrown when a certain feature + * is not implemented. + * + * @ingroup base + */ DEFINE_EXCEPTION_CLASS(NotImplementedException); + +/** + * An exception that is thrown when an argument to + * a function is invalid. + * + * @ingroup base + */ DEFINE_EXCEPTION_CLASS(InvalidArgumentException); + +/** + * An exception that is thrown when a cast yields + * an invalid result. + * + * @ingroup base + */ DEFINE_EXCEPTION_CLASS(InvalidCastException); #ifdef _WIN32 diff --git a/base/fifo.h b/base/fifo.h index 689505d8e..c0a289d00 100644 --- a/base/fifo.h +++ b/base/fifo.h @@ -25,6 +25,8 @@ namespace icinga /** * A byte-based FIFO buffer. + * + * @ingroup base */ class I2_BASE_API FIFO : public Object { diff --git a/base/i2-base.h b/base/i2-base.h index 2b6003128..dea64ff24 100644 --- a/base/i2-base.h +++ b/base/i2-base.h @@ -20,6 +20,16 @@ #ifndef I2BASE_H #define I2BASE_H +/** + * @mainpage Foo + */ + +/** + * @defgroup base Base class library + * + * Hello World. + */ + #ifdef _MSC_VER # define HAVE_CXX11 # pragma warning(disable:4251) diff --git a/base/memory.h b/base/memory.h index dbec56a2a..fc3f2dec8 100644 --- a/base/memory.h +++ b/base/memory.h @@ -27,6 +27,8 @@ DEFINE_EXCEPTION_CLASS(OutOfMemoryException); /** * Singleton class which implements memory allocation helpers. + * + * @ingroup base */ class I2_BASE_API Memory { diff --git a/base/object.h b/base/object.h index cf054a77c..5405a616b 100644 --- a/base/object.h +++ b/base/object.h @@ -26,6 +26,8 @@ namespace icinga /** * Base class for all heap-allocated objects. At least one of its methods * has to be virtual for RTTI to work. + * + * @ingroup base */ class I2_BASE_API Object : public enable_shared_from_this { diff --git a/base/observable.h b/base/observable.h index c9edfd893..6cdab8223 100644 --- a/base/observable.h +++ b/base/observable.h @@ -25,6 +25,8 @@ namespace icinga /** * Base class for event arguments. + * + * @ingroup base */ struct I2_BASE_API EventArgs { @@ -33,6 +35,8 @@ struct I2_BASE_API EventArgs /** * An observable event. Observers can be registered for it. + * + * @ingroup base */ template class Observable @@ -47,7 +51,7 @@ public: /** * Adds an observer to this event. * - * @param rhs The delegate. + * @param rhs The observer. */ Observable& operator +=(const ObserverType& rhs) { @@ -58,7 +62,7 @@ public: /** * Removes an observer from this event. * - * @param rhs The delegate. + * @param rhs The observer. */ Observable& operator -=(const ObserverType& rhs) { diff --git a/base/socket.h b/base/socket.h index a222913df..c0115b014 100644 --- a/base/socket.h +++ b/base/socket.h @@ -24,6 +24,8 @@ namespace icinga { /** * Event arguments for socket errors. + * + * @ingroup base */ struct I2_BASE_API SocketErrorEventArgs : public EventArgs { @@ -33,6 +35,8 @@ struct I2_BASE_API SocketErrorEventArgs : public EventArgs /** * Base class for sockets. + * + * @ingroup base */ class I2_BASE_API Socket : public Object { diff --git a/base/tcpclient.h b/base/tcpclient.h index de7ed3757..170c19346 100644 --- a/base/tcpclient.h +++ b/base/tcpclient.h @@ -25,6 +25,8 @@ namespace icinga /** * The role of a TCP client object. + * + * @ingroup base */ enum I2_BASE_API TCPClientRole { @@ -34,6 +36,8 @@ enum I2_BASE_API TCPClientRole /** * A TCP client connection. + * + * @ingroup base */ class I2_BASE_API TCPClient : public TCPSocket { diff --git a/base/tcpserver.h b/base/tcpserver.h index 370cac0d6..03e489030 100644 --- a/base/tcpserver.h +++ b/base/tcpserver.h @@ -25,6 +25,8 @@ namespace icinga /** * Event arguments for the "new client" event. + * + * @ingroup base */ struct I2_BASE_API NewClientEventArgs : public EventArgs { @@ -33,7 +35,10 @@ struct I2_BASE_API NewClientEventArgs : public EventArgs /** * A TCP server that listens on a TCP port and accepts incoming - * client connections. */ + * client connections. + * + * @ingroup base + */ class I2_BASE_API TCPServer : public TCPSocket { private: diff --git a/base/tcpsocket.h b/base/tcpsocket.h index e9b729996..14c52453c 100644 --- a/base/tcpsocket.h +++ b/base/tcpsocket.h @@ -25,6 +25,8 @@ namespace icinga /** * A TCP socket. + * + * @ingroup base */ class I2_BASE_API TCPSocket : public Socket { diff --git a/base/timer.h b/base/timer.h index 17017a9f3..2be847634 100644 --- a/base/timer.h +++ b/base/timer.h @@ -26,6 +26,8 @@ namespace icinga { /** * Event arguments for the "timer expired" event. + * + * @ingroup base */ struct I2_BASE_API TimerEventArgs : public EventArgs { @@ -34,6 +36,8 @@ struct I2_BASE_API TimerEventArgs : public EventArgs /** * A timer that periodically triggers an event. + * + * @ingroup base */ class I2_BASE_API Timer : public Object { diff --git a/base/tlsclient.h b/base/tlsclient.h index cec54277c..ed0ef637b 100644 --- a/base/tlsclient.h +++ b/base/tlsclient.h @@ -25,6 +25,8 @@ namespace icinga /** * Event arguments for the "SSL certificate verification" event. + * + * @ingroup base */ struct I2_BASE_API VerifyCertificateEventArgs : public EventArgs { @@ -37,6 +39,8 @@ struct I2_BASE_API VerifyCertificateEventArgs : public EventArgs /** * A TLS client connection. + * + * @ingroup base */ class I2_BASE_API TLSClient : public TCPClient { diff --git a/base/utility.h b/base/utility.h index 9a8462738..f2a65fbc3 100644 --- a/base/utility.h +++ b/base/utility.h @@ -25,6 +25,8 @@ namespace icinga /** * Utility functions. + * + * @ingroup base */ class I2_BASE_API Utility { diff --git a/base/variant.h b/base/variant.h index 3f10b722e..971f66e6a 100644 --- a/base/variant.h +++ b/base/variant.h @@ -25,6 +25,8 @@ namespace icinga /** * The type of a Variant object. + * + * @ingroup base */ enum I2_BASE_API VariantType { @@ -36,6 +38,8 @@ enum I2_BASE_API VariantType /** * A type that can hold an arbitrary value. + * + * @ingroup base */ class I2_BASE_API Variant { diff --git a/icinga/endpoint.h b/icinga/endpoint.h index 59f046c85..f0fe409f9 100644 --- a/icinga/endpoint.h +++ b/icinga/endpoint.h @@ -27,6 +27,8 @@ class EndpointManager; /** * An endpoint that can be used to send and receive messages. + * + * @ingroup icinga */ class I2_ICINGA_API Endpoint : public Object { diff --git a/icinga/endpointmanager.h b/icinga/endpointmanager.h index f6e322638..204579b4d 100644 --- a/icinga/endpointmanager.h +++ b/icinga/endpointmanager.h @@ -25,6 +25,8 @@ namespace icinga /** * Event arguments for the "new endpoint registered" event. + * + * @ingroup icinga */ struct I2_ICINGA_API NewEndpointEventArgs : public EventArgs { @@ -33,6 +35,8 @@ struct I2_ICINGA_API NewEndpointEventArgs : public EventArgs /** * Forwards messages between endpoints. + * + * @ingroup icinga */ class I2_ICINGA_API EndpointManager : public Object { diff --git a/icinga/i2-icinga.h b/icinga/i2-icinga.h index ba79aec35..b29133be4 100644 --- a/icinga/i2-icinga.h +++ b/icinga/i2-icinga.h @@ -20,6 +20,10 @@ #ifndef I2ICINGA_H #define I2ICINGA_H +/** + * @defgroup icinga + */ + #include #include #include diff --git a/icinga/icingaapplication.h b/icinga/icingaapplication.h index 15f903e83..0f25b4d6a 100644 --- a/icinga/icingaapplication.h +++ b/icinga/icingaapplication.h @@ -25,6 +25,8 @@ namespace icinga /** * The Icinga application. + * + * @ingroup icinga */ class I2_ICINGA_API IcingaApplication : public Application { diff --git a/icinga/icingacomponent.h b/icinga/icingacomponent.h index 06745ac92..63836a20e 100644 --- a/icinga/icingacomponent.h +++ b/icinga/icingacomponent.h @@ -25,6 +25,8 @@ namespace icinga /** * A component that can be loaded into the Icinga application at run-time. + * + * @ingroup icinga */ class I2_ICINGA_API IcingaComponent : public Component { diff --git a/icinga/jsonrpcendpoint.h b/icinga/jsonrpcendpoint.h index 5bf74de71..17fa2b44d 100644 --- a/icinga/jsonrpcendpoint.h +++ b/icinga/jsonrpcendpoint.h @@ -25,7 +25,10 @@ namespace icinga /** * A JSON-RPC endpoint that can be used to communicate with a remote - * Icinga instance. */ + * Icinga instance. + * + * @ingroup icinga + */ class I2_ICINGA_API JsonRpcEndpoint : public Endpoint { private: diff --git a/icinga/virtualendpoint.h b/icinga/virtualendpoint.h index 5222502d5..aa7d5d9bd 100644 --- a/icinga/virtualendpoint.h +++ b/icinga/virtualendpoint.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * Event arguments for the "new request" event. + * + * @ingroup icinga + */ struct I2_ICINGA_API NewRequestEventArgs : public EventArgs { typedef shared_ptr Ptr; @@ -34,6 +39,8 @@ struct I2_ICINGA_API NewRequestEventArgs : public EventArgs /** * A local endpoint. + * + * @ingroup icinga */ class I2_ICINGA_API VirtualEndpoint : public Endpoint { diff --git a/jsonrpc/i2-jsonrpc.h b/jsonrpc/i2-jsonrpc.h index 8a47c1d7b..240247a84 100644 --- a/jsonrpc/i2-jsonrpc.h +++ b/jsonrpc/i2-jsonrpc.h @@ -20,6 +20,10 @@ #ifndef I2JSONRPC_H #define I2JSONRPC_H +/** + * @defgroup jsonrpc JSON-RPC + */ + #include #include diff --git a/jsonrpc/jsonrpcclient.h b/jsonrpc/jsonrpcclient.h index 07aac91de..04a98f44f 100644 --- a/jsonrpc/jsonrpcclient.h +++ b/jsonrpc/jsonrpcclient.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * Event arguments for the "new message" event. + * + * @ingroup jsonrpc + */ struct I2_JSONRPC_API NewMessageEventArgs : public EventArgs { typedef shared_ptr Ptr; @@ -31,6 +36,11 @@ struct I2_JSONRPC_API NewMessageEventArgs : public EventArgs icinga::MessagePart Message; }; +/** + * A JSON-RPC client. + * + * @ingroup jsonrpc + */ class I2_JSONRPC_API JsonRpcClient : public TLSClient { private: diff --git a/jsonrpc/jsonrpcserver.h b/jsonrpc/jsonrpcserver.h index 76c97b006..fa7534c7f 100644 --- a/jsonrpc/jsonrpcserver.h +++ b/jsonrpc/jsonrpcserver.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * A JSON-RPC server. + * + * @ingroup jsonrpc + */ class I2_JSONRPC_API JsonRpcServer : public TCPServer { public: diff --git a/jsonrpc/messagepart.h b/jsonrpc/messagepart.h index 37517f514..0038d49c2 100644 --- a/jsonrpc/messagepart.h +++ b/jsonrpc/messagepart.h @@ -27,6 +27,11 @@ namespace icinga typedef ::cJSON json_t; +/** + * A part of an RPC message. + * + * @ingroup jsonrpc + */ class I2_JSONRPC_API MessagePart { private: diff --git a/jsonrpc/netstring.h b/jsonrpc/netstring.h index 574c12ea6..cb3154455 100644 --- a/jsonrpc/netstring.h +++ b/jsonrpc/netstring.h @@ -23,6 +23,12 @@ namespace icinga { +/** + * Utility functions for reading/writing messages in the netstring format. + * See http://cr.yp.to/proto/netstrings.txt for details. + * + * @ingroup jsonrpc + */ class I2_JSONRPC_API Netstring { private: diff --git a/jsonrpc/rpcrequest.h b/jsonrpc/rpcrequest.h index 901353285..ef0de9934 100644 --- a/jsonrpc/rpcrequest.h +++ b/jsonrpc/rpcrequest.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * A JSON-RPC request message. + * + * @ingroup jsonrpc + */ class I2_JSONRPC_API RpcRequest : public MessagePart { diff --git a/jsonrpc/rpcresponse.h b/jsonrpc/rpcresponse.h index 6d444d3d4..af26ff0f2 100644 --- a/jsonrpc/rpcresponse.h +++ b/jsonrpc/rpcresponse.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * A JSON-RPC response message. + * + * @ingroup jsonrpc + */ class I2_JSONRPC_API RpcResponse : public MessagePart { public: -- 2.40.0