diff --git a/docs/raw/utilities/Iterator.txt b/docs/raw/utilities/Iterator.txt deleted file mode 100644 index 76052b62..00000000 --- a/docs/raw/utilities/Iterator.txt +++ /dev/null @@ -1,303 +0,0 @@ -Iterator -A set of templates to more easily determine the properties of iterator types. -____________________________________________________________________________________________________ -Iterator concepts - -Input -is_input_iterator::value -Is T an input iterator? - -is_input_iterator_concept::value -Can T be used as an input iterator? -____________________________________________________________________________________________________ -Output -is_output_iterator::value -Is T an output iterator? - -is_output_iterator_concept::value -Can T be used as an output iterator? -____________________________________________________________________________________________________ -Forward -is_forward_iterator::value -Is T a forward iterator? - -is_forward_iterator_concept::value -Can T be used as an forward iterator? -____________________________________________________________________________________________________ -Bidirectional -is_bidirectional_iterator::value -Is T a bidirectional iterator? - -is_bidirectional_iterator_concept::value -Can T be used as a bidirectional iterator? -____________________________________________________________________________________________________ -Random -is_random_iterator::value -Is T a random iterator? - -is_random_iterator_concept::value -Can T be used as a random iterator? -____________________________________________________________________________________________________ -Iterator tags - -struct input_iterator_tag -struct output_iterator_tag -struct forward_iterator_tag -struct bidirectional_iterator_tag -struct random_access_iterator_tag -____________________________________________________________________________________________________ -Iterator traits - -template -struct iterator_traits - -Defined types -iterator_category -value_type -difference_type -pointer -reference -____________________________________________________________________________________________________ -advance - -template -ETL_CONSTEXPR17 void advance(TIterator& itr, TDistance n) -____________________________________________________________________________________________________ -prev - -template -ETL_CONSTEXPR17 TIterator prev(TIterator itr, - typename etl::iterator_traits::difference_type n = 1) -____________________________________________________________________________________________________ -next - -template -ETL_CONSTEXPR17 TIterator next(TIterator itr, - typename etl::iterator_traits::difference_type n = 1) -____________________________________________________________________________________________________ -distance - -template -ETL_CONSTEXPR17 typename std::iterator_traits::difference_type - distance(TIterator first, TIterator last) -____________________________________________________________________________________________________ -iterator -A base class provided to simplify definitions of the required types for iterators. -https://en.cppreference.com/w/cpp/iterator/iterator - -template -struct iterator - -Defined types -value_type -difference_type -pointer -reference -iterator_category -____________________________________________________________________________________________________ -reverse_iterator -An iterator adaptor that reverses the direction of a given iterator - -template -class reverse_iterator - -Defined types -iterator_category -value_type -iterator_type -difference_type -pointer -reference -____________________________________________________________________________________________________ -move_iterator -An iterator adaptor that converts the value returned by the underlying iterator into an rvalue. -C++11 or above. - -template -class move_iterator - -Defined types -iterator_category -value_type -iterator_type -difference_type -pointer -reference -____________________________________________________________________________________________________ -back_insert_iterator - -Inserts using push_back. - -template -class back_insert_iterator -____________________________________________________________________________________________________ -template -ETL_NODISCARD -ETL_CONSTEXPR14 -etl::back_insert_iterator back_inserter(TContainer& container) -____________________________________________________________________________________________________ -front_insert_iterator - -Inserts using push_front. - -template -class front_insert_iterator -____________________________________________________________________________________________________ -template -ETL_NODISCARD -ETL_CONSTEXPR14 -etl::front_insert_iterator front_inserter(TContainer& container) -____________________________________________________________________________________________________ -push_insert_iterator - -Inserts using push. - -template -class push_insert_iterator -____________________________________________________________________________________________________ -template -ETL_NODISCARD -ETL_CONSTEXPR14 -etl::push_insert_iterator push_inserter(TContainer& container) - -____________________________________________________________________________________________________ -begin - -template -ETL_CONSTEXPR typename TContainer::iterator begin(TContainer& container) -Get the 'begin' iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_iterator begin(const TContainer& container) -Get the 'begin' const_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_iterator cbegin(const TContainer& container) -Get the 'begin' const_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR TValue* begin(TValue(&data)[Array_Size]) -Get the 'begin' pointer for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR const TValue* begin(const TValue(&data)[Array_Size]) -Get the 'begin' const pointer for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR const TValue* cbegin(const TValue(&data)[Array_Size]) -Get the 'begin' const pointer for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::reverse_iterator rbegin(TContainer& container) -Get the 'begin' reverse_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_reverse_iterator rbegin(const TContainer& container) -Get the 'begin' const_reverse_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_reverse_iterator crbegin(const TContainer& container) -Get the 'begin' const_reverse_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_OR_STD::reverse_iterator rbegin(TValue(&data)[Array_Size]) -Get the 'begin' reverse_iterator for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR ETL_OR_STD::reverse_iterator crbegin(const TValue(&data)[Array_Size]) -Get the 'begin' const_reverse_iterator for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -end -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::iterator end(TContainer& container) -Get the 'end' iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_iterator end(const TContainer& container) -Get the 'end' const_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_iterator cend(const TContainer& container) -Get the 'end' const_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR TValue* end(TValue(&data)[Array_Size]) -Get the 'end' pointer for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR const TValue* end(const TValue(&data)[Array_Size]) -Get the 'end' const pointer of an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR const TValue* cend(const TValue(&data)[Array_Size]) -Get the 'end' const pointer of an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP11_NOT_SUPPORTED -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::reverse_iterator rend(TContainer& container) -Get the 'end' reverse_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_reverse_iterator rend(TContainer& container) -Get the 'end' const_reverse_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR typename TContainer::const_reverse_iterator crend(const TContainer& container) -Get the 'end' const_reverse_iterator of container. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR ETL_OR_STD::reverse_iterator rend(TValue(&data)[Array_Size]) -Get the 'end' reverse_iterator for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR ETL_OR_STD::reverse_iterator crend(const TValue(&data)[Array_Size]) -Get the 'end' const_reverse_iterator for an array. -Enabled if ETL_NOT_USING_STL or ETL_CPP14_NOT_SUPPORTED. -____________________________________________________________________________________________________ -size - -template -ETL_CONSTEXPR typename TContainer::size_type size(const TContainer& container) -Get the size of a container. -Expects the container to have defined size_type. -Enabled if ETL_NOT_USING_STL or ETL_CPP17_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -ETL_CONSTEXPR size_t size(TValue(&)[Array_Size]) -Get the size of an array in elements at run time, or compile time if C++11 or above. -Enabled if ETL_NOT_USING_STL or ETL_CPP17_NOT_SUPPORTED. -____________________________________________________________________________________________________ -template -char(&array_size(T(&array)[Array_Size]))[Array_Size]; -Get the size of an array in elements at compile time for C++03 -Usage:- sizeof(array_size(array)) -Enabled if ETL_NOT_USING_STL or ETL_CPP17_NOT_SUPPORTED. -____________________________________________________________________________________________________ -ETL_ARRAY_SIZE(a) calls sizeof(etl::array_size(a)) - - diff --git a/docs/raw/utilities/Versions.txt b/docs/raw/utilities/Versions.txt index 6f9afcea..42f4b207 100644 --- a/docs/raw/utilities/Versions.txt +++ b/docs/raw/utilities/Versions.txt @@ -1,9 +1,11 @@ -Versions +--- +title: "Versions" +--- As set of macros that allow the version of the ETL to be determined. -Definitions - +## Definitions +```cpp ETL_VERSION ETL_VERSION_W ETL_VERSION_U16 @@ -12,9 +14,10 @@ ETL_VERSION_MAJOR ETL_VERSION_MINOR ETL_VERSION_PATCH ETL_VERSION_VALUE +``` -Example values - +## Example values +```cpp #define ETL_VERSION "10.21.2" #define ETL_VERSION_W L"10.21.2" #define ETL_VERSION_U16 u"10.21.2" @@ -23,5 +26,4 @@ Example values #define ETL_VERSION_MINOR 21 #define ETL_VERSION_PATCH 2 #define ETL_VERSION_VALUE 102102 - - +``` diff --git a/docs/raw/utilities/debug_count.txt b/docs/utilities/debug_count.md similarity index 84% rename from docs/raw/utilities/debug_count.txt rename to docs/utilities/debug_count.md index aa8af755..26311596 100644 --- a/docs/raw/utilities/debug_count.txt +++ b/docs/utilities/debug_count.md @@ -1,9 +1,13 @@ -debug_count -A utility class designed for debugging purposes. This is used in the ETL containers to check that all placement new'd items have been destructed. When neither DEBUG or _DEBUG is defined then this class does nothing and will be optimised away. +--- +title: "debug_count" +--- -If the count is decremented below zero then an assert will be generated. -If the destructor for this class is called and the count is not zero, then an assert will be generated. +A utility class designed for debugging purposes. This is used in the ETL containers to check that all placement new'd items have been destructed. When neither `DEBUG` or `_DEBUG` is defined then this class does nothing and will be optimised away. +If the count is decremented below zero then an assert will be generated. +If the destructor for this class is called and the count is not zero, then an assert will be generated. + +```cpp #define ETL_DECLARE_DEBUG_COUNT etl::debug_count etl_debug_count #define ETL_SET_DEBUG_COUNT(n) etl_debug_count.set(n) #define ETL_GET_DEBUG_COUNT etl_debug_count.get() @@ -14,7 +18,10 @@ If the destructor for this class is called and the count is not zero, then an as #define ETL_RESET_DEBUG_COUNT etl_debug_count.clear() #define ETL_OBJECT_RESET_DEBUG_COUNT(object) object.etl_debug_count.clear() #define ETL_OBJECT_GET_DEBUG_COUNT(object) object.etl_debug_count.get() +``` +## Example +```cpp // A container class (very simplified) class MyContainer { @@ -38,4 +45,4 @@ private: ETL_DECLARE_DEBUG_COUNT; }; - +``` diff --git a/docs/utilities/versions.md b/docs/utilities/versions.md new file mode 100644 index 00000000..42f4b207 --- /dev/null +++ b/docs/utilities/versions.md @@ -0,0 +1,29 @@ +--- +title: "Versions" +--- + +As set of macros that allow the version of the ETL to be determined. + +## Definitions +```cpp +ETL_VERSION +ETL_VERSION_W +ETL_VERSION_U16 +ETL_VERSION_U32 +ETL_VERSION_MAJOR +ETL_VERSION_MINOR +ETL_VERSION_PATCH +ETL_VERSION_VALUE +``` + +## Example values +```cpp +#define ETL_VERSION "10.21.2" +#define ETL_VERSION_W L"10.21.2" +#define ETL_VERSION_U16 u"10.21.2" +#define ETL_VERSION_U32 U"10.21.2" +#define ETL_VERSION_MAJOR 10 +#define ETL_VERSION_MINOR 21 +#define ETL_VERSION_PATCH 2 +#define ETL_VERSION_VALUE 102102 +```