From ff0af9d65ee65991e982ffefc12901ec717824df Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 17 Sep 2012 14:47:43 +0200 Subject: [PATCH] Fixed more doxygen warnings. --- docs/Doxyfile.in | 2 +- lib/base/application.h | 6 ++++++ lib/base/asynctask.h | 5 +++++ lib/base/dynamicobject.cpp | 10 ---------- lib/base/dynamicobject.h | 9 +++------ lib/base/logger.cpp | 11 +++++++++++ lib/base/logger.h | 14 ++++++++++---- lib/config/configcompiler.h | 6 ++++++ lib/config/configitem.h | 6 ++++++ lib/config/configitembuilder.h | 6 ++++++ lib/config/debuginfo.h | 5 +++++ lib/config/expression.h | 10 ++++++++++ lib/config/expressionlist.h | 5 +++++ lib/remoting/endpoint.cpp | 34 ++++++++++++++++++++++++++++++++++ 14 files changed, 108 insertions(+), 21 deletions(-) diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 90be6a95b..2939d3bda 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -694,7 +694,7 @@ EXCLUDE_SYMLINKS = NO # against the file with absolute path, so to exclude all test directories # 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 # (namespaces, classes, functions, etc.) that should be excluded from the diff --git a/lib/base/application.h b/lib/base/application.h index e91af95d8..6bcff1bb2 100644 --- a/lib/base/application.h +++ b/lib/base/application.h @@ -41,6 +41,12 @@ public: 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& args) = 0; static void Shutdown(void); diff --git a/lib/base/asynctask.h b/lib/base/asynctask.h index b953b854f..66d438be3 100644 --- a/lib/base/asynctask.h +++ b/lib/base/asynctask.h @@ -118,6 +118,11 @@ public: } 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; private: diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index 60471c288..768ead8fd 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -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 { return Get("__type"); diff --git a/lib/base/dynamicobject.h b/lib/base/dynamicobject.h index 42619e29b..e2e465263 100644 --- a/lib/base/dynamicobject.h +++ b/lib/base/dynamicobject.h @@ -51,9 +51,9 @@ enum DynamicAttributeType */ struct DynamicAttribute { - Value Data; - DynamicAttributeType Type; - double Tx; + Value Data; /**< The current value of the attribute. */ + DynamicAttributeType Type; /**< The type of the attribute. */ + double Tx; /**< The timestamp of the last value change. */ }; /** @@ -93,9 +93,6 @@ public: void ClearAttributesByType(DynamicAttributeType type); - AttributeConstIterator AttributeBegin(void) const; - AttributeConstIterator AttributeEnd(void) const; - static boost::signal OnRegistered; static boost::signal OnUnregistered; static boost::signal&)> OnTransactionClosing; diff --git a/lib/base/logger.cpp b/lib/base/logger.cpp index 9d9f003c7..3ed277df1 100644 --- a/lib/base/logger.cpp +++ b/lib/base/logger.cpp @@ -164,3 +164,14 @@ LogSeverity Logger::StringToSeverity(const String& severity) else 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(); +} + diff --git a/lib/base/logger.h b/lib/base/logger.h index 1b642fb59..58eeae57f 100644 --- a/lib/base/logger.h +++ b/lib/base/logger.h @@ -42,10 +42,10 @@ enum LogSeverity * @ingroup base */ struct LogEntry { - double Timestamp; - LogSeverity Severity; - String Facility; - String Message; + double Timestamp; /**< The timestamp when this log entry was created. */ + LogSeverity Severity; /**< The severity of this log entry. */ + String Facility; /**< The facility this log entry belongs to. */ + String Message; /**< The log entry's message. */ }; /** @@ -59,6 +59,12 @@ public: typedef shared_ptr Ptr; typedef weak_ptr 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; protected: diff --git a/lib/config/configcompiler.h b/lib/config/configcompiler.h index 782597a33..ef4c572a9 100644 --- a/lib/config/configcompiler.h +++ b/lib/config/configcompiler.h @@ -23,6 +23,12 @@ 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 { public: diff --git a/lib/config/configitem.h b/lib/config/configitem.h index 699d379ee..0c1307dca 100644 --- a/lib/config/configitem.h +++ b/lib/config/configitem.h @@ -23,6 +23,12 @@ namespace icinga { +/** + * A configuration item. Can be used to create a configuration object at + * runtime. + * + * @ingroup config + */ class I2_CONFIG_API ConfigItem : public Object { public: typedef shared_ptr Ptr; diff --git a/lib/config/configitembuilder.h b/lib/config/configitembuilder.h index b1e46045c..9bd887b60 100644 --- a/lib/config/configitembuilder.h +++ b/lib/config/configitembuilder.h @@ -23,6 +23,12 @@ namespace icinga { +/** + * Config item builder. Used to dynamically build configuration objects + * at runtime. + * + * @ingroup config + */ class I2_CONFIG_API ConfigItemBuilder : public Object { public: diff --git a/lib/config/debuginfo.h b/lib/config/debuginfo.h index c6999a9bb..984c378aa 100644 --- a/lib/config/debuginfo.h +++ b/lib/config/debuginfo.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * Debug information for a configuration element. + * + * @ingroup config + */ struct DebugInfo { String Path; diff --git a/lib/config/expression.h b/lib/config/expression.h index b239b7b53..533b0979f 100644 --- a/lib/config/expression.h +++ b/lib/config/expression.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * The operator in a configuration expression. + * + * @ingroup config + */ enum ExpressionOperator { OperatorExecute, @@ -33,6 +38,11 @@ enum ExpressionOperator OperatorDivide }; +/** + * A configuration expression. + * + * @ingroup config + */ struct I2_CONFIG_API Expression { public: diff --git a/lib/config/expressionlist.h b/lib/config/expressionlist.h index 9869b60bf..a4f29fcf0 100644 --- a/lib/config/expressionlist.h +++ b/lib/config/expressionlist.h @@ -23,6 +23,11 @@ namespace icinga { +/** + * A list of configuration expressions. + * + * @ingroup config + */ class I2_CONFIG_API ExpressionList : public Object { public: diff --git a/lib/remoting/endpoint.cpp b/lib/remoting/endpoint.cpp index 0de95603d..c2dcb775d 100644 --- a/lib/remoting/endpoint.cpp +++ b/lib/remoting/endpoint.cpp @@ -28,6 +28,11 @@ boost::signal Endpoint::OnDisconnected; boost::signal Endpoint::OnSubscriptionRegistered; boost::signal Endpoint::OnSubscriptionUnregistered; +/** + * Constructor for the Endpoint class. + * + * @param properties A serialized dictionary containing attributes. + */ Endpoint::Endpoint(const Dictionary::Ptr& serializedUpdate) : DynamicObject(serializedUpdate) { @@ -38,11 +43,23 @@ Endpoint::Endpoint(const Dictionary::Ptr& serializedUpdate) 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) { 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) { DynamicObject::Ptr configObject = DynamicObject::GetObject("Endpoint", name); @@ -53,6 +70,13 @@ Endpoint::Ptr Endpoint::GetByName(const String& name) return dynamic_pointer_cast(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) { ConfigItemBuilder::Ptr endpointConfig = boost::make_shared(); @@ -334,11 +358,21 @@ void Endpoint::ClientClosedHandler(void) OnDisconnected(GetSelf()); } +/** + * Gets the node address for this endpoint. + * + * @returns The node address (hostname). + */ String Endpoint::GetNode(void) const { return Get("node"); } +/** + * Gets the service name for this endpoint. + * + * @returns The service name (port). + */ String Endpoint::GetService(void) const { return Get("service"); -- 2.40.0