doxygen @ tags replaced to \

This commit is contained in:
2022-03-14 21:19:31 +03:00
parent 9bf1a11701
commit 54b5372356
142 changed files with 1079 additions and 1079 deletions

View File

@@ -1,5 +1,5 @@
/*! @file pitimer.h
* @brief Timer
/*! \file pitimer.h
* \brief Timer
*/
/*
PIP - Platform Independent Primitives
@@ -39,7 +39,7 @@ public:
double interval() const {return interval_;}
void setInterval(double i);
//! @brief Return \c true if thread is running
//! \brief Return \c true if thread is running
bool isRunning() const {return running_;}
bool isStopped() const {return !running_;}
@@ -76,10 +76,10 @@ class PIP_EXPORT PITimer: public PIObject {
public:
NO_COPY_CLASS(PITimer)
//! @brief Constructs timer with PITimer::Thread implementation
//! \brief Constructs timer with PITimer::Thread implementation
explicit PITimer();
//! @brief Timer implementations
//! \brief Timer implementations
enum TimerImplementation {
Thread /*! Timer works in his own thread. Intervals are measured by the system time */ = 0x01,
ThreadRT /*! Using POSIX timer with SIGEV_THREAD notification. \attention Doesn`t support on Windows and Mac OS! */ = 0x02,
@@ -87,34 +87,34 @@ public:
* sequentially executes all timers. \attention Use this implementation with care! */ = 0x04
};
//! @brief Constructs timer with "ti" implementation
//! \brief Constructs timer with "ti" implementation
explicit PITimer(TimerImplementation ti);
//! @brief Constructs timer with "slot" slot void(void *,int), "data" data and "ti" implementation
//! \brief Constructs timer with "slot" slot void(void *,int), "data" data and "ti" implementation
explicit PITimer(TimerEvent slot, void * data = 0, TimerImplementation ti = Thread);
//! @brief Constructs timer with "slot" slot void(), and "ti" implementation
//! \brief Constructs timer with "slot" slot void(), and "ti" implementation
explicit PITimer(std::function<void ()> slot, TimerImplementation ti = Thread);
//! @brief Constructs timer with "slot" slot void(void *), "data" data and "ti" implementation
//! \brief Constructs timer with "slot" slot void(void *), "data" data and "ti" implementation
explicit PITimer(std::function<void (void *)> slot, void * data, TimerImplementation ti = Thread);
virtual ~PITimer();
//! @brief Returns timer implementation
//! \brief Returns timer implementation
PITimer::TimerImplementation implementation() const {return imp_mode;}
//! @brief Returns timer loop delay in milliseconds
//! \brief Returns timer loop delay in milliseconds
double interval() const;
//! @brief Set timer loop delay in milliseconds
//! \brief Set timer loop delay in milliseconds
EVENT_HANDLER1(void, setInterval, double, ms);
//! @brief Returns if timer is started
//! \brief Returns if timer is started
bool isRunning() const;
//! @brief Returns if timer is not started
//! \brief Returns if timer is not started
bool isStopped() const;
EVENT_HANDLER0(bool, start);
@@ -123,22 +123,22 @@ public:
EVENT_HANDLER0(bool, restart);
/** @brief Start timer with \b interval() loop delay after \b delay_msecs delay.
/** \brief Start timer with \b interval() loop delay after \b delay_msecs delay.
* \details Timer wait \b delay_msecs milliseconds and then normally starts with
* \b interval() loop delay. */
void startDeferred(double delay_ms);
/** @brief Start timer with \b interval_msecs loop delay after \b delay_msecs delay.
/** \brief Start timer with \b interval_msecs loop delay after \b delay_msecs delay.
* \details Timer wait \b delay_msecs milliseconds and then normally starts with
* \b interval_msecs loop delay. */
void startDeferred(double interval_ms, double delay_ms);
/** @brief Start timer with \b interval() loop delay after \b start_datetime date and time.
/** \brief Start timer with \b interval() loop delay after \b start_datetime date and time.
* \details Timer wait until \b start_datetime and then normally starts with
* \b interval() loop delay. */
void startDeferred(PIDateTime start_datetime);
/** @brief Start timer with \b interval_msecs loop delay after \b start_datetime date and time.
/** \brief Start timer with \b interval_msecs loop delay after \b start_datetime date and time.
* \details Timer wait until \b start_datetime and then normally starts with
* \b interval_msecs loop delay. */
void startDeferred(double interval_ms, PIDateTime start_datetime);
@@ -148,43 +148,43 @@ public:
bool waitForFinish() {return waitForFinish(-1);}
bool waitForFinish(int timeout_msecs);
//! @brief Set custom data
//! \brief Set custom data
void setData(void * data_) {data_t = data_;}
//! @brief Set timer tick function
//! \brief Set timer tick function
void setSlot(TimerEvent slot) {ret_func = slot;}
//! @brief Set timer tick function
//! \brief Set timer tick function
void setSlot(std::function<void ()> slot) {ret_func = [slot](void *, int){slot();};}
//! @brief Set timer tick function
//! \brief Set timer tick function
void setSlot(std::function<void (void *)> slot) {ret_func = [slot](void *d, int){slot(d);};}
//! @brief Returns common data passed to tick functions
//! \brief Returns common data passed to tick functions
void * data() const {return data_t;}
void needLockRun(bool need) {lockRun = need;}
EVENT_HANDLER0(void, lock) {mutex_.lock();}
EVENT_HANDLER0(void, unlock) {mutex_.unlock();}
//! @brief Returns if timer should exec \a maybeCallQueuedEvents() at every tick.
//! \brief Returns if timer should exec \a maybeCallQueuedEvents() at every tick.
//! By default \b true
bool isCallQueuedEvents() const {return callEvents;}
//! @brief If set timer exec \a maybeCallQueuedEvents() at every tick.
//! \brief If set timer exec \a maybeCallQueuedEvents() at every tick.
//! By default \b true
void setCallQueuedEvents(bool yes) {callEvents = yes;}
//! @brief Add frequency delimiter \b delim with optional delimiter slot \b slot.
//! \brief Add frequency delimiter \b delim with optional delimiter slot \b slot.
void addDelimiter(int delim, TimerEvent slot = 0) {delims << Delimiter(slot, delim);}
//! @brief Add frequency delimiter \b delim with optional delimiter slot \b slot.
//! \brief Add frequency delimiter \b delim with optional delimiter slot \b slot.
void addDelimiter(int delim, std::function<void ()> slot) {delims << Delimiter([slot](void *, int){slot();}, delim);}
//! @brief Add frequency delimiter \b delim with optional delimiter slot \b slot.
//! \brief Add frequency delimiter \b delim with optional delimiter slot \b slot.
void addDelimiter(int delim, std::function<void (void *)> slot) {delims << Delimiter([slot](void *d, int){slot(d);}, delim);}
//! @brief Remove all frequency delimiters \b delim.
//! \brief Remove all frequency delimiters \b delim.
void removeDelimiter(int delim) {for (int i = 0; i < delims.size_s(); ++i) if (delims[i].delim == delim) {delims.remove(i); i--;}}
EVENT_HANDLER0(void, clearDelimiters) {delims.clear();}
@@ -195,30 +195,30 @@ public:
//! \{
/** \fn bool start()
* @brief Start timer with \a interval() loop delay
* \brief Start timer with \a interval() loop delay
* \details Start execution of timer functions with frequency = 1 / msecs Hz. */
/** \fn bool start(double msecs)
* @brief Start timer with \b msecs loop delay
* \brief Start timer with \b msecs loop delay
* \details Start execution of timer functions with frequency = 1. / msecs Hz.
* Instead of \a start(int msecs) function this variant allow start timer
* with frequencies more than 1 kHz */
//! \fn bool restart()
//! @brief Stop and start timer with \a interval() loop delay
//! \brief Stop and start timer with \a interval() loop delay
//! \fn bool stop(bool wait = true)
//! @brief Stop timer and wait for it finish if "wait"
//! \brief Stop timer and wait for it finish if "wait"
//! \fn void clearDelimiters()
//! @brief Remove all frequency delimiters
//! \brief Remove all frequency delimiters
//! \}
//! \events
//! \{
/** \fn void tickEvent(void * data, int delimiter)
* @brief Raise on timer tick
* \brief Raise on timer tick
* \details \b Data can be set with function \a setData(void * data) or from constructor.
* \b Delimiter is frequency delimiter, 1 for main loop. */