fixed documentation

This commit is contained in:
john30
2014-12-15 20:13:20 +01:00
parent b13e597602
commit 4e81fd842b
18 changed files with 181 additions and 139 deletions
+3 -3
View File
@@ -29,7 +29,7 @@ using namespace std;
/** \file appl.h */
/** the available data types. */
/** @brief the available data types. */
enum DataType {
dt_none, /*!< default for __text_only__ */
dt_bool, /*!< boolean */
@@ -40,14 +40,14 @@ enum DataType {
dt_string /*!< string */
};
/** option types. */
/** @brief option types. */
enum OptionType {
ot_none, /*!< no option type is needed */
ot_optional, /*!< a value is optional */
ot_mandatory /*!< a value is mandatory */
};
/** structure for defining application options */
/** @brief structure for defining application options */
typedef struct {
/** long option name */
const char* name;
+2
View File
@@ -20,6 +20,8 @@
#ifndef LIBUTILS_DAEMON_H_
#define LIBUTILS_DAEMON_H_
/** \file daemon.h */
/**
* @brief class to daemonize a process.
*/
+3 -4
View File
@@ -59,14 +59,13 @@ int calcAreaMask(const string areas)
return mask;
}
int calcLevel(const string level)
LevelType calcLevel(const string level)
{
int m_level = event;
for (int i = 0; i < Size_of_Level; i++)
if (strcasecmp(LevelNames[i], level.c_str()) == 0)
return i;
return (LevelType)i;
return m_level;
return event;
}
+17 -9
View File
@@ -32,7 +32,7 @@ using namespace std;
/** \file logger.h */
/** available types for all subsystems */
/** @brief available types for all subsystems */
enum AreasType {
bas=0, /*!< basis */
net, /*!< network */
@@ -41,7 +41,7 @@ enum AreasType {
Size_of_Areas=4 /*!< number of possible areas */
};
/** available logging levels */
/** @brief available logging levels */
enum LevelType {
error=0, /*!< silent run, only errors will be printed */
event, /*!< only interesting message for normal use */
@@ -50,11 +50,19 @@ enum LevelType {
Size_of_Level /*!< number of possible levels */
};
/** global function to get the mask of logging areas */
/**
* @brief Calculate the mask of logging areas from string.
* @param areas the string to parse the areas from.
* @return the bit combination of @a AreasType.
*/
int calcAreaMask(const string areas);
/** global function to get calculate logging level */
int calcLevel(const string level);
/**
* @brief Calculate the log level from string.
* @param level the level as string.
* @return @a the LevelType.
*/
LevelType calcLevel(const string level);
/**
* @brief class which describes a logging message itself.
@@ -129,7 +137,7 @@ class LogSink : public Thread
public:
/**
* @brief creates a virtual logging sink.
* @param areas the logging area mask.
* @param areaMask the logging area mask.
* @param level the logging level.
*/
LogSink(const int areaMask, const int level) : m_areaMask(areaMask), m_level(level) {}
@@ -153,7 +161,7 @@ public:
/**
* @brief set the logging area mask.
* @param areas the logging area mask.
* @param areaMask the logging area mask.
*/
void setAreaMask(const int& areaMask) { m_areaMask = areaMask; }
@@ -197,7 +205,7 @@ class LogConsole : public LogSink
public:
/**
* @brief creates a console logging sink.
* @param areas the logging area mask.
* @param areaMask the logging area mask.
* @param level the logging level.
* @param name the thread name for logging sink.
*/
@@ -222,7 +230,7 @@ class LogFile : public LogSink
public:
/**
* @brief creates a log file logging sink.
* @param areas the logging area mask.
* @param areaMask the logging area mask.
* @param level the logging level.
* @param name the thread name for logging sink.
* @param file the log file.
+2
View File
@@ -23,6 +23,8 @@
#include <unistd.h>
#include <fcntl.h>
/** \file notify.h */
/**
* @brief class to notify other thread per pipe.
*/
+2
View File
@@ -23,6 +23,8 @@
#include <unistd.h>
#include <string>
/** \file tcpsocket.h */
using namespace std;
/**
+2
View File
@@ -22,6 +22,8 @@
#include <pthread.h>
/** \file thread.h */
/**
* @brief wrapper class for pthread.
*/
+3
View File
@@ -23,6 +23,8 @@
#include <list>
#include <pthread.h>
/** \file wqueue.h */
using namespace std;
/**
@@ -110,6 +112,7 @@ public:
/**
* @brief return the first item from queue without remove.
* @param wait whether to wait for an entry if the queue is empty.
* @return the item, or NULL if no item is available and wait was false.
*/
T next(bool wait=true)