Fixed more doxygen warnings.

This commit is contained in:
Gunnar Beutner 2012-09-17 14:47:43 +02:00
parent fee4246f55
commit ff0af9d65e
14 changed files with 108 additions and 21 deletions

View File

@ -694,7 +694,7 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories # against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/* # for example use the pattern */test/*
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS = */lib/config/config_parser* */lib/config/config_lexer*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the

View File

@ -41,6 +41,12 @@ public:
int Run(int argc, char **argv); int Run(int argc, char **argv);
/**
* Starts the application.
*
* @param args Arguments for the application.
* @returns The exit code of the application.
*/
virtual int Main(const vector<String>& args) = 0; virtual int Main(const vector<String>& args) = 0;
static void Shutdown(void); static void Shutdown(void);

View File

@ -118,6 +118,11 @@ public:
} }
protected: protected:
/**
* Begins executing the task. The Run method must ensure
* that one of the Finish*() functions is executed on the task
* object (possibly after the Run method has returned).
*/
virtual void Run(void) = 0; virtual void Run(void) = 0;
private: private:

View File

@ -214,16 +214,6 @@ void DynamicObject::ClearAttributesByType(DynamicAttributeType type)
} }
} }
DynamicObject::AttributeConstIterator DynamicObject::AttributeBegin(void) const
{
return m_Attributes.begin();
}
DynamicObject::AttributeConstIterator DynamicObject::AttributeEnd(void) const
{
return m_Attributes.end();
}
String DynamicObject::GetType(void) const String DynamicObject::GetType(void) const
{ {
return Get("__type"); return Get("__type");

View File

@ -51,9 +51,9 @@ enum DynamicAttributeType
*/ */
struct DynamicAttribute struct DynamicAttribute
{ {
Value Data; Value Data; /**< The current value of the attribute. */
DynamicAttributeType Type; DynamicAttributeType Type; /**< The type of the attribute. */
double Tx; double Tx; /**< The timestamp of the last value change. */
}; };
/** /**
@ -93,9 +93,6 @@ public:
void ClearAttributesByType(DynamicAttributeType type); void ClearAttributesByType(DynamicAttributeType type);
AttributeConstIterator AttributeBegin(void) const;
AttributeConstIterator AttributeEnd(void) const;
static boost::signal<void (const DynamicObject::Ptr&)> OnRegistered; static boost::signal<void (const DynamicObject::Ptr&)> OnRegistered;
static boost::signal<void (const DynamicObject::Ptr&)> OnUnregistered; static boost::signal<void (const DynamicObject::Ptr&)> OnUnregistered;
static boost::signal<void (const set<DynamicObject::Ptr>&)> OnTransactionClosing; static boost::signal<void (const set<DynamicObject::Ptr>&)> OnTransactionClosing;

View File

@ -164,3 +164,14 @@ LogSeverity Logger::StringToSeverity(const String& severity)
else else
throw_exception(invalid_argument("Invalid severity: " + severity)); throw_exception(invalid_argument("Invalid severity: " + severity));
} }
/**
* Retrieves the configuration object that belongs to this logger.
*
* @returns The configuration object.
*/
DynamicObject::Ptr ILogger::GetConfig(void) const
{
return m_Config->GetSelf();
}

View File

@ -42,10 +42,10 @@ enum LogSeverity
* @ingroup base * @ingroup base
*/ */
struct LogEntry { struct LogEntry {
double Timestamp; double Timestamp; /**< The timestamp when this log entry was created. */
LogSeverity Severity; LogSeverity Severity; /**< The severity of this log entry. */
String Facility; String Facility; /**< The facility this log entry belongs to. */
String Message; String Message; /**< The log entry's message. */
}; };
/** /**
@ -59,6 +59,12 @@ public:
typedef shared_ptr<ILogger> Ptr; typedef shared_ptr<ILogger> Ptr;
typedef weak_ptr<ILogger> WeakPtr; typedef weak_ptr<ILogger> WeakPtr;
/**
* Processes the log entry and writes it to the log that is
* represented by this ILogger object.
*
* @param entry The log entry that is to be processed.
*/
virtual void ProcessLogEntry(const LogEntry& entry) = 0; virtual void ProcessLogEntry(const LogEntry& entry) = 0;
protected: protected:

View File

@ -23,6 +23,12 @@
namespace icinga namespace icinga
{ {
/**
* The configuration compiler can be used to compile a configuration file
* into a number of configuration objects.
*
* @ingroup config
*/
class I2_CONFIG_API ConfigCompiler class I2_CONFIG_API ConfigCompiler
{ {
public: public:

View File

@ -23,6 +23,12 @@
namespace icinga namespace icinga
{ {
/**
* A configuration item. Can be used to create a configuration object at
* runtime.
*
* @ingroup config
*/
class I2_CONFIG_API ConfigItem : public Object { class I2_CONFIG_API ConfigItem : public Object {
public: public:
typedef shared_ptr<ConfigItem> Ptr; typedef shared_ptr<ConfigItem> Ptr;

View File

@ -23,6 +23,12 @@
namespace icinga namespace icinga
{ {
/**
* Config item builder. Used to dynamically build configuration objects
* at runtime.
*
* @ingroup config
*/
class I2_CONFIG_API ConfigItemBuilder : public Object class I2_CONFIG_API ConfigItemBuilder : public Object
{ {
public: public:

View File

@ -23,6 +23,11 @@
namespace icinga namespace icinga
{ {
/**
* Debug information for a configuration element.
*
* @ingroup config
*/
struct DebugInfo struct DebugInfo
{ {
String Path; String Path;

View File

@ -23,6 +23,11 @@
namespace icinga namespace icinga
{ {
/**
* The operator in a configuration expression.
*
* @ingroup config
*/
enum ExpressionOperator enum ExpressionOperator
{ {
OperatorExecute, OperatorExecute,
@ -33,6 +38,11 @@ enum ExpressionOperator
OperatorDivide OperatorDivide
}; };
/**
* A configuration expression.
*
* @ingroup config
*/
struct I2_CONFIG_API Expression struct I2_CONFIG_API Expression
{ {
public: public:

View File

@ -23,6 +23,11 @@
namespace icinga namespace icinga
{ {
/**
* A list of configuration expressions.
*
* @ingroup config
*/
class I2_CONFIG_API ExpressionList : public Object class I2_CONFIG_API ExpressionList : public Object
{ {
public: public:

View File

@ -28,6 +28,11 @@ boost::signal<void (const Endpoint::Ptr&)> Endpoint::OnDisconnected;
boost::signal<void (const Endpoint::Ptr&, const String& topic)> Endpoint::OnSubscriptionRegistered; boost::signal<void (const Endpoint::Ptr&, const String& topic)> Endpoint::OnSubscriptionRegistered;
boost::signal<void (const Endpoint::Ptr&, const String& topic)> Endpoint::OnSubscriptionUnregistered; boost::signal<void (const Endpoint::Ptr&, const String& topic)> Endpoint::OnSubscriptionUnregistered;
/**
* Constructor for the Endpoint class.
*
* @param properties A serialized dictionary containing attributes.
*/
Endpoint::Endpoint(const Dictionary::Ptr& serializedUpdate) Endpoint::Endpoint(const Dictionary::Ptr& serializedUpdate)
: DynamicObject(serializedUpdate) : DynamicObject(serializedUpdate)
{ {
@ -38,11 +43,23 @@ Endpoint::Endpoint(const Dictionary::Ptr& serializedUpdate)
RegisterAttribute("client", Attribute_Transient); RegisterAttribute("client", Attribute_Transient);
} }
/**
* Checks whether an endpoint with the specified name exists.
*
* @param name The name of the endpoint.
* @returns true if the endpoint exists, false otherwise.
*/
bool Endpoint::Exists(const String& name) bool Endpoint::Exists(const String& name)
{ {
return (DynamicObject::GetObject("Endpoint", name)); return (DynamicObject::GetObject("Endpoint", name));
} }
/**
* Retrieves an endpoint by name.
*
* @param name The name of the endpoint.
* @returns The endpoint.
*/
Endpoint::Ptr Endpoint::GetByName(const String& name) Endpoint::Ptr Endpoint::GetByName(const String& name)
{ {
DynamicObject::Ptr configObject = DynamicObject::GetObject("Endpoint", name); DynamicObject::Ptr configObject = DynamicObject::GetObject("Endpoint", name);
@ -53,6 +70,13 @@ Endpoint::Ptr Endpoint::GetByName(const String& name)
return dynamic_pointer_cast<Endpoint>(configObject); return dynamic_pointer_cast<Endpoint>(configObject);
} }
/**
* Helper function for creating new endpoint objects.
*
* @param name The name of the new endpoint.
* @param local Whether the new endpoint should be local.
* @returns The new endpoint.
*/
Endpoint::Ptr Endpoint::MakeEndpoint(const String& name, bool local) Endpoint::Ptr Endpoint::MakeEndpoint(const String& name, bool local)
{ {
ConfigItemBuilder::Ptr endpointConfig = boost::make_shared<ConfigItemBuilder>(); ConfigItemBuilder::Ptr endpointConfig = boost::make_shared<ConfigItemBuilder>();
@ -334,11 +358,21 @@ void Endpoint::ClientClosedHandler(void)
OnDisconnected(GetSelf()); OnDisconnected(GetSelf());
} }
/**
* Gets the node address for this endpoint.
*
* @returns The node address (hostname).
*/
String Endpoint::GetNode(void) const String Endpoint::GetNode(void) const
{ {
return Get("node"); return Get("node");
} }
/**
* Gets the service name for this endpoint.
*
* @returns The service name (port).
*/
String Endpoint::GetService(void) const String Endpoint::GetService(void) const
{ {
return Get("service"); return Get("service");