mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Doxygen updates
Added more doxygen documentation
This commit is contained in:
parent
9f28a382e0
commit
15cc4c0b5c
41
doxygen.h
Normal file
41
doxygen.h
Normal file
@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
|
||||
Copyright(c) 2014 jwellbelove
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
///\defgroup ETL Embedded Template Library
|
||||
|
||||
///\defgroup Containers Containers
|
||||
///\ingroup ETL
|
||||
|
||||
///\defgroup Utilities Utilities
|
||||
///\ingroup ETL
|
||||
|
||||
///\defgroup Math Math
|
||||
///\ingroup ETL
|
||||
|
||||
///\ingroup ETL
|
||||
namespace etl {}
|
||||
|
||||
|
||||
39
iqueue.h
39
iqueue.h
@ -33,11 +33,20 @@ SOFTWARE.
|
||||
|
||||
#include "queue_base.h"
|
||||
|
||||
///\defgroup Queue Queue
|
||||
///\ingroup Containers
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
/// A fixed capacity queue written in the STL style.
|
||||
/// This queue cannot be used for concurrent access from multiple threads.
|
||||
///\ingroup Queue
|
||||
///\brief This is the base for all queues that contain a particular type.
|
||||
///\detail Normally a reference to this type will be taken from a derived queue.
|
||||
///\code
|
||||
/// etl::queue<int, 10> myQueue;
|
||||
/// etl::iqueue<int>& iQueue = myQueue;
|
||||
///\endcode
|
||||
/// \warning This queue cannot be used for concurrent access from multiple threads.
|
||||
/// \tparam T The type of item that the queue holds.
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
@ -45,16 +54,16 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef queue_base::size_type size_type;
|
||||
typedef T value_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef queue_base::size_type size_type; ///< The type used for determining the size of queue.
|
||||
typedef T value_type; ///< The type stored in the queue.
|
||||
typedef T& reference; ///< A reference to the type used in the queue.
|
||||
typedef const T& const_reference; ///< A const reference to the type used in the queue.
|
||||
typedef T* pointer; ///< A pointer to the type used in the queue.
|
||||
typedef const T* const_pointer; ///< A const pointer to the type used in the queue.
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds an item to the queue.
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws a queue_full_exception is the queue is already full,
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_full_exception is the queue is already full,
|
||||
/// otherwise does nothing if full.
|
||||
///\param item The item to push to the queue.
|
||||
//*************************************************************************
|
||||
@ -77,8 +86,8 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Allows a possibly more efficient 'push' by moving to the next input item
|
||||
/// and returning a reference to it.
|
||||
/// This may eliminate a copy by allowing direct construction in-place.
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws a queue_full_exception is the queue is already full,
|
||||
/// This may eliminate a copy by allowing direct construction in-place.<br>
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_full_exception is the queue is already full,
|
||||
/// otherwise does nothing if full.
|
||||
/// \return A reference to the position to 'push' to.
|
||||
//*************************************************************************
|
||||
@ -102,8 +111,8 @@ namespace etl
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a reference to the item at the front of the queue.
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws a queue_empty_exception if the queue is empty.
|
||||
/// Gets a reference to the item at the front of the queue.<br>
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.<br>
|
||||
/// If ETL_USE_EXCEPTIONS is not defined and the queue is empty, the return value is undefined.
|
||||
/// \return A reference to the item at the front of the queue.
|
||||
//*************************************************************************
|
||||
@ -120,8 +129,8 @@ namespace etl
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const reference to the item at the front of the queue.
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws a queue_empty_exception if the queue is empty.
|
||||
/// Gets a const reference to the item at the front of the queue.<br>
|
||||
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.<br>
|
||||
/// If ETL_USE_EXCEPTIONS is not defined and the queue is empty, the return value is undefined.
|
||||
/// \return A const reference to the item at the front of the queue.
|
||||
//*************************************************************************
|
||||
|
||||
5
math.h
5
math.h
@ -34,6 +34,7 @@ SOFTWARE.
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
///\ingroup Math
|
||||
/// The base generic log template.
|
||||
/// Defines 'value' as the log of the number at the specified base.
|
||||
/// The result is rounded down to the next integer.
|
||||
@ -51,6 +52,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Math
|
||||
/// Specialisation for N = 1
|
||||
//***************************************************************************
|
||||
template <const size_t BASE>
|
||||
@ -63,6 +65,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Math
|
||||
/// Specialisation for N = 0
|
||||
//***************************************************************************
|
||||
template <const size_t BASE>
|
||||
@ -75,6 +78,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Math
|
||||
/// The specialisation for base 2 logs.
|
||||
//***************************************************************************
|
||||
template <const size_t N>
|
||||
@ -87,6 +91,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Math
|
||||
/// The specialisation for base 10 logs.
|
||||
//***************************************************************************
|
||||
template <const size_t N>
|
||||
|
||||
10
queue.h
10
queue.h
@ -33,9 +33,17 @@ SOFTWARE.
|
||||
|
||||
#include "IQueue.h"
|
||||
|
||||
//*****************************************************************************
|
||||
///\defgroup Queue Queue
|
||||
/// A First-in / first-out queue with the capacity defined at compile time,
|
||||
/// written in the STL style.
|
||||
///\ingroup Containers
|
||||
//*****************************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
///\ingroup Queue
|
||||
/// A fixed capacity queue.
|
||||
/// This queue does not support concurrent access by different threads.
|
||||
/// \tparam T The type this queue should support.
|
||||
@ -56,7 +64,7 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
T buffer[SIZE]; /// The interval buffer.
|
||||
T buffer[SIZE]; ///< The internal buffer.
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
13
queue_base.h
13
queue_base.h
@ -33,10 +33,16 @@ SOFTWARE.
|
||||
|
||||
#include "exception.h"
|
||||
|
||||
///\defgroup Queue Queue
|
||||
///\ingroup Containers
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#ifdef ETL_USE_EXCEPTIONS
|
||||
//***************************************************************************
|
||||
///\ingroup Queue
|
||||
///\brief This is the base for all queues.
|
||||
///\detail This is the base for all queues. Instances or references to this type should never need to be created.
|
||||
/// The base class for queue exceptions.
|
||||
//***************************************************************************
|
||||
class queue_exception : public exception
|
||||
@ -50,6 +56,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Queue
|
||||
/// The exception thrown when the queue is full.
|
||||
//***************************************************************************
|
||||
class queue_full_exception : public queue_exception
|
||||
@ -63,6 +70,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Queue
|
||||
/// The exception thrown when the queue is empty.
|
||||
//***************************************************************************
|
||||
class queue_empty_exception : public queue_exception
|
||||
@ -77,14 +85,15 @@ namespace etl
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup Queue
|
||||
/// A fixed capacity queue written in the STL style.
|
||||
/// This queue cannot be used for concurrent access from multiple threads.
|
||||
/// \warning This queue cannot be used for concurrent access from multiple threads.
|
||||
//***************************************************************************
|
||||
class queue_base
|
||||
{
|
||||
public:
|
||||
|
||||
typedef size_t size_type;
|
||||
typedef size_t size_type; ///< The type used for determining the size of queue.
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the current number of items in the queue.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user