Updated documentation.

This commit is contained in:
Gunnar Beutner 2012-05-18 22:21:28 +02:00
parent 11a70ab8e8
commit 257988539a
38 changed files with 159 additions and 4 deletions

View File

@ -25,6 +25,8 @@ namespace icinga
/**
* A wrapper around OS-specific condition variable functionality.
*
* @ingroup base
*/
class I2_BASE_API CondVar
{

View File

@ -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
{

View File

@ -25,6 +25,8 @@ namespace icinga
/**
* A wrapper around OS-specific mutex functionality.
*
* @ingroup base
*/
class I2_BASE_API Mutex
{

View File

@ -33,6 +33,8 @@ struct ThreadParameters
/**
* A wrapper around OS-specific thread functionality.
*
* @ingroup base
*/
class I2_BASE_API Thread
{

View File

@ -28,6 +28,8 @@ DEFINE_EXCEPTION_CLASS(ComponentLoadException);
/**
* Abstract base class for applications.
*
* @ingroup base
*/
class I2_BASE_API Application : public Object {
private:

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -29,6 +29,8 @@ class ConfigHive;
/**
* A configuration object that has arbitrary properties.
*
* @ingroup base
*/
class I2_BASE_API ConfigObject : public Dictionary
{

View File

@ -28,6 +28,8 @@ typedef map<string, Variant>::iterator DictionaryIterator;
/**
* A container that holds key-value pairs.
*
* @ingroup base
*/
class I2_BASE_API Dictionary : public Object
{

View File

@ -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

View File

@ -25,6 +25,8 @@ namespace icinga
/**
* A byte-based FIFO buffer.
*
* @ingroup base
*/
class I2_BASE_API FIFO : public Object
{

View File

@ -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)

View File

@ -27,6 +27,8 @@ DEFINE_EXCEPTION_CLASS(OutOfMemoryException);
/**
* Singleton class which implements memory allocation helpers.
*
* @ingroup base
*/
class I2_BASE_API Memory
{

View File

@ -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<Object>
{

View File

@ -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 TArgs>
class Observable
@ -47,7 +51,7 @@ public:
/**
* Adds an observer to this event.
*
* @param rhs The delegate.
* @param rhs The observer.
*/
Observable<TArgs>& operator +=(const ObserverType& rhs)
{
@ -58,7 +62,7 @@ public:
/**
* Removes an observer from this event.
*
* @param rhs The delegate.
* @param rhs The observer.
*/
Observable<TArgs>& operator -=(const ObserverType& rhs)
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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:

View File

@ -25,6 +25,8 @@ namespace icinga
/**
* A TCP socket.
*
* @ingroup base
*/
class I2_BASE_API TCPSocket : public Socket
{

View File

@ -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
{

View File

@ -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
{

View File

@ -25,6 +25,8 @@ namespace icinga
/**
* Utility functions.
*
* @ingroup base
*/
class I2_BASE_API Utility
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -20,6 +20,10 @@
#ifndef I2ICINGA_H
#define I2ICINGA_H
/**
* @defgroup icinga
*/
#include <i2-base.h>
#include <i2-jsonrpc.h>
#include <set>

View File

@ -25,6 +25,8 @@ namespace icinga
/**
* The Icinga application.
*
* @ingroup icinga
*/
class I2_ICINGA_API IcingaApplication : public Application
{

View File

@ -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
{

View File

@ -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:

View File

@ -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<NewRequestEventArgs> Ptr;
@ -34,6 +39,8 @@ struct I2_ICINGA_API NewRequestEventArgs : public EventArgs
/**
* A local endpoint.
*
* @ingroup icinga
*/
class I2_ICINGA_API VirtualEndpoint : public Endpoint
{

View File

@ -20,6 +20,10 @@
#ifndef I2JSONRPC_H
#define I2JSONRPC_H
/**
* @defgroup jsonrpc JSON-RPC
*/
#include <map>
#include <i2-base.h>

View File

@ -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<NewMessageEventArgs> 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:

View File

@ -23,6 +23,11 @@
namespace icinga
{
/**
* A JSON-RPC server.
*
* @ingroup jsonrpc
*/
class I2_JSONRPC_API JsonRpcServer : public TCPServer
{
public:

View File

@ -27,6 +27,11 @@ namespace icinga
typedef ::cJSON json_t;
/**
* A part of an RPC message.
*
* @ingroup jsonrpc
*/
class I2_JSONRPC_API MessagePart
{
private:

View File

@ -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:

View File

@ -23,6 +23,11 @@
namespace icinga
{
/**
* A JSON-RPC request message.
*
* @ingroup jsonrpc
*/
class I2_JSONRPC_API RpcRequest : public MessagePart
{

View File

@ -23,6 +23,11 @@
namespace icinga
{
/**
* A JSON-RPC response message.
*
* @ingroup jsonrpc
*/
class I2_JSONRPC_API RpcResponse : public MessagePart
{
public: