fixed documentation
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef LIBUTILS_DAEMON_H_
|
||||
#define LIBUTILS_DAEMON_H_
|
||||
|
||||
/** \file daemon.h */
|
||||
|
||||
/**
|
||||
* @brief class to daemonize a process.
|
||||
*/
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/** \file notify.h */
|
||||
|
||||
/**
|
||||
* @brief class to notify other thread per pipe.
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
/** \file tcpsocket.h */
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/** \file thread.h */
|
||||
|
||||
/**
|
||||
* @brief wrapper class for pthread.
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user