/**
* A wrapper around OS-specific condition variable functionality.
+ *
+ * @ingroup base
*/
class I2_BASE_API CondVar
{
/**
* A lock that is held on a mutex and automatically released when the Lock
* object is destroyed.
+ *
+ * @ingroup base
*/
class I2_BASE_API Lock
{
/**
* A wrapper around OS-specific mutex functionality.
+ *
+ * @ingroup base
*/
class I2_BASE_API Mutex
{
/**
* A wrapper around OS-specific thread functionality.
+ *
+ * @ingroup base
*/
class I2_BASE_API Thread
{
/**
* Abstract base class for applications.
+ *
+ * @ingroup base
*/
class I2_BASE_API Application : public Object {
private:
/**
* An application extension that can be dynamically loaded
* at run-time.
+ *
+ * @ingroup base
*/
class I2_BASE_API Component : public Object
{
/**
* A collection of configuration objects that each have the same type.
+ *
+ * @ingroup base
*/
class I2_BASE_API ConfigCollection : public Object
{
/**
* A collection of all configuration objects that belong to an application.
+ *
+ * @ingroup base
*/
class I2_BASE_API ConfigHive : public Object
{
/**
* A configuration object that has arbitrary properties.
+ *
+ * @ingroup base
*/
class I2_BASE_API ConfigObject : public Dictionary
{
/**
* A container that holds key-value pairs.
+ *
+ * @ingroup base
*/
class I2_BASE_API Dictionary : public Object
{
/**
* Base class for all exceptions.
+ *
+ * @ingroup base
*/
class I2_BASE_API Exception : exception
{
} \
}
+/**
+ * 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
/**
* A byte-based FIFO buffer.
+ *
+ * @ingroup base
*/
class I2_BASE_API FIFO : public Object
{
#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)
/**
* Singleton class which implements memory allocation helpers.
+ *
+ * @ingroup base
*/
class I2_BASE_API Memory
{
/**
* 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>
{
/**
* Base class for event arguments.
+ *
+ * @ingroup base
*/
struct I2_BASE_API EventArgs
{
/**
* An observable event. Observers can be registered for it.
+ *
+ * @ingroup base
*/
template<class TArgs>
class Observable
/**
* Adds an observer to this event.
*
- * @param rhs The delegate.
+ * @param rhs The observer.
*/
Observable<TArgs>& operator +=(const ObserverType& rhs)
{
/**
* Removes an observer from this event.
*
- * @param rhs The delegate.
+ * @param rhs The observer.
*/
Observable<TArgs>& operator -=(const ObserverType& rhs)
{
/**
* Event arguments for socket errors.
+ *
+ * @ingroup base
*/
struct I2_BASE_API SocketErrorEventArgs : public EventArgs
{
/**
* Base class for sockets.
+ *
+ * @ingroup base
*/
class I2_BASE_API Socket : public Object
{
/**
* The role of a TCP client object.
+ *
+ * @ingroup base
*/
enum I2_BASE_API TCPClientRole
{
/**
* A TCP client connection.
+ *
+ * @ingroup base
*/
class I2_BASE_API TCPClient : public TCPSocket
{
/**
* Event arguments for the "new client" event.
+ *
+ * @ingroup base
*/
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:
/**
* A TCP socket.
+ *
+ * @ingroup base
*/
class I2_BASE_API TCPSocket : public Socket
{
/**
* Event arguments for the "timer expired" event.
+ *
+ * @ingroup base
*/
struct I2_BASE_API TimerEventArgs : public EventArgs
{
/**
* A timer that periodically triggers an event.
+ *
+ * @ingroup base
*/
class I2_BASE_API Timer : public Object
{
/**
* Event arguments for the "SSL certificate verification" event.
+ *
+ * @ingroup base
*/
struct I2_BASE_API VerifyCertificateEventArgs : public EventArgs
{
/**
* A TLS client connection.
+ *
+ * @ingroup base
*/
class I2_BASE_API TLSClient : public TCPClient
{
/**
* Utility functions.
+ *
+ * @ingroup base
*/
class I2_BASE_API Utility
{
/**
* The type of a Variant object.
+ *
+ * @ingroup base
*/
enum I2_BASE_API VariantType
{
/**
* A type that can hold an arbitrary value.
+ *
+ * @ingroup base
*/
class I2_BASE_API Variant
{
/**
* An endpoint that can be used to send and receive messages.
+ *
+ * @ingroup icinga
*/
class I2_ICINGA_API Endpoint : public Object
{
/**
* Event arguments for the "new endpoint registered" event.
+ *
+ * @ingroup icinga
*/
struct I2_ICINGA_API NewEndpointEventArgs : public EventArgs
{
/**
* Forwards messages between endpoints.
+ *
+ * @ingroup icinga
*/
class I2_ICINGA_API EndpointManager : public Object
{
#ifndef I2ICINGA_H
#define I2ICINGA_H
+/**
+ * @defgroup icinga
+ */
+
#include <i2-base.h>
#include <i2-jsonrpc.h>
#include <set>
/**
* The Icinga application.
+ *
+ * @ingroup icinga
*/
class I2_ICINGA_API IcingaApplication : public Application
{
/**
* A component that can be loaded into the Icinga application at run-time.
+ *
+ * @ingroup icinga
*/
class I2_ICINGA_API IcingaComponent : public Component
{
/**
* 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:
namespace icinga
{
+/**
+ * Event arguments for the "new request" event.
+ *
+ * @ingroup icinga
+ */
struct I2_ICINGA_API NewRequestEventArgs : public EventArgs
{
typedef shared_ptr<NewRequestEventArgs> Ptr;
/**
* A local endpoint.
+ *
+ * @ingroup icinga
*/
class I2_ICINGA_API VirtualEndpoint : public Endpoint
{
#ifndef I2JSONRPC_H
#define I2JSONRPC_H
+/**
+ * @defgroup jsonrpc JSON-RPC
+ */
+
#include <map>
#include <i2-base.h>
namespace icinga
{
+/**
+ * Event arguments for the "new message" event.
+ *
+ * @ingroup jsonrpc
+ */
struct I2_JSONRPC_API NewMessageEventArgs : public EventArgs
{
typedef shared_ptr<NewMessageEventArgs> Ptr;
icinga::MessagePart Message;
};
+/**
+ * A JSON-RPC client.
+ *
+ * @ingroup jsonrpc
+ */
class I2_JSONRPC_API JsonRpcClient : public TLSClient
{
private:
namespace icinga
{
+/**
+ * A JSON-RPC server.
+ *
+ * @ingroup jsonrpc
+ */
class I2_JSONRPC_API JsonRpcServer : public TCPServer
{
public:
typedef ::cJSON json_t;
+/**
+ * A part of an RPC message.
+ *
+ * @ingroup jsonrpc
+ */
class I2_JSONRPC_API MessagePart
{
private:
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:
namespace icinga
{
+/**
+ * A JSON-RPC request message.
+ *
+ * @ingroup jsonrpc
+ */
class I2_JSONRPC_API RpcRequest : public MessagePart
{
namespace icinga
{
+/**
+ * A JSON-RPC response message.
+ *
+ * @ingroup jsonrpc
+ */
class I2_JSONRPC_API RpcResponse : public MessagePart
{
public: