changeset 418:30e4a93f86c7

Pet doxygen a bit
author David Demelier <markand@malikania.fr>
date Thu, 08 Oct 2015 10:07:47 +0200
parents 865224c2191a
children ee155fc84c56
files C++/modules/Date/Date.cpp C++/modules/Date/Date.h C++/modules/Directory/Directory.h C++/modules/Ini/Ini.h C++/modules/Json/Json.h C++/modules/Socket/SocketSsl.h
diffstat 6 files changed, 49 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/C++/modules/Date/Date.cpp	Thu Oct 08 10:02:37 2015 +0200
+++ b/C++/modules/Date/Date.cpp	Thu Oct 08 10:07:47 2015 +0200
@@ -28,10 +28,6 @@
 	m_timestamp = timestamp;
 }
 
-Date::~Date()
-{
-}
-
 std::string Date::format(const std::string &format)
 {
 	char buffer[512];
--- a/C++/modules/Date/Date.h	Thu Oct 08 10:02:37 2015 +0200
+++ b/C++/modules/Date/Date.h	Thu Oct 08 10:07:47 2015 +0200
@@ -21,7 +21,7 @@
 
 /**
  * @file Date.h
- * @brief Basic date management
+ * @brief Basic date management.
  */
 
 #include <cstdint>
@@ -30,15 +30,24 @@
 
 /**
  * @class Date
+ * @brief Basic date class and format.
  */
 class Date {
 private:
 	time_t m_timestamp;
 
 public:
+	/**
+	 * Default constructor to the current date.
+	 */
 	Date();
+
+	/**
+	 * Date with specific timestamp.
+	 *
+	 * @param timestamp the timestamp
+	 */
 	Date(time_t timestamp);
-	~Date();
 
 	/**
 	 * Get the timestamp.
@@ -60,8 +69,22 @@
 	std::string format(const std::string &format);
 };
 
-bool operator==(const Date &, const Date &);
+/**
+ * Check is two dates are identical.
+ *
+ * @param d1 the first date
+ * @param d2 the second date
+ * @return true if same
+ */
+bool operator==(const Date &d1, const Date &d2);
 
-bool operator<=(const Date &, const Date &);
+/**
+ * Check is a date is less or equal the second date.
+ *
+ * @param d1 the first date
+ * @param d2 the second date
+ * @return true if d1 <= d2
+ */
+bool operator<=(const Date &d1, const Date &d2);
 
 #endif // !_DATE_H_
--- a/C++/modules/Directory/Directory.h	Thu Oct 08 10:02:37 2015 +0200
+++ b/C++/modules/Directory/Directory.h	Thu Oct 08 10:07:47 2015 +0200
@@ -30,7 +30,6 @@
 class DirectoryEntry {
 public:
 	/**
-	 * @enum Type
 	 * @brief Describe the type of an entry
 	 */
 	enum {
--- a/C++/modules/Ini/Ini.h	Thu Oct 08 10:02:37 2015 +0200
+++ b/C++/modules/Ini/Ini.h	Thu Oct 08 10:07:47 2015 +0200
@@ -320,7 +320,7 @@
 };
 
 /**
- * @class Ini
+ * @class Document
  * @brief Ini config file loader
  */
 class Document {
--- a/C++/modules/Json/Json.h	Thu Oct 08 10:02:37 2015 +0200
+++ b/C++/modules/Json/Json.h	Thu Oct 08 10:07:47 2015 +0200
@@ -35,6 +35,9 @@
 #include <utility>
 #include <deque>
 
+/**
+ * Json namespace.
+ */
 namespace json {
 
 /**
@@ -63,6 +66,15 @@
 	int column{0};		//!< The column
 	int position{0};	//!< The position
 
+	/**
+	 * Create the error.
+	 *
+	 * @param ptext the text message
+	 * @param psource the source (e.g. file name)
+	 * @param pline the line number
+	 * @param pcolumn the column number
+	 * @param pposition the position
+	 */
 	inline Error(std::string ptext, std::string psource, int pline, int pcolumn, int pposition) noexcept
 		: text{std::move(ptext)}
 		, source{std::move(psource)}
@@ -72,6 +84,11 @@
 	{
 	}
 
+	/**
+	 * Get the error message.
+	 *
+	 * @return the message
+	 */
 	const char *what() const noexcept override
 	{
 		return text.c_str();
@@ -87,6 +104,9 @@
  */
 class Value {
 protected:
+	/**
+	 * Type of value.
+	 */
 	Type m_type;
 
 	union {
--- a/C++/modules/Socket/SocketSsl.h	Thu Oct 08 10:02:37 2015 +0200
+++ b/C++/modules/Socket/SocketSsl.h	Thu Oct 08 10:07:47 2015 +0200
@@ -58,7 +58,7 @@
 	};
 
 	int method{TLSv1};		//!< The method
-	std::string certificate;		//!< The certificate path
+	std::string certificate;	//!< The certificate path
 	std::string privateKey;		//!< The private key file
 	bool verify{false};		//!< Verify or not