mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Merge branch 'development'
This commit is contained in:
commit
fbfcfe553b
@ -124,14 +124,14 @@ namespace etl
|
||||
|
||||
iterator& operator ++()
|
||||
{
|
||||
p_node = p_node->next;
|
||||
p_node = p_node->bifln_next;
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator operator ++(int)
|
||||
{
|
||||
iterator temp(*this);
|
||||
p_node = p_node->next;
|
||||
p_node = p_node->bifln_next;
|
||||
return temp;
|
||||
}
|
||||
|
||||
@ -234,14 +234,14 @@ namespace etl
|
||||
|
||||
const_iterator& operator ++()
|
||||
{
|
||||
p_node = p_node->next;
|
||||
p_node = p_node->bifln_next;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const_iterator operator ++(int)
|
||||
{
|
||||
const_iterator temp(*this);
|
||||
p_node = p_node->next;
|
||||
p_node = p_node->bifln_next;
|
||||
return temp;
|
||||
}
|
||||
|
||||
@ -440,21 +440,21 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void reverse()
|
||||
{
|
||||
if ((start_node.next == nullptr) || (start_node.next->next == nullptr))
|
||||
if ((start_node.bifln_next == nullptr) || (start_node.bifln_next->bifln_next == nullptr))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
node_t* first = nullptr; // To keep first node
|
||||
node_t* second = start_node.next; // To keep second node
|
||||
node_t* track = start_node.next; // Track the list
|
||||
node_t* second = start_node.bifln_next; // To keep second node
|
||||
node_t* track = start_node.bifln_next; // Track the list
|
||||
|
||||
while (track != NULL)
|
||||
{
|
||||
track = track->next; // Track point to next node;
|
||||
second->next = first; // Second node point to first
|
||||
first = second; // Move first node to next
|
||||
second = track; // Move second node to next
|
||||
track = track->bifln_next; // Track point to next node;
|
||||
second->bifln_next = first; // Second node point to first
|
||||
first = second; // Move first node to next
|
||||
second = track; // Move second node to next
|
||||
}
|
||||
|
||||
join(&start_node, first);
|
||||
@ -505,7 +505,7 @@ namespace etl
|
||||
{
|
||||
node_t* p_first = first.p_node;
|
||||
node_t* p_last = last.p_node;
|
||||
node_t* p_next = p_first->next;
|
||||
node_t* p_next = p_first->bifln_next;
|
||||
|
||||
// Join the ends.
|
||||
join(p_first, p_last);
|
||||
@ -515,18 +515,11 @@ namespace etl
|
||||
// Erase the ones in between.
|
||||
while (p_first != p_last)
|
||||
{
|
||||
p_next = p_first->next; // Remember the next node.
|
||||
p_first = p_next; // Move to the next node.
|
||||
p_next = p_first->bifln_next; // Remember the next node.
|
||||
p_first = p_next; // Move to the next node.
|
||||
}
|
||||
|
||||
if (p_next == nullptr)
|
||||
{
|
||||
return end();
|
||||
}
|
||||
else
|
||||
{
|
||||
return iterator(*p_last);
|
||||
}
|
||||
return last;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -534,7 +527,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
bool empty() const
|
||||
{
|
||||
return start_node.next == nullptr;
|
||||
return start_node.bifln_next == nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -546,7 +539,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void join(node_t* left, node_t* right)
|
||||
{
|
||||
left->next = right;
|
||||
left->bifln_next = right;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -555,7 +548,7 @@ namespace etl
|
||||
void insert_node_after(node_t& position, node_t& node)
|
||||
{
|
||||
// Connect to the basic_intrusive_forward_list.
|
||||
join(&node, position.next);
|
||||
join(&node, position.bifln_next);
|
||||
join(&position, &node);
|
||||
}
|
||||
|
||||
@ -565,12 +558,12 @@ namespace etl
|
||||
void remove_node_after(node_t& node)
|
||||
{
|
||||
// The node to erase.
|
||||
node_t* p_node = node.next;
|
||||
node_t* p_node = node.bifln_next;
|
||||
|
||||
if (p_node != nullptr)
|
||||
{
|
||||
// Disconnect the node from the basic_intrusive_forward_list.
|
||||
join(&node, p_node->next);
|
||||
join(&node, p_node->bifln_next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,7 +572,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
node_t& get_head()
|
||||
{
|
||||
return *start_node.next;
|
||||
return *start_node.bifln_next;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -587,7 +580,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const node_t& get_head() const
|
||||
{
|
||||
return *start_node.next;
|
||||
return *start_node.bifln_next;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -595,7 +588,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
start_node.next = nullptr;
|
||||
start_node.bifln_next = nullptr;
|
||||
}
|
||||
|
||||
// Disabled.
|
||||
|
||||
@ -39,7 +39,12 @@ namespace etl
|
||||
//***************************************************************************
|
||||
struct basic_intrusive_forward_list_node
|
||||
{
|
||||
basic_intrusive_forward_list_node* next;
|
||||
basic_intrusive_forward_list_node()
|
||||
: bifln_next(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
basic_intrusive_forward_list_node* bifln_next;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
152
basic_string.h
Normal file
152
basic_string.h
Normal file
@ -0,0 +1,152 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
http://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2016 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.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __ETL_BASIC_STRING__
|
||||
#define __ETL_BASIC_STRING__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <iterator>
|
||||
|
||||
#include "ibasic_string.h"
|
||||
#include "char_traits.h"
|
||||
#include "container.h"
|
||||
#include "alignment.h"
|
||||
#include "array.h"
|
||||
|
||||
//*****************************************************************************
|
||||
///\defgroup basic_string basic_string
|
||||
/// A basic_string with the capacity defined at compile time.
|
||||
///\ingroup containers
|
||||
//*****************************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
template <typename T, const size_t MAX_SIZE_>
|
||||
//***************************************************************************
|
||||
/// A basic_string implementation that uses a fixed size buffer.
|
||||
///\tparam T The element type.
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup basic_string
|
||||
//***************************************************************************
|
||||
class basic_string : public ibasic_string<T>
|
||||
{
|
||||
public:
|
||||
|
||||
static const size_t MAX_SIZE = MAX_SIZE_;
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
//*************************************************************************
|
||||
basic_string()
|
||||
: ibasic_string<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ibasic_string<T>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, with size.
|
||||
///\param initialSize The initial size of the basic_string.
|
||||
//*************************************************************************
|
||||
explicit basic_string(size_t count, T c)
|
||||
: ibasic_string<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ibasic_string<T>::initialise();
|
||||
ibasic_string<T>::resize(initialSize);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from null terminated text.
|
||||
///\param text The initial text of the basic_string.
|
||||
//*************************************************************************
|
||||
basic_string(const T* text)
|
||||
: ibasic_string<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ibasic_string<T>::initialise();
|
||||
ibasic_string<T>::assign(text, text + etl::char_traits<T>::length(text))
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from null terminated text and count.
|
||||
///\param text The initial text of the basic_string.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
basic_string(const T* text, size_t count)
|
||||
: ibasic_string<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ibasic_string<T>::initialise();
|
||||
ibasic_string<T>::assign(text, text + count)
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from initial size and value.
|
||||
///\param initialSize The initial size of the basic_string.
|
||||
///\param value The value to fill the basic_string with.
|
||||
//*************************************************************************
|
||||
basic_string(size_t count, T c)
|
||||
: ibasic_string<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ibasic_string<T>::initialise();
|
||||
ibasic_string<T>::resize(count, c);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from an iterator range.
|
||||
///\tparam TIterator The iterator type.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
basic_string(TIterator first, TIterator last)
|
||||
: ibasic_string<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ibasic_string<T>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
basic_string& operator = (const basic_string& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
ibasic_string<T>::assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
T buffer[MAX_SIZE + 1];
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
11
bitset.h
11
bitset.h
@ -59,7 +59,7 @@ namespace etl
|
||||
{
|
||||
//*************************************************************************
|
||||
/// The class emulates an array of bool elements, but optimized for space allocation.
|
||||
/// Will accomodate any number of bits.
|
||||
/// Will accommodate any number of bits.
|
||||
/// Does not use std::string.
|
||||
///\tparam N The number of bits.
|
||||
///\ingroup bitset
|
||||
@ -130,9 +130,6 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//#define NDEBUG
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
/// Set from a string.
|
||||
//*************************************************************************
|
||||
@ -185,7 +182,11 @@ namespace etl
|
||||
//*************************************************************************
|
||||
bitset<N>& operator =(const bitset<N>& other)
|
||||
{
|
||||
etl::copy_n(other.data, ARRAY_SIZE, data);
|
||||
if (this != &other)
|
||||
{
|
||||
etl::copy_n(other.data, ARRAY_SIZE, data);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
228
char_traits.h
Normal file
228
char_traits.h
Normal file
@ -0,0 +1,228 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
http://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2016 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.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __ETL_CHAR_TRAITS__
|
||||
#define __ETL_CHAR_TRAITS__
|
||||
|
||||
#include "stdint.h"
|
||||
#include "algorithms.h"
|
||||
|
||||
//*****************************************************************************
|
||||
///\defgroup char_traits char_traits
|
||||
/// Character traits
|
||||
///\ingroup string
|
||||
//*****************************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
template<typename T> struct char_traits_types;
|
||||
|
||||
template<> struct char_traits_types<char>
|
||||
{
|
||||
typedef char char_type;
|
||||
typedef int int_type;
|
||||
typedef long long off_type;
|
||||
typedef size_t pos_type;
|
||||
typedef char state_type;
|
||||
};
|
||||
|
||||
template<> struct char_traits_types<wchar_t>
|
||||
{
|
||||
typedef wchar_t char_type;
|
||||
typedef wchar_t int_type;
|
||||
typedef long long off_type;
|
||||
typedef size_t pos_type;
|
||||
typedef char state_type;
|
||||
};
|
||||
|
||||
template<> struct char_traits_types<char16_t>
|
||||
{
|
||||
typedef char16_t char_type;
|
||||
typedef uint_least16_t int_type;
|
||||
typedef long long off_type;
|
||||
typedef size_t pos_type;
|
||||
typedef char state_type;
|
||||
};
|
||||
|
||||
template<> struct char_traits_types<char32_t>
|
||||
{
|
||||
typedef char32_t char_type;
|
||||
typedef uint_least32_t int_type;
|
||||
typedef long long off_type;
|
||||
typedef size_t pos_type;
|
||||
typedef char state_type;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Specialisation for char.
|
||||
//***************************************************************************
|
||||
template<typename T>
|
||||
struct char_traits : public char_traits_types<T>
|
||||
{
|
||||
//*************************************************************************
|
||||
static bool eq(char_type a, char_type b)
|
||||
{
|
||||
return a == b;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static bool lt(char_type a, char_type b)
|
||||
{
|
||||
return a < b;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static size_t length(const char* str)
|
||||
{
|
||||
size_t count = 0;
|
||||
|
||||
if (str != 0)
|
||||
{
|
||||
while (*str++ != 0)
|
||||
{
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static void assign(char_type& r, const char_type& c)
|
||||
{
|
||||
r = a;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static char_type* assign(char_type* p, size_t n, char_type c)
|
||||
{
|
||||
if (p != 0)
|
||||
{
|
||||
std::fill_n(p, n, c);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static char_type* move(char_type* dest, const char_type* src, size_t count)
|
||||
{
|
||||
if ((dest < src) || (dest > (src + count))
|
||||
{
|
||||
etl::copy_n(src, src + count, dest);
|
||||
}
|
||||
else
|
||||
{
|
||||
etl::copy_n(std::reverse_iterator(src + count),
|
||||
std::reverse_iterator(src),
|
||||
std::reverse_iterator(dest + count));
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static char_type* copy(char_type* dest, const char_type* src, size_t count)
|
||||
{
|
||||
etl::copy_n(src, src + count, dest);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static int compare(const char_type* s1, const char_type* s2, size_t count)
|
||||
{
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
if (*s1 < *s2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (*s1 > *s2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
++s1;
|
||||
++s2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static const char_type* find(const char_type* p, size_t count, const char_type& ch)
|
||||
{
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
if (*p == ch)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
++p;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static char_type to_char_type(int_type c)
|
||||
{
|
||||
return static_cast<char_type>(c);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static int_type to_int_type(char_type c)
|
||||
{
|
||||
return static_cast<int_type>(c);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static bool eq_int_type(int_type c1, int_type c2)
|
||||
{
|
||||
return (c1 == c2);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static int_type eof()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
static int_type not_eof(int_type e)
|
||||
{
|
||||
return (e == eof()) ? eof() - 1 : e;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
145
cyclic_hash.h
Normal file
145
cyclic_hash.h
Normal file
@ -0,0 +1,145 @@
|
||||
|
||||
#ifndef CYCLICHASH
|
||||
#define CYCLICHASH
|
||||
|
||||
#include "characterhash.h"
|
||||
|
||||
/**
|
||||
* Each instance is a rolling hash function meant to hash streams of characters.
|
||||
* Each new instance of this class comes with new random keys.
|
||||
*
|
||||
* Recommended usage to get L-bit hash values over n-grams:
|
||||
* CyclicHash<> hf(n,L );
|
||||
* for(uint32 k = 0; k<n;++k) {
|
||||
* unsigned char c = ... ; // grab some character
|
||||
* hf.eat(c); // feed it to the hasher
|
||||
* }
|
||||
* while(...) { // go over your string
|
||||
* hf.hashvalue; // at all times, this contains the hash value
|
||||
* unsigned char c = ... ;// points to the next character
|
||||
* unsigned char out = ...; // character we want to forget
|
||||
* hf.update(out,c); // update hash value
|
||||
* }
|
||||
*/
|
||||
template <typename THashtype = uint32, typename TChartype = unsigned char>
|
||||
class CyclicHash
|
||||
{
|
||||
public:
|
||||
// myn is the length of the sequences, e.g., 3 means that you want to hash sequences of 3 characters
|
||||
// mywordsize is the number of bits you which to receive as hash values, e.g., 19 means that the hash values are 19-bit integers
|
||||
CyclicHash(int myn, int mywordsize=19) : hashvalue(0),
|
||||
n(myn), wordsize(mywordsize),
|
||||
hasher(maskfnc<THashtype>(wordsize)),
|
||||
mask1(maskfnc<THashtype>(wordsize-1)),
|
||||
myr(n%wordsize),
|
||||
maskn(maskfnc<THashtype>(wordsize-myr))
|
||||
{
|
||||
if(static_cast<uint>(wordsize) > 8*sizeof(THashtype))
|
||||
{
|
||||
cerr<<"Can't create "<<wordsize<<"-bit hash values"<<endl;
|
||||
throw "abord";
|
||||
}
|
||||
}
|
||||
|
||||
void fastleftshiftn(THashtype & x) const
|
||||
{
|
||||
x = ((x & maskn) << myr ) | (x >> (wordsize-myr)) ;
|
||||
}
|
||||
|
||||
void fastleftshift1(THashtype & x) const
|
||||
{
|
||||
x = ((x & mask1) << 1 ) | (x >> (wordsize-1)) ;
|
||||
}
|
||||
|
||||
void fastrightshift1(THashtype & x) const
|
||||
{
|
||||
x = (x >> 1 ) | ((x & 1)<< (wordsize-1)) ;
|
||||
}
|
||||
|
||||
|
||||
THashtype getfastleftshift1(THashtype x) const
|
||||
{
|
||||
return ((x & mask1) << 1 ) | (x >> (wordsize-1)) ;
|
||||
}
|
||||
|
||||
|
||||
THashtype getfastrightshift1(THashtype x) const
|
||||
{
|
||||
return (x >> 1 ) | ((x & 1)<< (wordsize-1)) ;
|
||||
}
|
||||
|
||||
// this is a convenience function, use eat,update and .hashvalue to use as a rolling hash function
|
||||
template<class container>
|
||||
THashtype hash(container & c) {
|
||||
THashtype answer(0);
|
||||
for(uint k = 0; k<c.size(); ++k) {
|
||||
fastleftshift1(answer);
|
||||
answer ^= hasher.hashvalues[static_cast<unsigned int>(c[k])];
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
THashtype hashz(TChartype outchar,uint n) {
|
||||
THashtype answer = hasher.hashvalues[static_cast<unsigned int>(outchar)];
|
||||
for(uint k = 0; k<n; ++k) {
|
||||
fastleftshift1(answer);
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
||||
// add inchar as an input and remove outchar, the hashvalue is updated
|
||||
// this function can be used to update the hash value from the hash value of [outchar]ABC to the hash value of ABC[inchar]
|
||||
void update(TChartype outchar, TChartype inchar)
|
||||
{
|
||||
THashtype z (hasher.hashvalues[outchar]);
|
||||
fastleftshiftn(z);
|
||||
hashvalue = getfastleftshift1(hashvalue)
|
||||
^ z
|
||||
^ hasher.hashvalues[inchar];
|
||||
|
||||
}
|
||||
|
||||
// this is the reverse of the update function.
|
||||
// this function can be used to update the hash value from the hash value of ABC[inchar] to the hash value of [outchar]ABC
|
||||
void reverse_update(TChartype outchar, TChartype inchar)
|
||||
{
|
||||
THashtype z (hasher.hashvalues[outchar]);
|
||||
fastleftshiftn(z);
|
||||
hashvalue ^= z ^ hasher.hashvalues[inchar];
|
||||
hashvalue = getfastrightshift1(hashvalue);
|
||||
}
|
||||
|
||||
// add inchar as an input, this is used typically only at the start
|
||||
// the hash value is updated to that of a longer string (one where inchar was appended)
|
||||
void eat(TChartype inchar)
|
||||
{
|
||||
fastleftshift1(hashvalue);
|
||||
hashvalue ^= hasher.hashvalues[inchar];
|
||||
}
|
||||
|
||||
//for an n-gram X it returns hash value of (n + 1)-gram XY without changing the object X. For example, if X = "ABC", then X.hash_extend("D") returns value of "ABCD" without changing the state of X
|
||||
THashtype hash_extend(TChartype Y)
|
||||
{
|
||||
return getfastleftshift1(hashvalue) ^ hasher.hashvalues[Y];
|
||||
}
|
||||
|
||||
// same as hash_extend, but with prepending the n-gram with character Y. If X = "ABC", then X.hash_prepend("D") returns value of "DABC" without changing the state of X
|
||||
THashtype hash_prepend(TChartype Y)
|
||||
{
|
||||
THashtype z (hasher.hashvalues[Y]);
|
||||
fastleftshiftn(z);
|
||||
return z ^ hashvalue;
|
||||
}
|
||||
|
||||
|
||||
THashtype hashvalue;
|
||||
int n;
|
||||
const int wordsize;
|
||||
CharacterHash<THashtype,TChartype> hasher;
|
||||
const THashtype mask1;
|
||||
const int myr;
|
||||
const THashtype maskn;
|
||||
};
|
||||
|
||||
#endif
|
||||
8
deque.h
8
deque.h
@ -83,6 +83,7 @@ namespace etl
|
||||
deque()
|
||||
: ideque<T>(reinterpret_cast<T*>(&buffer[0]), MAX_SIZE, BUFFER_SIZE)
|
||||
{
|
||||
ideque<T>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -91,7 +92,10 @@ namespace etl
|
||||
deque(const deque& other)
|
||||
: ideque<T>(reinterpret_cast<T*>(&buffer[0]), MAX_SIZE, BUFFER_SIZE)
|
||||
{
|
||||
ideque<T>::assign(other.begin(), other.end());
|
||||
if (this != &other)
|
||||
{
|
||||
ideque<T>::assign(other.begin(), other.end());
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -128,7 +132,7 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
/// The unititialised buffer of T used in the deque.
|
||||
/// The uninitialised buffer of T used in the deque.
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[BUFFER_SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ namespace etl
|
||||
/// Versions of the macro that return a constant value of 'true' will allow the compiler to optimise away
|
||||
/// any 'if' statements that it is contained within.
|
||||
/// If ETL_NO_CHECKS is defined then no runtime checks are executed at all.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined then the error is thrown if the assert fails. The return value is always 'true'.
|
||||
/// If asserts or exceptions are enabled then the error is thrown if the assert fails. The return value is always 'true'.
|
||||
/// If ETL_LOG_ERRORS is defined then the error is logged if the assert fails. The return value is the value of the boolean test.
|
||||
/// Otherwise 'assert' is called. The return value is always 'true'.
|
||||
///\ingroup error_handler
|
||||
|
||||
@ -90,7 +90,7 @@ namespace etl
|
||||
flat_map(TIterator first, TIterator last)
|
||||
: iflat_map<TKey, TValue, TCompare>(buffer)
|
||||
{
|
||||
iflat_map<TKey, TValue, TCompare>::insert(first, last);
|
||||
iflat_map<TKey, TValue, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -100,8 +100,7 @@ namespace etl
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
iflat_map<TKey, TValue, TCompare>::clear();
|
||||
iflat_map<TKey, TValue, TCompare>::insert(rhs.cbegin(), rhs.cend());
|
||||
iflat_map<TKey, TValue, TCompare>::assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
@ -90,7 +90,7 @@ namespace etl
|
||||
flat_multimap(TIterator first, TIterator last)
|
||||
: iflat_multimap<TKey, TValue, TCompare>(buffer)
|
||||
{
|
||||
iflat_multimap<TKey, TValue, TCompare>::insert(first, last);
|
||||
iflat_multimap<TKey, TValue, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -100,8 +100,7 @@ namespace etl
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
iflat_multimap<TKey, TValue, TCompare>::clear();
|
||||
iflat_multimap<TKey, TValue, TCompare>::insert(rhs.cbegin(), rhs.cend());
|
||||
iflat_multimap<TKey, TValue, TCompare>::assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
@ -89,7 +89,7 @@ namespace etl
|
||||
flat_multiset(TIterator first, TIterator last)
|
||||
: iflat_multiset<T, TCompare>(buffer)
|
||||
{
|
||||
iflat_multiset<T, TCompare>::insert(first, last);
|
||||
iflat_multiset<T, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -99,8 +99,7 @@ namespace etl
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
iflat_multiset<T, TCompare>::clear();
|
||||
iflat_multiset<T, TCompare>::insert(rhs.cbegin(), rhs.cend());
|
||||
iflat_multiset<T, TCompare>::assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
@ -89,7 +89,7 @@ namespace etl
|
||||
flat_set(TIterator first, TIterator last)
|
||||
: iflat_set<T, TCompare>(buffer)
|
||||
{
|
||||
iflat_set<T, TCompare>::insert(first, last);
|
||||
iflat_set<T, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -99,8 +99,7 @@ namespace etl
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
iflat_set<T, TCompare>::clear();
|
||||
iflat_set<T, TCompare>::insert(rhs.cbegin(), rhs.cend());
|
||||
iflat_set<T, TCompare>::assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
@ -71,6 +71,7 @@ namespace etl
|
||||
forward_list()
|
||||
: iforward_list<T>(node_pool, MAX_SIZE)
|
||||
{
|
||||
iforward_list<T>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
21
ibitset.h
21
ibitset.h
@ -37,6 +37,7 @@ SOFTWARE.
|
||||
#include "exception.h"
|
||||
#include "integral_limits.h"
|
||||
#include "binary.h"
|
||||
#include "algorithm.h"
|
||||
|
||||
#if WIN32
|
||||
#undef min
|
||||
@ -81,7 +82,11 @@ namespace etl
|
||||
protected:
|
||||
|
||||
// The type used for each element in the array.
|
||||
#if !defined(ETL_BITSET_ELEMENT_TYPE)
|
||||
typedef uint8_t element_t;
|
||||
#else
|
||||
typedef ETL_BITSET_ELEMENT_TYPE element_t;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
@ -591,6 +596,19 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// operator =
|
||||
//*************************************************************************
|
||||
ibitset& operator =(const ibitset& other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
etl::copy_n(other.pdata, SIZE, pdata);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// swap
|
||||
//*************************************************************************
|
||||
@ -675,6 +693,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
ibitset(const ibitset&);
|
||||
|
||||
const size_t NBITS;
|
||||
const size_t SIZE;
|
||||
element_t* pdata;
|
||||
|
||||
104
ideque.h
104
ideque.h
@ -271,7 +271,7 @@ namespace etl
|
||||
//***************************************************
|
||||
const_iterator()
|
||||
: index(0),
|
||||
p_deque(0),
|
||||
p_deque(0),
|
||||
p_buffer(0)
|
||||
{
|
||||
}
|
||||
@ -459,16 +459,6 @@ namespace etl
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
ideque& operator =(const ideque& other)
|
||||
{
|
||||
assign(other.begin(), other.end());
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns a range to the deque.
|
||||
//*************************************************************************
|
||||
@ -486,7 +476,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns 'n' copies of a value to the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full is 'n' is too large.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full is 'n' is too large.
|
||||
///\param n The number of copies to assign.
|
||||
///\param value The value to add.<
|
||||
//*************************************************************************
|
||||
@ -508,22 +498,22 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a reference to the item at the index.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_out_of_bounds if the index is out of range.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the index is out of range.
|
||||
///\return A reference to the item at the index.
|
||||
//*************************************************************************
|
||||
reference at(size_t index)
|
||||
{
|
||||
ETL_ASSERT(index < current_size, ETL_ERROR(deque_out_of_bounds));
|
||||
|
||||
|
||||
iterator result(_begin);
|
||||
result += index;
|
||||
|
||||
|
||||
return *result;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const reference to the item at the index.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_out_of_bounds if the index is out of range.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the index is out of range.
|
||||
///\return A const reference to the item at the index.
|
||||
//*************************************************************************
|
||||
const_reference at(size_t index) const
|
||||
@ -535,7 +525,7 @@ namespace etl
|
||||
|
||||
return *result;
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a reference to the item at the index.
|
||||
///\return A reference to the item at the index.
|
||||
@ -611,7 +601,7 @@ namespace etl
|
||||
{
|
||||
return _begin;
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const iterator to the beginning of the deque.
|
||||
//*************************************************************************
|
||||
@ -691,7 +681,7 @@ namespace etl
|
||||
{
|
||||
return const_reverse_iterator(cbegin());
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
/// Clears the deque.
|
||||
//*************************************************************************
|
||||
@ -702,7 +692,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Inserts data into the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full if the deque is full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
|
||||
///\param insert_position>The insert position.
|
||||
///\param value>The value to insert.
|
||||
//*************************************************************************
|
||||
@ -740,7 +730,7 @@ namespace etl
|
||||
{
|
||||
// Construct the _end.
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
|
||||
// Move the values.
|
||||
std::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
@ -754,7 +744,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Inserts 'n' copies of a value into the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full if the deque is full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
|
||||
///\param insert_position The insert position.
|
||||
///\param n The number of values to insert.
|
||||
///\param value The value to insert.
|
||||
@ -771,7 +761,7 @@ namespace etl
|
||||
{
|
||||
create_element_front(value);
|
||||
}
|
||||
|
||||
|
||||
position = _begin;
|
||||
}
|
||||
else if (insert_position == end())
|
||||
@ -828,7 +818,6 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t insert_index = std::distance(begin(), position);
|
||||
size_t n_insert = n;
|
||||
size_t n_move = std::distance(position, end());
|
||||
size_t n_create_copy = std::min(n_insert, n_move);
|
||||
@ -863,7 +852,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Inserts a range into the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_empty if the deque is full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_empty if the deque is full.
|
||||
///\param insert_position>The insert position.
|
||||
///\param range_begin The beginning of the range to insert.
|
||||
///\param range_end The end of the range to insert.
|
||||
@ -970,7 +959,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Erase an item.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_out_of_bounds if the position is out of range.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the position is out of range.
|
||||
///\param erase_position The position to erase.
|
||||
//*************************************************************************
|
||||
iterator erase(const_iterator erase_position)
|
||||
@ -1010,7 +999,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// erase a range.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_out_of_bounds if the iterators are out of range.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the iterators are out of range.
|
||||
///\param range_begin The beginning of the range to erase.
|
||||
///\param range_end The end of the range to erase.
|
||||
//*************************************************************************
|
||||
@ -1044,14 +1033,14 @@ namespace etl
|
||||
position = end();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// Copy the smallest number of items.
|
||||
// Are we closer to the front?
|
||||
if (distance(_begin, position) < difference_type(current_size / 2))
|
||||
{
|
||||
// Move the items.
|
||||
std::copy_backward(_begin, position, position + length);
|
||||
|
||||
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
{
|
||||
destroy_element_front();
|
||||
@ -1064,7 +1053,7 @@ namespace etl
|
||||
{
|
||||
// Move the items.
|
||||
std::copy(position + length, _end, position);
|
||||
|
||||
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
{
|
||||
destroy_element_back();
|
||||
@ -1077,7 +1066,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds an item to the back of the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full is the deque is already full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full is the deque is already full.
|
||||
///\param item The item to push to the deque.
|
||||
//*************************************************************************
|
||||
void push_back(parameter_t item)
|
||||
@ -1090,7 +1079,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds one to the front of the deque and returns a reference to the new element.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full is the deque is already full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full is the deque is already full.
|
||||
///\return A reference to the item to assign to.
|
||||
//*************************************************************************
|
||||
reference push_back()
|
||||
@ -1117,7 +1106,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds an item to the front of the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full is the deque is already full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full is the deque is already full.
|
||||
///\param item The item to push to the deque.
|
||||
//*************************************************************************
|
||||
void push_front(parameter_t item)
|
||||
@ -1130,7 +1119,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds one to the front of the deque and returns a reference to the new element.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full is the deque is already full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full is the deque is already full.
|
||||
///\return A reference to the item to assign to.
|
||||
//*************************************************************************
|
||||
reference push_front()
|
||||
@ -1156,7 +1145,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Resizes the deque.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::deque_full is 'new_size' is too large.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full is 'new_size' is too large.
|
||||
///\param new_size The new size of the deque.
|
||||
///\param value The value to assign if the new size is larger. Default = Default constructed value.
|
||||
//*************************************************************************
|
||||
@ -1216,6 +1205,19 @@ namespace etl
|
||||
return distance(lhs.base(), rhs.base());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
ideque& operator =(const ideque& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -1225,7 +1227,20 @@ namespace etl
|
||||
: deque_base(max_size, buffer_size),
|
||||
p_buffer(p_buffer)
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Initialise the deque.
|
||||
//*********************************************************************
|
||||
void initialise()
|
||||
{
|
||||
while (current_size > 0)
|
||||
{
|
||||
destroy_element_back();
|
||||
}
|
||||
|
||||
_begin = iterator(0, *this, p_buffer);
|
||||
_end = iterator(0, *this, p_buffer);
|
||||
}
|
||||
|
||||
iterator _begin; ///Iterator to the _begin item in the deque.
|
||||
@ -1330,20 +1345,6 @@ namespace etl
|
||||
--current_size;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Initialise the deque.
|
||||
//*********************************************************************
|
||||
void initialise()
|
||||
{
|
||||
while (current_size > 0)
|
||||
{
|
||||
destroy_element_back();
|
||||
}
|
||||
|
||||
_begin = iterator(0, *this, p_buffer);
|
||||
_end = iterator(0, *this, p_buffer);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Measures the distance between two iterators.
|
||||
//*************************************************************************
|
||||
@ -1375,6 +1376,9 @@ namespace etl
|
||||
return index - reference_index;
|
||||
}
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
ideque(const ideque&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
37
iflat_map.h
37
iflat_map.h
@ -224,7 +224,7 @@ namespace etl
|
||||
if (i_element == end())
|
||||
{
|
||||
// Doesn't exist, so create a new one.
|
||||
value_type value(key, mapped_type());
|
||||
value_type value(key, mapped_type());
|
||||
i_element = insert(value).first;
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns a reference to the value at index 'key'
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits an etl::flat_map_out_of_bounds if the key is not in the range.
|
||||
/// If asserts or exceptions are enabled, emits an etl::flat_map_out_of_bounds if the key is not in the range.
|
||||
///\param i The index.
|
||||
///\return A reference to the value at index 'key'
|
||||
//*********************************************************************
|
||||
@ -248,7 +248,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns a const reference to the value at index 'key'
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits an etl::flat_map_out_of_bounds if the key is not in the range.
|
||||
/// If asserts or exceptions are enabled, emits an etl::flat_map_out_of_bounds if the key is not in the range.
|
||||
///\param i The index.
|
||||
///\return A const reference to the value at index 'key'
|
||||
//*********************************************************************
|
||||
@ -288,7 +288,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_map.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_map_full if the flat_map is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
std::pair<iterator, bool> insert(const value_type& value)
|
||||
@ -309,14 +309,7 @@ namespace etl
|
||||
{
|
||||
// Not at the end.
|
||||
// Existing element?
|
||||
if (value.first == i_element->first)
|
||||
{
|
||||
// Yes.
|
||||
i_element->second = value.second;
|
||||
result.first = i_element;
|
||||
result.second = false;
|
||||
}
|
||||
else
|
||||
if (value.first != i_element->first)
|
||||
{
|
||||
// A new one.
|
||||
ETL_ASSERT(!buffer.full(), ETL_ERROR(flat_map_full));
|
||||
@ -331,7 +324,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_map.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_map_full if the flat_map is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full.
|
||||
///\param position The position to insert at.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -342,7 +335,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the flat_map.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_map_full if the flat_map does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_map_full if the flat_map does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -499,6 +492,19 @@ namespace etl
|
||||
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iflat_map& operator = (const iflat_map& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -512,6 +518,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
iflat_map(const iflat_map&);
|
||||
|
||||
buffer_t& buffer;
|
||||
};
|
||||
|
||||
|
||||
@ -214,8 +214,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the flat_multimap.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multimap_full if the flat_multimap does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multimap_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_multimap_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -237,7 +237,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_multimap.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multimap_full if the flat_multimap is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
std::pair<iterator, bool> insert(const value_type& value)
|
||||
@ -268,7 +268,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flast_multi.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_map_full if the flat_map is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full.
|
||||
///\param position The position to insert at.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -279,7 +279,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the flat_multimap.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multimap_full if the flat_multimap does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -439,6 +439,19 @@ namespace etl
|
||||
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iflat_multimap& operator = (const iflat_multimap& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -452,6 +465,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
iflat_multimap(const iflat_multimap&);
|
||||
|
||||
buffer_t& buffer;
|
||||
};
|
||||
|
||||
|
||||
@ -190,8 +190,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the flat_multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multiset_full if the flat_multiset does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multiset_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_multiset_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -214,7 +214,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multiset_full if the flat_multiset is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
std::pair<iterator, bool> insert(parameter_t value)
|
||||
@ -245,7 +245,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multiset_full if the flat_multiset is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset is already full.
|
||||
///\param position The position to insert at.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -256,7 +256,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the flat_multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_multiset_full if the flat_multiset does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -412,6 +412,19 @@ namespace etl
|
||||
return std::equal_range(cbegin(), cend(), key, TKeyCompare());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iflat_multiset& operator = (const iflat_multiset& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -425,6 +438,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
iflat_multiset(const iflat_multiset&);
|
||||
|
||||
buffer_t& buffer;
|
||||
};
|
||||
|
||||
|
||||
26
iflat_set.h
26
iflat_set.h
@ -190,8 +190,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the flat_set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits flat_set_full if the flat_set does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_set_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -213,7 +213,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_set_full if the flat_set is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
std::pair<iterator, bool> insert(parameter_t value)
|
||||
@ -253,7 +253,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the flat_set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set is already full.
|
||||
/// If asserts or exceptions are enabled, emits flat_set_full if the flat_set is already full.
|
||||
///\param position The position to insert at.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -264,7 +264,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the flat_set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits flat_set_full if the flat_set does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -417,6 +417,19 @@ namespace etl
|
||||
return std::upper_bound(cbegin(), cend(), key, TKeyCompare());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iflat_set& operator = (const iflat_set& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -430,6 +443,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
iflat_set(const iflat_set&);
|
||||
|
||||
buffer_t& buffer;
|
||||
};
|
||||
|
||||
|
||||
@ -320,16 +320,6 @@ namespace etl
|
||||
return const_iterator();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iforward_list& operator = (const iforward_list& rhs)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Clears the forward_list.
|
||||
//*************************************************************************
|
||||
@ -356,7 +346,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns a range of values to the forward_list.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined throws etl::forward_list_full if the forward_list does not have enough free space.
|
||||
/// If asserts or exceptions are enabled throws etl::forward_list_full if the forward_list does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws forward_list_iterator if the iterators are reversed.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
@ -451,7 +441,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Resizes the forward_list.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, will throw an etl::forward_list_full
|
||||
/// If asserts or exceptions are enabled, will throw an etl::forward_list_full
|
||||
/// if <b>n</b> is larger than the maximum size.
|
||||
//*************************************************************************
|
||||
void resize(size_t n, T value)
|
||||
@ -795,6 +785,19 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iforward_list& operator = (const iforward_list& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -804,7 +807,20 @@ namespace etl
|
||||
: forward_list_base(max_size_),
|
||||
p_node_pool(&node_pool)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the forward_list.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
start_node.next = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -865,20 +881,6 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the forward_list.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
start_node.next = nullptr;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Allocate a Data_Node.
|
||||
//*************************************************************************
|
||||
@ -894,6 +896,9 @@ namespace etl
|
||||
{
|
||||
p_node_pool->release(node);
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
iforward_list(const iforward_list&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
45
ilist.h
45
ilist.h
@ -445,7 +445,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns a range of values to the list.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined throws etl::list_full if the list does not have enough free space.
|
||||
/// If asserts or exceptions are enabled throws etl::list_full if the list does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws list_iterator if the iterators are reversed.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
@ -884,6 +884,19 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
ilist& operator = (const ilist& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -893,7 +906,20 @@ namespace etl
|
||||
: list_base(max_size_),
|
||||
p_node_pool(&node_pool)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the list.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
join(terminal_node, terminal_node);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -929,19 +955,8 @@ namespace etl
|
||||
p_node_pool->release(&node);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the list.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
join(terminal_node, terminal_node);
|
||||
}
|
||||
// Disable copy construction.
|
||||
ilist(const ilist&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
62
imap.h
62
imap.h
@ -517,7 +517,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns a reference to the value at index 'key'
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits an etl::lookup_out_of_bounds if the key is not in the range.
|
||||
/// If asserts or exceptions are enabled, emits an etl::lookup_out_of_bounds if the key is not in the range.
|
||||
///\param i The index.
|
||||
///\return A reference to the value at index 'key'
|
||||
//*********************************************************************
|
||||
@ -532,7 +532,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns a const reference to the value at index 'key'
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits an etl::lookup_out_of_bounds if the key is not in the range.
|
||||
/// If asserts or exceptions are enabled, emits an etl::lookup_out_of_bounds if the key is not in the range.
|
||||
///\param i The index.
|
||||
///\return A const reference to the value at index 'key'
|
||||
//*********************************************************************
|
||||
@ -547,8 +547,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the map.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the map does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the map does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits map_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -682,7 +682,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the map.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the map is already full.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the map is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
std::pair<iterator, bool> insert(const value_type& value)
|
||||
@ -706,7 +706,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the map starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the map is already full.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the map is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -729,7 +729,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the map starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the map is already full.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the map is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -752,7 +752,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the map.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the map does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the map does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -810,6 +810,20 @@ namespace etl
|
||||
return const_iterator(*this, find_upper_node(root_node, key));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
imap& operator = (const imap& rhs)
|
||||
{
|
||||
// Skip if doing self assignment
|
||||
if (this != &rhs)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -819,7 +833,20 @@ namespace etl
|
||||
: map_base(max_size_)
|
||||
, p_node_pool(&node_pool)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the map.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -840,20 +867,6 @@ namespace etl
|
||||
p_node_pool->release(&node);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the map.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Find the value matching the node provided
|
||||
//*************************************************************************
|
||||
@ -1581,6 +1594,9 @@ namespace etl
|
||||
// Return node found (might be nullptr)
|
||||
return found;
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
imap(const imap&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
58
imultimap.h
58
imultimap.h
@ -498,8 +498,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the multimap.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the multimap does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the multimap does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits map_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -648,7 +648,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the multimap.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the multimap is already full.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the multimap is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
iterator insert(const value_type& value)
|
||||
@ -670,7 +670,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the multimap starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the multimap is already full.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the multimap is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -682,7 +682,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the multimap starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the multimap is already full.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the multimap is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -694,7 +694,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the multimap.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits map_full if the multimap does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits map_full if the multimap does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -757,6 +757,20 @@ namespace etl
|
||||
return const_iterator(*this, find_upper_node(root_node, key));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
imultimap& operator = (const imultimap& rhs)
|
||||
{
|
||||
// Skip if doing self assignment
|
||||
if (this != &rhs)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -766,7 +780,20 @@ namespace etl
|
||||
: multimap_base(max_size_)
|
||||
, p_node_pool(&node_pool)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the multimap.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -787,20 +814,6 @@ namespace etl
|
||||
p_node_pool->release(&node);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the multimap.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Count the nodes that match the key provided
|
||||
//*************************************************************************
|
||||
@ -1319,6 +1332,9 @@ namespace etl
|
||||
destroy_data_node(data_node);
|
||||
} // if(found)
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
imultimap(const imultimap&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
58
imultiset.h
58
imultiset.h
@ -479,8 +479,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the multiset does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the multiset does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits set_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -629,7 +629,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the multiset is already full.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the multiset is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
iterator insert(const value_type& value)
|
||||
@ -651,7 +651,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the multiset starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the multiset is already full.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the multiset is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -663,7 +663,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the multiset starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the multiset is already full.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the multiset is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -675,7 +675,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the multiset.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the multiset does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the multiset does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -738,6 +738,20 @@ namespace etl
|
||||
return const_iterator(*this, find_upper_node(root_node, key));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
imultiset& operator = (const imultiset& rhs)
|
||||
{
|
||||
// Skip if doing self assignment
|
||||
if (this != &rhs)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -747,7 +761,20 @@ namespace etl
|
||||
: multiset_base(max_size_)
|
||||
, p_node_pool(&node_pool)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the multiset.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -768,20 +795,6 @@ namespace etl
|
||||
p_node_pool->release(&node);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the multiset.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Count the nodes that match the key provided
|
||||
//*************************************************************************
|
||||
@ -1300,6 +1313,9 @@ namespace etl
|
||||
destroy_data_node(data_node);
|
||||
} // if(found)
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
imultiset(const imultiset&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
16
ipool.h
16
ipool.h
@ -132,7 +132,6 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
//*******************************
|
||||
//*******************************
|
||||
iterator(size_t index,
|
||||
pointer p_buffer,
|
||||
@ -232,7 +231,6 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
//*******************************
|
||||
//*******************************
|
||||
const_iterator(size_t index,
|
||||
const_pointer p_buffer,
|
||||
@ -317,7 +315,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Allocate an object from the pool.
|
||||
/// Uses the default constructor.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined and there are no more free items an
|
||||
/// If asserts or exceptions are enabled and there are no more free items an
|
||||
/// etl::pool_no_allocation if thrown, otherwise a nullptr is returned.
|
||||
/// \note The state of the object returned is undefined.
|
||||
//*************************************************************************
|
||||
@ -338,7 +336,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Allocate an object from the pool from an ititial value.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined and there are no more free items an
|
||||
/// If asserts or exceptions are enabled and there are no more free items an
|
||||
/// etl::pool_no_allocation if thrown, otherwise a nullptr is returned.
|
||||
/// \note The state of the object returned is undefined.
|
||||
//*************************************************************************
|
||||
@ -359,7 +357,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Release an object in the pool.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined and the object does not belong to this
|
||||
/// If asserts or exceptions are enabled and the object does not belong to this
|
||||
/// pool then an etl::pool_object_not_in_pool is thrown.
|
||||
/// \param p_object A pointer to the object to be released.
|
||||
//*************************************************************************
|
||||
@ -370,7 +368,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Release an object in the pool.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined and the object does not belong to this
|
||||
/// If asserts or exceptions are enabled and the object does not belong to this
|
||||
/// pool then an etl::pool_object_not_in_pool is thrown.
|
||||
/// \param p_object A pointer to the object to be released.
|
||||
//*************************************************************************
|
||||
@ -503,6 +501,12 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction and assignment.
|
||||
ipool(const ipool&);
|
||||
ipool& operator =(const ipool&);
|
||||
|
||||
T* p_buffer;
|
||||
ibitset& in_use_flags;
|
||||
};
|
||||
|
||||
@ -30,18 +30,64 @@ SOFTWARE.
|
||||
|
||||
#ifndef __ETL_IPRIORITY_QUEUE__
|
||||
#define __ETL_IPRIORITY_QUEUE__
|
||||
#define __ETL_IN_IPRIORITY_QUEUE_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "private/priority_queue_base.h"
|
||||
#include "type_traits.h"
|
||||
#include "parameter_type.h"
|
||||
#include "error_handler.h"
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#include "../exception.h"
|
||||
#include "../error_handler.h"
|
||||
|
||||
#undef ETL_FILE
|
||||
#define ETL_FILE "12"
|
||||
|
||||
//***************************************************************************
|
||||
/// The base class for priority_queue exceptions.
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_exception : public exception
|
||||
{
|
||||
public:
|
||||
|
||||
priority_queue_exception(string_type what, string_type file_name, numeric_type line_number)
|
||||
: exception(what, file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The exception thrown when the queue is full.
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_full : public priority_queue_exception
|
||||
{
|
||||
public:
|
||||
|
||||
priority_queue_full(string_type file_name, numeric_type line_number)
|
||||
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:full", ETL_FILE"A"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The priority queue iterator exception on reversed iterators
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_iterator : public priority_queue_exception
|
||||
{
|
||||
public:
|
||||
|
||||
priority_queue_iterator(string_type file_name, numeric_type line_number)
|
||||
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:iterator", ETL_FILE"B"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup queue
|
||||
///\brief This is the base for all priority queues that contain a particular type.
|
||||
@ -59,7 +105,7 @@ namespace etl
|
||||
/// \tparam TCompare to use in comparing T values
|
||||
//***************************************************************************
|
||||
template <typename T, typename TContainer, typename TCompare>
|
||||
class ipriority_queue : public priority_queue_base
|
||||
class ipriority_queue
|
||||
{
|
||||
public:
|
||||
|
||||
@ -68,7 +114,7 @@ namespace etl
|
||||
typedef TCompare compare_type; ///< The comparison type.
|
||||
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 priority_queue_base::size_type size_type; ///< The type used for determining the size of the queue.
|
||||
typedef typename TContainer::size_type size_type; ///< The type used for determining the size of the queue.
|
||||
typedef typename std::iterator_traits<typename TContainer::iterator>::difference_type difference_type;
|
||||
|
||||
private:
|
||||
@ -97,7 +143,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds a value to the queue.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::priority_queue_full
|
||||
/// If asserts or exceptions are enabled, throws an etl::priority_queue_full
|
||||
/// is the priority queue is already full, otherwise does nothing if full.
|
||||
///\param value The value to push to the queue.
|
||||
//*************************************************************************
|
||||
@ -107,26 +153,15 @@ namespace etl
|
||||
|
||||
// Put element at end
|
||||
container.push_back(value);
|
||||
// Pre-increment size
|
||||
++current_size;
|
||||
// Make elements in container into heap
|
||||
std::push_heap(container.begin(), container.end(), TCompare());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Clears the queue to the empty state.
|
||||
//*************************************************************************
|
||||
void clear()
|
||||
{
|
||||
container.clear();
|
||||
current_size = 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns values to the priority queue.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits priority_queue_full if
|
||||
/// If asserts or exceptions are enabled, emits priority_queue_full if
|
||||
/// priority queue does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits priority_iterator if the
|
||||
/// If asserts or exceptions are enabled, emits priority_iterator if the
|
||||
/// iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
@ -137,13 +172,12 @@ namespace etl
|
||||
#ifdef _DEBUG
|
||||
difference_type count = std::distance(first, last);
|
||||
ETL_ASSERT(count >= 0, ETL_ERROR(priority_queue_iterator));
|
||||
ETL_ASSERT(static_cast<size_t>(count) <= MAX_SIZE, ETL_ERROR(priority_queue_full));
|
||||
ETL_ASSERT(static_cast<size_t>(count) <= max_size(), ETL_ERROR(priority_queue_full));
|
||||
#endif
|
||||
|
||||
clear();
|
||||
container.assign(first, last);
|
||||
std::make_heap(container.begin(), container.end(), TCompare());
|
||||
current_size = container.size();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -158,11 +192,60 @@ namespace etl
|
||||
std::pop_heap(container.begin(), container.end(), TCompare());
|
||||
// Actually remove largest element at end
|
||||
container.pop_back();
|
||||
// Decrement size
|
||||
--current_size;
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the current number of items in the priority queue.
|
||||
//*************************************************************************
|
||||
size_type size() const
|
||||
{
|
||||
return container.size();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the maximum number of items that can be queued.
|
||||
//*************************************************************************
|
||||
size_type max_size() const
|
||||
{
|
||||
return container.max_size();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if the priority queue is empty.
|
||||
/// \return <b>true</b> if the queue is empty, otherwise <b>false</b>
|
||||
//*************************************************************************
|
||||
bool empty() const
|
||||
{
|
||||
return container.empty();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if the priority queue is full.
|
||||
/// \return <b>true</b> if the priority queue is full, otherwise <b>false</b>
|
||||
//*************************************************************************
|
||||
bool full() const
|
||||
{
|
||||
return container.size() == container.max_size();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the remaining capacity.
|
||||
///\return The remaining capacity.
|
||||
//*************************************************************************
|
||||
size_t available() const
|
||||
{
|
||||
return container.max_size() - container.size();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Clears the queue to the empty state.
|
||||
//*************************************************************************
|
||||
void clear()
|
||||
{
|
||||
container.clear();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -176,17 +259,19 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// The constructor that is called from derived classes.
|
||||
//*************************************************************************
|
||||
ipriority_queue(size_type max_size)
|
||||
: priority_queue_base(max_size)
|
||||
ipriority_queue()
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
ipriority_queue(const ipriority_queue&);
|
||||
|
||||
/// The container specified at instantiation of the priority_queue
|
||||
TContainer container;
|
||||
};
|
||||
}
|
||||
|
||||
#undef __ETL_IN_IPRIORITY_QUEUE_H__
|
||||
#undef ETL_FILE
|
||||
#endif
|
||||
|
||||
20
iqueue.h
20
iqueue.h
@ -108,7 +108,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds a value to the queue.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::queue_full is the queue is already full,
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full is the queue is already full,
|
||||
/// otherwise does nothing if full.
|
||||
///\param value The value to push to the queue.
|
||||
//*************************************************************************
|
||||
@ -126,7 +126,7 @@ namespace etl
|
||||
/// Allows a possibly more efficient 'push' by moving to the next input value
|
||||
/// and returning a reference to it.
|
||||
/// This may eliminate a copy by allowing direct construction in-place.<br>
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::queue_full is the queue is already full,
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full is the queue is already full,
|
||||
/// otherwise does nothing if full.
|
||||
/// \return A reference to the position to 'push' to.
|
||||
//*************************************************************************
|
||||
@ -174,6 +174,19 @@ namespace etl
|
||||
--current_size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
iqueue& operator = (const iqueue& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
clone(rhs);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -201,6 +214,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
iqueue(const iqueue&);
|
||||
|
||||
T* p_buffer; ///< The internal buffer.
|
||||
};
|
||||
}
|
||||
|
||||
49
iset.h
49
iset.h
@ -386,7 +386,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
iset& operator = (const iset& rhs)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
if (this != &rhs)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -489,8 +492,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the set does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the set does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits set_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -624,7 +627,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the set is already full.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the set is already full.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
std::pair<iterator, bool> insert(value_type& value)
|
||||
@ -648,7 +651,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the set starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the set is already full.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the set is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -671,7 +674,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the set starting at the position recommended.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the set is already full.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the set is already full.
|
||||
///\param position The position that would precede the value to insert.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -694,7 +697,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the set.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits set_full if the set does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits set_full if the set does not have enough free space.
|
||||
///\param position The position to insert at.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -761,7 +764,20 @@ namespace etl
|
||||
: set_base(max_size_)
|
||||
, p_node_pool(&node_pool)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the set.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -782,20 +798,6 @@ namespace etl
|
||||
p_node_pool->release(&node);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Initialise the set.
|
||||
//*************************************************************************
|
||||
void initialise()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
p_node_pool->release_all();
|
||||
}
|
||||
|
||||
current_size = 0;
|
||||
root_node = nullptr;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Find the value matching the node provided
|
||||
//*************************************************************************
|
||||
@ -1523,6 +1525,9 @@ namespace etl
|
||||
// Return node found (might be nullptr)
|
||||
return found;
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
iset(const iset&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
20
istack.h
20
istack.h
@ -81,7 +81,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds a value to the stack.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::stack_full is the stack is already full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::stack_full is the stack is already full.
|
||||
///\param value The value to push to the stack.
|
||||
//*************************************************************************
|
||||
void push(parameter_t value)
|
||||
@ -97,7 +97,7 @@ namespace etl
|
||||
/// Allows a possibly more efficient 'push' by moving to the next input value
|
||||
/// and returning a reference to it.
|
||||
/// This may eliminate a copy by allowing direct construction in-place.<br>
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws an etl::stack_full is the stack is already full.
|
||||
/// If asserts or exceptions are enabled, throws an etl::stack_full is the stack is already full.
|
||||
/// \return A reference to the position to 'push' to.
|
||||
//*************************************************************************
|
||||
reference push()
|
||||
@ -147,6 +147,19 @@ namespace etl
|
||||
--current_size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
istack& operator = (const istack& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
clone(rhs);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -173,6 +186,9 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy construction.
|
||||
istack(const istack&);
|
||||
|
||||
T* p_buffer; ///< The internal buffer.
|
||||
};
|
||||
}
|
||||
|
||||
45
ivector.h
45
ivector.h
@ -187,7 +187,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Resizes the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined and the new size is larger than the
|
||||
/// If asserts or exceptions are enabled and the new size is larger than the
|
||||
/// maximum then a vector_full is thrown.
|
||||
///\param new_size The new size.
|
||||
//*********************************************************************
|
||||
@ -217,7 +217,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Resizes the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined and the new size is larger than the
|
||||
/// If asserts or exceptions are enabled and the new size is larger than the
|
||||
/// maximum then a vector_full is thrown.
|
||||
///\param new_size The new size.
|
||||
///\param value The value to fill new elements with. Default = default constructed value.
|
||||
@ -266,7 +266,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns a reference to the value at index 'i'
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits an etl::vector_out_of_bounds if the index is out of range.
|
||||
/// If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.
|
||||
///\param i The index.
|
||||
///\return A reference to the value at index 'i'
|
||||
//*********************************************************************
|
||||
@ -278,7 +278,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns a const reference to the value at index 'i'
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits an etl::vector_out_of_bounds if the index is out of range.
|
||||
/// If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.
|
||||
///\param i The index.
|
||||
///\return A const reference to the value at index 'i'
|
||||
//*********************************************************************
|
||||
@ -344,8 +344,8 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_full if the vector does not have enough free space.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_iterator if the iterators are reversed.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits vector_iterator if the iterators are reversed.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*********************************************************************
|
||||
@ -370,7 +370,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Assigns values to the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_full if the vector does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.
|
||||
///\param n The number of elements to add.
|
||||
///\param value The value to insert for each element.
|
||||
//*********************************************************************
|
||||
@ -397,7 +397,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Increases the size of the vector by one, but does not initialise the new element.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, throws a vector_full if the vector is already full.
|
||||
/// If asserts or exceptions are enabled, throws a vector_full if the vector is already full.
|
||||
//*************************************************************************
|
||||
void push_back()
|
||||
{
|
||||
@ -409,7 +409,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value at the end of the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_full if the vector is already full.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector is already full.
|
||||
///\param value The value to add.
|
||||
//*********************************************************************
|
||||
void push_back(parameter_t value)
|
||||
@ -434,7 +434,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a value to the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_full if the vector is already full.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector is already full.
|
||||
///\param position The position to insert before.
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
@ -455,7 +455,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts 'n' values to the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_full if the vector does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.
|
||||
///\param position The position to insert before.
|
||||
///\param n The number of elements to add.
|
||||
///\param value The value to insert.
|
||||
@ -514,7 +514,7 @@ namespace etl
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts a range of values to the vector.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined, emits vector_full if the vector does not have enough free space.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.
|
||||
///\param position The position to insert before.
|
||||
///\param first The first element to add.
|
||||
///\param last The last + 1 element to add.
|
||||
@ -610,6 +610,19 @@ namespace etl
|
||||
return first;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
ivector& operator = (const ivector& rhs)
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -619,11 +632,8 @@ namespace etl
|
||||
: vector_base(MAX_SIZE),
|
||||
p_buffer(p_buffer)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
//*********************************************************************
|
||||
/// Initialise the vector.
|
||||
//*********************************************************************
|
||||
@ -635,6 +645,8 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
//*********************************************************************
|
||||
/// Create a new element with a default value at the back.
|
||||
//*********************************************************************
|
||||
@ -667,6 +679,9 @@ namespace etl
|
||||
p_buffer[--current_size].~T();
|
||||
}
|
||||
|
||||
// Disable copy construction.
|
||||
ivector(const ivector&);
|
||||
|
||||
T* p_buffer;
|
||||
};
|
||||
|
||||
|
||||
6
list.h
6
list.h
@ -71,6 +71,7 @@ namespace etl
|
||||
list()
|
||||
: ilist<T>(node_pool, MAX_SIZE)
|
||||
{
|
||||
ilist<T>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -97,7 +98,10 @@ namespace etl
|
||||
list(const list& other)
|
||||
: ilist<T>(node_pool, MAX_SIZE)
|
||||
{
|
||||
ilist<T>::assign(other.cbegin(), other.cend());
|
||||
if (this != &other)
|
||||
{
|
||||
ilist<T>::assign(other.cbegin(), other.cend());
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
3
map.h
3
map.h
@ -63,6 +63,7 @@ namespace etl
|
||||
map()
|
||||
: imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
imap<TKey, TValue, TCompare>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -84,7 +85,7 @@ namespace etl
|
||||
map(TIterator first, TIterator last)
|
||||
: imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
imap<TKey, TValue, TCompare>::insert(first, last);
|
||||
imap<TKey, TValue, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -62,6 +62,7 @@ namespace etl
|
||||
multimap()
|
||||
: imultimap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
imultimap<TKey, TValue, TCompare>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -83,7 +84,7 @@ namespace etl
|
||||
multimap(TIterator first, TIterator last)
|
||||
: imultimap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
imultimap<TKey, TValue, TCompare>::insert(first, last);
|
||||
imultimap<TKey, TValue, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -62,6 +62,7 @@ namespace etl
|
||||
multiset()
|
||||
: imultiset<T, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
imultiset<T, TCompare>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -83,7 +84,7 @@ namespace etl
|
||||
multiset(TIterator first, TIterator last)
|
||||
: imultiset<T, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
imultiset<T, TCompare>::insert(first, last);
|
||||
imultiset<T, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -49,7 +49,6 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Calculates the murmur3 hash.
|
||||
/// See https://en.wikipedia.org/wiki/MurmurHash for more details.
|
||||
///\tparam ENDIANNESS The endianness of the calculation for input types larger than uint8_t. Default = endian::little.
|
||||
///\ingroup murmur3
|
||||
//***************************************************************************
|
||||
template <typename THash>
|
||||
|
||||
@ -106,7 +106,7 @@ namespace etl
|
||||
|
||||
//*****************************************************************
|
||||
/// Add an observer to the list.
|
||||
/// If ETL_THROW_EXCEPTIONS is defined then an etl::observable_observer_list_full
|
||||
/// If asserts or exceptions are enabled then an etl::observable_observer_list_full
|
||||
/// is emitted if the observer list is already full.
|
||||
///\param observer A reference to the observer.
|
||||
//*****************************************************************
|
||||
|
||||
25
optional.h
25
optional.h
@ -171,21 +171,24 @@ namespace etl
|
||||
//***************************************************************************
|
||||
optional& operator =(const optional& other)
|
||||
{
|
||||
if (valid && !bool(other))
|
||||
if (this != &other)
|
||||
{
|
||||
storage.template get_reference<T>().~T();
|
||||
valid = false;
|
||||
}
|
||||
else if (bool(other))
|
||||
{
|
||||
if (valid)
|
||||
if (valid && !bool(other))
|
||||
{
|
||||
storage.template get_reference<T>() = other.value();
|
||||
storage.template get_reference<T>().~T();
|
||||
valid = false;
|
||||
}
|
||||
else
|
||||
else if (bool(other))
|
||||
{
|
||||
new (storage.template get_address<T>()) T(other.value());
|
||||
valid = true;
|
||||
if (valid)
|
||||
{
|
||||
storage.template get_reference<T>() = other.value();
|
||||
}
|
||||
else
|
||||
{
|
||||
new (storage.template get_address<T>()) T(other.value());
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
pool.h
4
pool.h
@ -80,6 +80,10 @@ namespace etl
|
||||
|
||||
///< The set of flags that indicate which items are free in the pool.
|
||||
bitset<SIZE> in_use;
|
||||
|
||||
// Should not be copied.
|
||||
pool(const pool&);
|
||||
pool& operator =(const pool&);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ namespace etl
|
||||
/// Default constructor.
|
||||
//*************************************************************************
|
||||
priority_queue()
|
||||
: ipriority_queue<T, TContainer, TCompare>(SIZE)
|
||||
: ipriority_queue<T, TContainer, TCompare>()
|
||||
{
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ namespace etl
|
||||
/// Copy constructor
|
||||
//*************************************************************************
|
||||
priority_queue(const priority_queue& rhs)
|
||||
: ipriority_queue<T, TContainer, TCompare>(SIZE)
|
||||
: ipriority_queue<T, TContainer, TCompare>()
|
||||
{
|
||||
ipriority_queue<T, TContainer, TCompare>::clone(rhs);
|
||||
}
|
||||
@ -84,7 +84,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
priority_queue(TIterator first, TIterator last)
|
||||
: ipriority_queue<T, TContainer, TCompare>(SIZE)
|
||||
: ipriority_queue<T, TContainer, TCompare>()
|
||||
{
|
||||
ipriority_queue<T, TContainer, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
@ -93,6 +93,14 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the maximum number of items in the pool.
|
||||
//*************************************************************************
|
||||
size_t max_size() const
|
||||
{
|
||||
return MAX_SIZE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the number of free items in the pool.
|
||||
//*************************************************************************
|
||||
@ -102,10 +110,27 @@ namespace etl
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if there are no free items in the pool.
|
||||
/// \return <b>true</b> if there are none free (or 'empty')
|
||||
/// Returns the number of allocated items in the pool.
|
||||
//*************************************************************************
|
||||
bool none_free() const
|
||||
size_t size() const
|
||||
{
|
||||
return items_allocated;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if there are no allocated items in the pool.
|
||||
/// \return <b>true</b> if there are none allocated.
|
||||
//*************************************************************************
|
||||
bool empty() const
|
||||
{
|
||||
return items_allocated == 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if there are no free items in the pool.
|
||||
/// \return <b>true</b> if there are none free.
|
||||
//*************************************************************************
|
||||
bool full() const
|
||||
{
|
||||
return items_allocated == MAX_SIZE;
|
||||
}
|
||||
|
||||
@ -1,161 +0,0 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
http://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2015 jwellbelove, rlindeman
|
||||
|
||||
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.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __ETL_IN_IPRIORITY_QUEUE_H__
|
||||
#error This header is a private element of etl::priority_queue & etl::ipriority_queue
|
||||
#endif
|
||||
|
||||
#ifndef __ETL_PRIORITY_QUEUE_BASE__
|
||||
#define __ETL_PRIORITY_QUEUE_BASE__
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "../exception.h"
|
||||
#include "../error_handler.h"
|
||||
|
||||
#undef ETL_FILE
|
||||
#define ETL_FILE "12"
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
/// The base class for priority_queue exceptions.
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_exception : public exception
|
||||
{
|
||||
public:
|
||||
|
||||
priority_queue_exception(string_type what, string_type file_name, numeric_type line_number)
|
||||
: exception(what, file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The exception thrown when the queue is full.
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_full : public priority_queue_exception
|
||||
{
|
||||
public:
|
||||
|
||||
priority_queue_full(string_type file_name, numeric_type line_number)
|
||||
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:full", ETL_FILE"A"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The priority queue iterator exception on reversed iterators
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_iterator : public priority_queue_exception
|
||||
{
|
||||
public:
|
||||
|
||||
priority_queue_iterator(string_type file_name, numeric_type line_number)
|
||||
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:iterator", ETL_FILE"B"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The base class for all priority queues.
|
||||
///\ingroup queue
|
||||
//***************************************************************************
|
||||
class priority_queue_base
|
||||
{
|
||||
public:
|
||||
|
||||
typedef size_t size_type; ///< The type used for determining the size of queue.
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the current number of items in the priority queue.
|
||||
//*************************************************************************
|
||||
size_type size() const
|
||||
{
|
||||
return current_size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the maximum number of items that can be queued.
|
||||
//*************************************************************************
|
||||
size_type max_size() const
|
||||
{
|
||||
return MAX_SIZE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if the priority queue is empty.
|
||||
/// \return <b>true</b> if the queue is empty, otherwise <b>false</b>
|
||||
//*************************************************************************
|
||||
bool empty() const
|
||||
{
|
||||
return current_size == 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if the priority queue is full.
|
||||
/// \return <b>true</b> if the priority queue is full, otherwise <b>false</b>
|
||||
//*************************************************************************
|
||||
bool full() const
|
||||
{
|
||||
return current_size == MAX_SIZE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the remaining capacity.
|
||||
///\return The remaining capacity.
|
||||
//*************************************************************************
|
||||
size_t available() const
|
||||
{
|
||||
return max_size() - size();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
/// The constructor that is called from derived classes.
|
||||
//*************************************************************************
|
||||
priority_queue_base(size_type max_size)
|
||||
: current_size(0),
|
||||
MAX_SIZE(max_size)
|
||||
{
|
||||
}
|
||||
|
||||
size_type current_size; ///< The number of items in the priority queue.
|
||||
const size_type MAX_SIZE; ///< The maximum number of items in the priority queue.
|
||||
};
|
||||
}
|
||||
|
||||
#undef ETL_FILE
|
||||
|
||||
#endif
|
||||
@ -1,170 +0,0 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
http://www.etlcpp.com
|
||||
|
||||
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.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __ETL_IN_IUNORDERED_MAP_H__
|
||||
#error This header is a private element of etl::unordered_map & etl::iunordered_map
|
||||
#endif
|
||||
|
||||
#ifndef __ETL_UNORDERED_MAP_BASE__
|
||||
#define __ETL_UNORDERED_MAP_BASE__
|
||||
|
||||
#include <stddef.h>
|
||||
#include "../exception.h"
|
||||
#include "../error_handler.h"
|
||||
|
||||
#define ETL_FILE "16"
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
/// Exception for the unordered_map.
|
||||
///\ingroup unordered_map
|
||||
//***************************************************************************
|
||||
class unordered_map_exception : public exception
|
||||
{
|
||||
public:
|
||||
|
||||
unordered_map_exception(string_type what, string_type file_name, numeric_type line_number)
|
||||
: exception(what, file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Full exception for the unordered_map.
|
||||
///\ingroup unordered_map
|
||||
//***************************************************************************
|
||||
class unordered_map_full : public unordered_map_exception
|
||||
{
|
||||
public:
|
||||
|
||||
unordered_map_full(string_type file_name, numeric_type line_number)
|
||||
: unordered_map_exception(ETL_ERROR_TEXT("unordered_map:full", ETL_FILE"A"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Out of range exception for the unordered_map.
|
||||
///\ingroup unordered_map
|
||||
//***************************************************************************
|
||||
class unordered_map_out_of_range : public unordered_map_exception
|
||||
{
|
||||
public:
|
||||
|
||||
unordered_map_out_of_range(string_type file_name, numeric_type line_number)
|
||||
: unordered_map_exception(ETL_ERROR_TEXT("unordered_map:range", ETL_FILE"B"), file_name, line_number)
|
||||
{}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Iterator exception for the unordered_map.
|
||||
///\ingroup unordered_map
|
||||
//***************************************************************************
|
||||
class unordered_map_iterator : public unordered_map_exception
|
||||
{
|
||||
public:
|
||||
|
||||
unordered_map_iterator(string_type file_name, numeric_type line_number)
|
||||
: unordered_map_exception("unordered_map:iterator", file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The base class for all unordered_maps.
|
||||
///\ingroup unordered_map
|
||||
//***************************************************************************
|
||||
class unordered_map_base
|
||||
{
|
||||
public:
|
||||
|
||||
typedef size_t size_type; ///< The type used for determining the size of unordered_map.
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the size of the unordered_map.
|
||||
//*************************************************************************
|
||||
size_type size() const
|
||||
{
|
||||
return current_size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the maximum possible size of the unordered_map.
|
||||
//*************************************************************************
|
||||
size_type max_size() const
|
||||
{
|
||||
return MAX_SIZE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if the unordered_map is empty.
|
||||
//*************************************************************************
|
||||
bool empty() const
|
||||
{
|
||||
return current_size == 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Checks to see if the unordered_map is full.
|
||||
//*************************************************************************
|
||||
bool full() const
|
||||
{
|
||||
return current_size == MAX_SIZE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the remaining capacity.
|
||||
///\return The remaining capacity.
|
||||
//*************************************************************************
|
||||
size_t available() const
|
||||
{
|
||||
return max_size() - size();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
/// The constructor that is called from derived classes.
|
||||
//*************************************************************************
|
||||
unordered_map_base(size_type max_size)
|
||||
: current_size(0),
|
||||
MAX_SIZE(max_size)
|
||||
{
|
||||
}
|
||||
|
||||
size_type current_size; ///< The number of the used nodes.
|
||||
const size_type MAX_SIZE; ///< The maximum size of the unordered_map.
|
||||
};
|
||||
}
|
||||
|
||||
#undef ETL_FILE
|
||||
|
||||
#endif
|
||||
3
set.h
3
set.h
@ -63,6 +63,7 @@ namespace etl
|
||||
set()
|
||||
: iset<T, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
iset<T, TCompare>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -84,7 +85,7 @@ namespace etl
|
||||
set(TIterator first, TIterator last)
|
||||
: iset<T, TCompare>(node_pool, MAX_SIZE)
|
||||
{
|
||||
iset<T, TCompare>::insert(first, last);
|
||||
iset<T, TCompare>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
33
test/TrueStudio/ETL/src/main.cpp
Normal file
33
test/TrueStudio/ETL/src/main.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
|
||||
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.
|
||||
******************************************************************************/
|
||||
|
||||
#include <UnitTest++/UnitTest++.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
return UnitTest::RunAllTests();
|
||||
}
|
||||
@ -14,8 +14,13 @@
|
||||
<Compiler>
|
||||
<Add option="-std=c++11" />
|
||||
<Add option="-g" />
|
||||
<Add option="-D_DEBUG" />
|
||||
<Add option="-DUNITTEST_MINGW" />
|
||||
<Add option="-DPLATFORM_WINDOWS" />
|
||||
<Add option="-DCOMPILER_GCC" />
|
||||
<Add option="-DETL_THROW_EXCEPTIONS" />
|
||||
<Add option="-DETL_VERBOSE_ERRORS" />
|
||||
<Add option="-DETL_CHECK_PUSH_POP" />
|
||||
</Compiler>
|
||||
<ExtraCommands>
|
||||
<Add after="bin\Debug\ETL.exe" />
|
||||
@ -31,7 +36,12 @@
|
||||
<Add option="-std=c++11" />
|
||||
<Add option="-g" />
|
||||
<Add option="-D_DEBUG" />
|
||||
<Add option="-DUNITTEST_MINGW" />
|
||||
<Add option="-DPLATFORM_LINUX" />
|
||||
<Add option="-DCOMPILER_GCC" />
|
||||
<Add option="-DETL_THROW_EXCEPTIONS" />
|
||||
<Add option="-DETL_VERBOSE_ERRORS" />
|
||||
<Add option="-DETL_CHECK_PUSH_POP" />
|
||||
</Compiler>
|
||||
<ExtraCommands>
|
||||
<Add after="bin/Debug/ETL" />
|
||||
@ -42,6 +52,7 @@
|
||||
<Compiler>
|
||||
<Add option="-std=c++11" />
|
||||
<Add option="-Wall" />
|
||||
<Add option="-g" />
|
||||
<Add option="-fexceptions" />
|
||||
<Add option="-DCOMPILER_GCC" />
|
||||
<Add option="-DETL_THROW_EXCEPTIONS" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,349 +1,389 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<ActiveTarget name="Windows" />
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1247" topLine="2" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_hash.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4733" topLine="114" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\vector_base.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1551" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\observer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5579" topLine="130" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_map.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4405" topLine="112" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\map_base.h" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5149" topLine="121" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\imap.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="50514" topLine="1440" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\type_traits.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11681" topLine="241" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\array.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1998" topLine="258" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_vector.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5103" topLine="122" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_bitset.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12502" topLine="402" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="245" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Test.cpp" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="662" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_pool.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1646" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\queue.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2984" topLine="48" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\ilist.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="17660" topLine="539" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\container.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2523" topLine="42" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\ideque.h" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="43136" topLine="1333" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\pool.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<ActiveTarget name="Linux" />
|
||||
<File name="../../pool.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2334" topLine="35" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\endian.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_map.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2235" topLine="37" />
|
||||
<Cursor1 position="4405" topLine="112" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\ivector.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../ivector.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="13993" topLine="329" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_variant.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11763" topLine="384" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\nullptr.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="560" topLine="9" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestMacros.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1865" topLine="28" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\variant.h" open="0" top="0" tabpos="32" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="28033" topLine="664" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\deque_base.h" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\error_handler.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4037" topLine="53" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\flat_map_base.h" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1579" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Checks.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="469" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_io_port.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2724" topLine="58" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.cpp" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2020" topLine="25" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\lookup.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3734" topLine="55" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_deque.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="21475" topLine="641" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\map.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../map.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5955" topLine="137" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_set.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_set.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5885" topLine="199" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\list.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5955" topLine="137" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\io_port.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2314" topLine="48" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\deque.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4670" topLine="110" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="692" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\stack.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3203" topLine="57" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\bitset.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4838" topLine="145" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\alignment.h" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5607" topLine="134" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_optional.cpp" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3050" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\iset.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="48031" topLine="1364" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.cpp" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="257" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_array.cpp" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2869" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\set_base.h" open="0" top="0" tabpos="29" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5234" topLine="132" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\optional.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2746" topLine="58" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_algorithm.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1544" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\binary.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18374" topLine="466" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\static_assert.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../static_assert.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1356" topLine="10" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\bloom_filter.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../optional.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3055" topLine="57" />
|
||||
<Cursor1 position="2746" topLine="58" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\function.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_bitset.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3693" topLine="67" />
|
||||
<Cursor1 position="12502" topLine="402" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\main.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_maths.cpp" open="1" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="277" topLine="0" />
|
||||
<Cursor1 position="4690" topLine="145" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\cyclic_value.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3578" topLine="85" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_bloom_filter.cpp" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6035" topLine="180" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\multiset_base.h" open="0" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5342" topLine="125" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\vector_base.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2307" topLine="19" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\integral_limits.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2272" topLine="36" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_binary.cpp" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12186" topLine="452" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Config.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="777" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_integral_limits.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_integral_limits.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1416" topLine="13" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_cyclic_value.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_binary.cpp" open="1" top="1" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1365" topLine="12" />
|
||||
<Cursor1 position="28553" topLine="805" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\flat_multimap_base.h" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_io_port.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1604" topLine="0" />
|
||||
<Cursor1 position="2724" topLine="58" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\Doxyfile" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../../unittest-cpp/UnitTest++/Win32/TimeHelpers.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="56760" topLine="1251" />
|
||||
<Cursor1 position="245" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_queue.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../vector_base.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1603" topLine="28" />
|
||||
<Cursor1 position="2307" topLine="19" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\vector.h" open="0" top="0" tabpos="31" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../container.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2523" topLine="42" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_algorithm.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1544" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../error_handler.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4335" topLine="85" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../lookup.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3734" topLine="55" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../bloom_filter.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3055" topLine="57" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../observer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6219" topLine="130" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../variant.h" open="0" top="0" tabpos="32" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="28033" topLine="664" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../queue.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2984" topLine="48" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../io_port.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2314" topLine="48" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../imap.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="50514" topLine="1440" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../exception.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2826" topLine="31" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/multiset_base.h" open="0" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5342" topLine="125" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_vector.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5103" topLine="122" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../type_traits.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10003" topLine="241" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/TestRunner.cpp" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1941" topLine="41" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../vector.h" open="0" top="0" tabpos="31" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4075" topLine="67" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_type_traits.cpp" open="0" top="0" tabpos="30" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../test_cyclic_value.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="30352" topLine="372" />
|
||||
<Cursor1 position="1365" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\private\flat_set_base.h" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../private/flat_map_base.h" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1579" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/ExecuteTest.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1193" topLine="16" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../integral_limits.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2272" topLine="36" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_bloom_filter.cpp" open="1" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6486" topLine="227" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../ilist.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="17660" topLine="539" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../deque.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4670" topLine="110" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_queue.cpp" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4749" topLine="165" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/Checks.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="449" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/Win32/TimeHelpers.cpp" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="257" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../main.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="829" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/Test.cpp" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="628" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../stack.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3203" topLine="57" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../binary.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18374" topLine="466" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../function.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3693" topLine="67" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_exception.cpp" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1555" topLine="25" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_crc.cpp" open="1" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10782" topLine="346" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../nullptr.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="560" topLine="9" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_array.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2687" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_observer.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12567" topLine="397" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../alignment.h" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5607" topLine="134" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/TestRunner.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="772" topLine="2" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/flat_set_base.h" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1579" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../bitset.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4838" topLine="145" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_stack.cpp" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4455" topLine="170" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../cyclic_value.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3578" topLine="85" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/set_base.h" open="0" top="0" tabpos="29" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5234" topLine="132" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_type_traits.cpp" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="29522" topLine="417" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/deque_base.h" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../Doxyfile" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="56760" topLine="1251" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../iset.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="48031" topLine="1364" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_variant.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11763" topLine="384" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_alignment.cpp" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2717" topLine="52" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_deque.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="20639" topLine="642" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_error_handler.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2668" topLine="89" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/Config.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="777" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../../unittest-cpp/UnitTest++/TestMacros.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1865" topLine="28" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../array.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4196" topLine="109" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../list.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5955" topLine="137" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_optional.cpp" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3050" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/map_base.h" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5149" topLine="121" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/flat_multimap_base.h" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1604" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_hash.cpp" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5128" topLine="140" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../test_pool.cpp" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3188" topLine="66" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../endian.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2235" topLine="37" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../ideque.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="25700" topLine="811" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../private/vector_base.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1551" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
|
||||
@ -199,6 +199,7 @@
|
||||
<file>$PROJ_DIR$\..\..\bitset.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\pearson.__cstat.et</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\md5.__cstat.et</file>
|
||||
<file>$PROJ_DIR$\..\..\private\map_base.h</file>
|
||||
<file>$PROJ_DIR$\..\..\private\list_base.h</file>
|
||||
<file>$PROJ_DIR$\..\..\private\vector_base.h</file>
|
||||
<file>$PROJ_DIR$\..\..\private\pool_base.h</file>
|
||||
@ -503,11 +504,11 @@
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 220 215 15 113 86 82 202 132 56 173 100 40 154 218 198 46 125 211 96 38 51 156 217 203 177 207 219 121 107 181 41 35 170 221 209 144 214 222 7 201 212 22 11 200 73 204 185 187 194 19 186 190 54 37 31 48 102 174 216 199 197 160 168 208 213 210 178 3 13 1 20 10 2 114 150 66 196 44 206 135 146 205 179 180 176 9 14 21 6 4 16 17 12 8 18 5 0 119 59 87 78 193 195</file>
|
||||
<file> 221 82 144 199 132 154 40 220 8 198 156 38 194 196 51 173 210 208 176 14 15 5 200 121 73 187 119 212 114 46 190 181 41 35 170 19 217 218 203 216 209 215 179 9 21 6 4 18 96 186 87 193 54 37 31 48 102 174 89 222 202 160 168 213 205 206 180 204 16 17 12 0 125 86 59 78 66 207 135 146 214 219 211 201 223 177 178 3 13 7 1 22 20 10 11 2 150 56 185 113 197 195 44 107 100 95</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 187 220 216 201 199 132 154 135 160 144 168 146 197 214 206 207 208 217 211 209 198 202 221 215 203 218 210 212 204 205 213 200 219 222 179 180 176 177 178 3 14 9 21 6 13 15 4 7 16 17 22 20 10 2 11 8 1 18 5 12 0 19 156 173 125 186 121 181 73 114 46 150 56 190 96 86 66 185 119 113 38 54 41 37 40 31 35 48 51 59 196 102 170 87 194 174 78 82 44 193 107 100 195</file>
|
||||
<file> 187 221 217 202 200 132 154 135 160 144 168 146 198 215 207 208 209 218 212 210 199 203 222 216 204 219 211 213 205 206 214 201 220 223 179 180 176 177 178 3 14 9 21 6 13 15 4 7 16 17 22 20 10 2 11 8 1 18 5 12 0 19 156 173 125 186 121 181 73 114 46 150 56 190 96 86 66 185 119 113 38 54 41 37 40 31 35 48 51 59 197 102 170 87 195 174 78 82 44 194 107 100 196 89 95 193</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
|
||||
@ -24,7 +24,8 @@ ShowTimeSum=1
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints2]
|
||||
Count=0
|
||||
Bp0=_ 1 "STD_CODE2" "{$PROJ_DIR$\..\test_compile.cpp}.1.1" 0 0 1 "" 0 ""
|
||||
Count=1
|
||||
[Interrupts]
|
||||
Enabled=1
|
||||
[MemConfig]
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1395</ColumnWidth1><ColumnWidth2>372</ColumnWidth2><ColumnWidth3>93</ColumnWidth3></Build>
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1395</ColumnWidth1><ColumnWidth2>372</ColumnWidth2><ColumnWidth3>93</ColumnWidth3><PreferedWindows><Position>4</Position><ScreenPosX>1947</ScreenPosX><ScreenPosY>59</ScreenPosY><Windows/></PreferedWindows></Build>
|
||||
</Static>
|
||||
<Windows>
|
||||
|
||||
@ -36,30 +36,20 @@
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd4>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-15390-31123</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd4></Windows>
|
||||
<SelectedTab>0</SelectedTab></Wnd2></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\test_compile.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>10</SelStart2><SelEnd2>10</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\variant.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>753</YPos2><SelStart2>31086</SelStart2><SelEnd2>31086</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\error_handler.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>4743</SelStart2><SelEnd2>4743</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\md5.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>10</YPos2><SelStart2>3021</SelStart2><SelEnd2>3021</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\test_compile.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>337</YPos2><SelStart2>9539</SelStart2><SelEnd2>9539</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\variant.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>753</YPos2><SelStart2>31086</SelStart2><SelEnd2>31086</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\error_handler.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>4743</SelStart2><SelEnd2>4743</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\md5.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>10</YPos2><SelStart2>3021</SelStart2><SelEnd2>3021</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\map.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>27</YPos2><SelStart2>1478</SelStart2><SelEnd2>1478</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-06653EF8><key>iaridepm.enu1</key></Toolbar-06653EF8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>952</Bottom><Right>333</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>200602</sizeHorzCY><sizeVertCX>174479</sizeVertCX><sizeVertCY>956871</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes><Wnd4><Rect><Top>0</Top><Left>0</Left><Bottom>-1432619621</Bottom><Right>106902488</Right><x>-2</x><y>-2</y><FloatX>1938</FloatX><FloatY>25</FloatY><FloatWidth>1240</FloatWidth><FloatHeight>968</FloatHeight><xscreen>1924</xscreen><yscreen>200</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>200602</sizeHorzCY><sizeVertCX>104167</sizeVertCX><sizeVertCY>200602</sizeVertCY></Rect></Wnd4></Sizes></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-06653EF8><key>iaridepm.enu1</key></Toolbar-06653EF8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>952</Bottom><Right>333</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>200602</sizeHorzCY><sizeVertCX>174479</sizeVertCX><sizeVertCY>956871</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@ -92,8 +92,8 @@
|
||||
<MDIClientArea>
|
||||
<RegID>0</RegID>
|
||||
<MDITabState>
|
||||
<Len>693</Len>
|
||||
<Data>01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000006000000000000000100000044443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C746573745C746573745F636F6D70696C652E6370700000000010746573745F636F6D70696C652E63707000000000F7B88600FFFFFFFF3B443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726336345F65636D612E68000000000C63726336345F65636D612E68000000009CC1B600FFFFFFFF36443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C696C6973742E680000000007696C6973742E6800000000BCA8E100FFFFFFFF3A443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C616C676F726974686D2E68000000000B616C676F726974686D2E6800000000F0A0A100FFFFFFFF38443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C696269747365742E680000000009696269747365742E6800000000BECEA100FFFFFFFF37443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6269747365742E6800000000086269747365742E6800000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000940100006600000080070000FD030000</Data>
|
||||
<Len>788</Len>
|
||||
<Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000700000000000000010000003E443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6572726F725F68616E646C65722E68000000000F6572726F725F68616E646C65722E6800000000D9ADC200FFFFFFFF44443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C746573745C746573745F636F6D70696C652E6370700000000010746573745F636F6D70696C652E63707000000000F7B88600FFFFFFFF3B443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726336345F65636D612E68000000000C63726336345F65636D612E68000000009CC1B600FFFFFFFF36443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C696C6973742E680000000007696C6973742E6800000000BCA8E100FFFFFFFF3A443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C616C676F726974686D2E68000000000B616C676F726974686D2E6800000000F0A0A100FFFFFFFF38443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C696269747365742E680000000009696269747365742E6800000000BECEA100FFFFFFFF37443A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6269747365742E6800000000086269747365742E6800000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000940100006600000080070000FD030000</Data>
|
||||
</MDITabState>
|
||||
</MDIClientArea>
|
||||
<ViewEx>
|
||||
@ -116,7 +116,7 @@
|
||||
</RectRecentDocked>
|
||||
<RectRecentFloat>
|
||||
<Len>16</Len>
|
||||
<Data>81070000430000007E0C00003A040000</Data>
|
||||
<Data>81070000000000007E0C0000E9030000</Data>
|
||||
</RectRecentFloat>
|
||||
</Window>
|
||||
<Window>
|
||||
@ -1304,7 +1304,7 @@
|
||||
<Name>Build</Name>
|
||||
<Buttons>
|
||||
<Len>678</Len>
|
||||
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000000001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64CF010000</Data>
|
||||
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000000001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64CF010000</Data>
|
||||
</Buttons>
|
||||
<OriginalItems>
|
||||
<Len>583</Len>
|
||||
@ -2586,11 +2586,20 @@
|
||||
<MDIGroup>
|
||||
<Size>100</Size>
|
||||
<ActiveTab>0</ActiveTab>
|
||||
<Doc>
|
||||
<Name>..\..\error_handler.h</Name>
|
||||
<ColumnNumber>22</ColumnNumber>
|
||||
<TopLine>39</TopLine>
|
||||
<CurrentLine>40</CurrentLine>
|
||||
<Folding>1</Folding>
|
||||
<ContractedFolders></ContractedFolders>
|
||||
<PaneID>0</PaneID>
|
||||
</Doc>
|
||||
<Doc>
|
||||
<Name>..\test_compile.cpp</Name>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<TopLine>137</TopLine>
|
||||
<CurrentLine>161</CurrentLine>
|
||||
<ColumnNumber>23</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>30</CurrentLine>
|
||||
<Folding>1</Folding>
|
||||
<ContractedFolders></ContractedFolders>
|
||||
<PaneID>0</PaneID>
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>ETL</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -442,18 +442,6 @@
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\deque_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>deque_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>22</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\doxygen.h</PathWithFileName>
|
||||
<FilenameWithoutPath>doxygen.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -461,7 +449,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>23</FileNumber>
|
||||
<FileNumber>22</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -473,7 +461,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>24</FileNumber>
|
||||
<FileNumber>23</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -485,7 +473,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>25</FileNumber>
|
||||
<FileNumber>24</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -497,7 +485,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>26</FileNumber>
|
||||
<FileNumber>25</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -509,7 +497,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>27</FileNumber>
|
||||
<FileNumber>26</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -521,7 +509,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>28</FileNumber>
|
||||
<FileNumber>27</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -533,19 +521,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>29</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\forward_list_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>forward_list_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<FileNumber>28</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -557,7 +533,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileNumber>29</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -569,7 +545,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -581,7 +557,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>33</FileNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -593,7 +569,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>34</FileNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -605,7 +581,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>35</FileNumber>
|
||||
<FileNumber>33</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -617,7 +593,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>36</FileNumber>
|
||||
<FileNumber>34</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -629,7 +605,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>37</FileNumber>
|
||||
<FileNumber>35</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -641,7 +617,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>38</FileNumber>
|
||||
<FileNumber>36</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -653,7 +629,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>39</FileNumber>
|
||||
<FileNumber>37</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -665,7 +641,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>40</FileNumber>
|
||||
<FileNumber>38</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -677,7 +653,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>41</FileNumber>
|
||||
<FileNumber>39</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -689,7 +665,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>42</FileNumber>
|
||||
<FileNumber>40</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -701,19 +677,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>43</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\list_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>list_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>44</FileNumber>
|
||||
<FileNumber>41</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -725,19 +689,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>45</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\map_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>map_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>46</FileNumber>
|
||||
<FileNumber>42</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -749,7 +701,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>47</FileNumber>
|
||||
<FileNumber>43</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -761,7 +713,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>48</FileNumber>
|
||||
<FileNumber>44</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -773,7 +725,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>49</FileNumber>
|
||||
<FileNumber>45</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -785,7 +737,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>50</FileNumber>
|
||||
<FileNumber>46</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -797,7 +749,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>51</FileNumber>
|
||||
<FileNumber>47</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -809,7 +761,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>52</FileNumber>
|
||||
<FileNumber>48</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -821,7 +773,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>53</FileNumber>
|
||||
<FileNumber>49</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -833,19 +785,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>54</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\queue_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>queue_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>55</FileNumber>
|
||||
<FileNumber>50</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -857,7 +797,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>56</FileNumber>
|
||||
<FileNumber>51</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -869,19 +809,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>57</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\stack_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>stack_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>58</FileNumber>
|
||||
<FileNumber>52</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -893,7 +821,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>59</FileNumber>
|
||||
<FileNumber>53</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -905,7 +833,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>60</FileNumber>
|
||||
<FileNumber>54</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -917,7 +845,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>61</FileNumber>
|
||||
<FileNumber>55</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -929,19 +857,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>62</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\vector_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>vector_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>63</FileNumber>
|
||||
<FileNumber>56</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -953,7 +869,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>64</FileNumber>
|
||||
<FileNumber>57</FileNumber>
|
||||
<FileType>8</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -965,7 +881,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>65</FileNumber>
|
||||
<FileNumber>58</FileNumber>
|
||||
<FileType>8</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -977,7 +893,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>66</FileNumber>
|
||||
<FileNumber>59</FileNumber>
|
||||
<FileType>8</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -989,7 +905,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>67</FileNumber>
|
||||
<FileNumber>60</FileNumber>
|
||||
<FileType>8</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1001,7 +917,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>68</FileNumber>
|
||||
<FileNumber>61</FileNumber>
|
||||
<FileType>8</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1013,7 +929,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>69</FileNumber>
|
||||
<FileNumber>62</FileNumber>
|
||||
<FileType>8</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1025,7 +941,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>70</FileNumber>
|
||||
<FileNumber>63</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1037,7 +953,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>71</FileNumber>
|
||||
<FileNumber>64</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1049,7 +965,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>72</FileNumber>
|
||||
<FileNumber>65</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1059,6 +975,230 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>66</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\error_handler.h</PathWithFileName>
|
||||
<FilenameWithoutPath>error_handler.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>Private</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>67</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\deque_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>deque_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>68</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\flat_map_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>flat_map_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>69</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\flat_multimap_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>flat_multimap_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>70</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\flat_multiset_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>flat_multiset_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>71</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\flat_set_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>flat_set_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>72</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\forward_list_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>forward_list_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>73</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\list_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>list_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>74</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\map_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>map_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>75</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\multimap_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>multimap_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>76</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\multiset_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>multiset_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>77</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\pool_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>pool_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>78</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\priority_queue_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>priority_queue_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>79</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\queue_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>queue_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>80</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\set_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>set_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>81</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\stack_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>stack_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>82</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\unordered_map_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>unordered_map_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>83</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\private\vector_base.h</PathWithFileName>
|
||||
<FilenameWithoutPath>vector_base.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
</ProjectOpt>
|
||||
|
||||
@ -526,11 +526,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\deque.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>deque_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\deque_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>doxygen.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
@ -566,11 +561,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\forward_list.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>forward_list_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\forward_list_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>function.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
@ -636,21 +626,11 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\list.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>list_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\list_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>map.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\map.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>map_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\map_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>log.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
@ -691,11 +671,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\queue.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>queue_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\queue_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>smallest.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
@ -706,11 +681,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\stack.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stack_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\stack_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>static_assert.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
@ -731,11 +701,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\vector.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>vector_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\vector_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>visitor.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
@ -786,6 +751,101 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\io_port.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>error_handler.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\error_handler.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Private</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>deque_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\deque_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flat_map_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\flat_map_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flat_multimap_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\flat_multimap_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flat_multiset_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\flat_multiset_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flat_set_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\flat_set_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>forward_list_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\forward_list_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>list_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\list_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>map_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\map_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>multimap_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\multimap_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>multiset_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\multiset_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>pool_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\pool_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>priority_queue_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\priority_queue_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>queue_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\queue_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>set_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\set_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stack_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\stack_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>unordered_map_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\unordered_map_base.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>vector_base.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\private\vector_base.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
|
||||
@ -60,7 +60,7 @@ namespace
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
CHECK_EQUAL(0, size_t(&data32[1]) % expected);
|
||||
CHECK_EQUAL(0U, size_t(&data32[1]) % expected);
|
||||
}
|
||||
|
||||
etl::aligned_storage<100, 8>::type data9;
|
||||
@ -83,7 +83,7 @@ namespace
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
CHECK_EQUAL(0, size_t(&data32[1]) % expected);
|
||||
CHECK_EQUAL(0U, size_t(&data32[1]) % expected);
|
||||
}
|
||||
|
||||
etl::aligned_storage<100, 8>::type data9;
|
||||
|
||||
@ -155,6 +155,14 @@ namespace
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
////*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin_end_empty)
|
||||
{
|
||||
DataNDC data;
|
||||
|
||||
CHECK(data.begin() == data.end());
|
||||
}
|
||||
|
||||
////*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_iterator)
|
||||
{
|
||||
@ -467,13 +475,13 @@ namespace
|
||||
std::advance(i_data_1, 2);
|
||||
|
||||
DataNDC::iterator i_data_2 = data.begin();
|
||||
std::advance(i_data_2, 4);
|
||||
std::advance(i_data_2, 5);
|
||||
|
||||
std::vector<ItemNDCNode>::iterator i_compare_data_1 = compare_data.begin();
|
||||
std::advance(i_compare_data_1, 3);
|
||||
|
||||
std::vector<ItemNDCNode>::iterator i_compare_data_2 = compare_data.begin();
|
||||
std::advance(i_compare_data_2, 4);
|
||||
std::advance(i_compare_data_2, 5);
|
||||
|
||||
std::vector<ItemNDCNode>::iterator i_compare_result = compare_data.erase(i_compare_data_1, i_compare_data_2);
|
||||
|
||||
|
||||
@ -512,15 +512,15 @@ namespace
|
||||
|
||||
value = 0xF0C3A55A;
|
||||
value = etl::reverse_bytes(value);
|
||||
CHECK_EQUAL(0x5AA5C3F0, value);
|
||||
CHECK_EQUAL(0x5AA5C3F0U, value);
|
||||
|
||||
value = 0xA5A55A5A;
|
||||
value = etl::reverse_bytes(value);
|
||||
CHECK_EQUAL(0x5A5AA5A5, value);
|
||||
CHECK_EQUAL(0x5A5AA5A5U, value);
|
||||
|
||||
value = 0x5A5AA5A5;
|
||||
value = etl::reverse_bytes(value);
|
||||
CHECK_EQUAL(0xA5A55A5A, value);
|
||||
CHECK_EQUAL(0xA5A55A5AU, value);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -708,8 +708,6 @@ namespace
|
||||
{
|
||||
const uint64_t data = 0xE8C9AACCBC3D9A8F;
|
||||
|
||||
uint8_t result = etl::fold_bits<uint8_t, 8>(data);
|
||||
|
||||
CHECK_EQUAL(test_fold_bits<uint64_t>(data, 1), (etl::fold_bits<uint64_t, 1>(data)));
|
||||
CHECK_EQUAL(test_fold_bits<uint64_t>(data, 2), (etl::fold_bits<uint64_t, 2>(data)));
|
||||
CHECK_EQUAL(test_fold_bits<uint64_t>(data, 3), (etl::fold_bits<uint64_t, 3>(data)));
|
||||
@ -780,70 +778,70 @@ namespace
|
||||
{
|
||||
// Check that the values are correct.
|
||||
//CHECK_EQUAL(0, etl::max_value_for_nbits<0>::value);
|
||||
CHECK_EQUAL(1, etl::max_value_for_nbits<1>::value);
|
||||
CHECK_EQUAL(3, etl::max_value_for_nbits<2>::value);
|
||||
CHECK_EQUAL(7, etl::max_value_for_nbits<3>::value);
|
||||
CHECK_EQUAL(15, etl::max_value_for_nbits<4>::value);
|
||||
CHECK_EQUAL(31, etl::max_value_for_nbits<5>::value);
|
||||
CHECK_EQUAL(63, etl::max_value_for_nbits<6>::value);
|
||||
CHECK_EQUAL(127, etl::max_value_for_nbits<7>::value);
|
||||
CHECK_EQUAL(255, etl::max_value_for_nbits<8>::value);
|
||||
CHECK_EQUAL(511, etl::max_value_for_nbits<9>::value);
|
||||
CHECK_EQUAL(1023, etl::max_value_for_nbits<10>::value);
|
||||
CHECK_EQUAL(2047, etl::max_value_for_nbits<11>::value);
|
||||
CHECK_EQUAL(4095, etl::max_value_for_nbits<12>::value);
|
||||
CHECK_EQUAL(8191, etl::max_value_for_nbits<13>::value);
|
||||
CHECK_EQUAL(16383, etl::max_value_for_nbits<14>::value);
|
||||
CHECK_EQUAL(32767, etl::max_value_for_nbits<15>::value);
|
||||
CHECK_EQUAL(65535, etl::max_value_for_nbits<16>::value);
|
||||
CHECK_EQUAL(131071, etl::max_value_for_nbits<17>::value);
|
||||
CHECK_EQUAL(262143, etl::max_value_for_nbits<18>::value);
|
||||
CHECK_EQUAL(524287, etl::max_value_for_nbits<19>::value);
|
||||
CHECK_EQUAL(1048575, etl::max_value_for_nbits<20>::value);
|
||||
CHECK_EQUAL(2097151, etl::max_value_for_nbits<21>::value);
|
||||
CHECK_EQUAL(4194303, etl::max_value_for_nbits<22>::value);
|
||||
CHECK_EQUAL(8388607, etl::max_value_for_nbits<23>::value);
|
||||
CHECK_EQUAL(16777215, etl::max_value_for_nbits<24>::value);
|
||||
CHECK_EQUAL(33554431, etl::max_value_for_nbits<25>::value);
|
||||
CHECK_EQUAL(67108863, etl::max_value_for_nbits<26>::value);
|
||||
CHECK_EQUAL(134217727, etl::max_value_for_nbits<27>::value);
|
||||
CHECK_EQUAL(268435455, etl::max_value_for_nbits<28>::value);
|
||||
CHECK_EQUAL(536870911, etl::max_value_for_nbits<29>::value);
|
||||
CHECK_EQUAL(1073741823, etl::max_value_for_nbits<30>::value);
|
||||
CHECK_EQUAL(2147483647, etl::max_value_for_nbits<31>::value);
|
||||
CHECK_EQUAL(4294967295, etl::max_value_for_nbits<32>::value);
|
||||
CHECK_EQUAL(8589934591, etl::max_value_for_nbits<33>::value);
|
||||
CHECK_EQUAL(17179869183, etl::max_value_for_nbits<34>::value);
|
||||
CHECK_EQUAL(34359738367, etl::max_value_for_nbits<35>::value);
|
||||
CHECK_EQUAL(68719476735, etl::max_value_for_nbits<36>::value);
|
||||
CHECK_EQUAL(137438953471, etl::max_value_for_nbits<37>::value);
|
||||
CHECK_EQUAL(274877906943, etl::max_value_for_nbits<38>::value);
|
||||
CHECK_EQUAL(549755813887, etl::max_value_for_nbits<39>::value);
|
||||
CHECK_EQUAL(1099511627775, etl::max_value_for_nbits<40>::value);
|
||||
CHECK_EQUAL(2199023255551, etl::max_value_for_nbits<41>::value);
|
||||
CHECK_EQUAL(4398046511103, etl::max_value_for_nbits<42>::value);
|
||||
CHECK_EQUAL(8796093022207, etl::max_value_for_nbits<43>::value);
|
||||
CHECK_EQUAL(17592186044415, etl::max_value_for_nbits<44>::value);
|
||||
CHECK_EQUAL(35184372088831, etl::max_value_for_nbits<45>::value);
|
||||
CHECK_EQUAL(70368744177663, etl::max_value_for_nbits<46>::value);
|
||||
CHECK_EQUAL(140737488355327, etl::max_value_for_nbits<47>::value);
|
||||
CHECK_EQUAL(281474976710655, etl::max_value_for_nbits<48>::value);
|
||||
CHECK_EQUAL(562949953421311, etl::max_value_for_nbits<49>::value);
|
||||
CHECK_EQUAL(1125899906842623, etl::max_value_for_nbits<50>::value);
|
||||
CHECK_EQUAL(2251799813685247, etl::max_value_for_nbits<51>::value);
|
||||
CHECK_EQUAL(4503599627370495, etl::max_value_for_nbits<52>::value);
|
||||
CHECK_EQUAL(9007199254740991, etl::max_value_for_nbits<53>::value);
|
||||
CHECK_EQUAL(18014398509481983, etl::max_value_for_nbits<54>::value);
|
||||
CHECK_EQUAL(36028797018963967, etl::max_value_for_nbits<55>::value);
|
||||
CHECK_EQUAL(72057594037927935, etl::max_value_for_nbits<56>::value);
|
||||
CHECK_EQUAL(144115188075855871, etl::max_value_for_nbits<57>::value);
|
||||
CHECK_EQUAL(288230376151711743, etl::max_value_for_nbits<58>::value);
|
||||
CHECK_EQUAL(576460752303423487, etl::max_value_for_nbits<59>::value);
|
||||
CHECK_EQUAL(1152921504606846975, etl::max_value_for_nbits<60>::value);
|
||||
CHECK_EQUAL(2305843009213693951, etl::max_value_for_nbits<61>::value);
|
||||
CHECK_EQUAL(4611686018427387903, etl::max_value_for_nbits<62>::value);
|
||||
CHECK_EQUAL(9223372036854775807, etl::max_value_for_nbits<63>::value);
|
||||
CHECK_EQUAL((unsigned long long)18446744073709551615, etl::max_value_for_nbits<64>::value);
|
||||
CHECK_EQUAL(1U, etl::max_value_for_nbits<1>::value);
|
||||
CHECK_EQUAL(3U, etl::max_value_for_nbits<2>::value);
|
||||
CHECK_EQUAL(7U, etl::max_value_for_nbits<3>::value);
|
||||
CHECK_EQUAL(15U, etl::max_value_for_nbits<4>::value);
|
||||
CHECK_EQUAL(31U, etl::max_value_for_nbits<5>::value);
|
||||
CHECK_EQUAL(63U, etl::max_value_for_nbits<6>::value);
|
||||
CHECK_EQUAL(127U, etl::max_value_for_nbits<7>::value);
|
||||
CHECK_EQUAL(255U, etl::max_value_for_nbits<8>::value);
|
||||
CHECK_EQUAL(511U, etl::max_value_for_nbits<9>::value);
|
||||
CHECK_EQUAL(1023U, etl::max_value_for_nbits<10>::value);
|
||||
CHECK_EQUAL(2047U, etl::max_value_for_nbits<11>::value);
|
||||
CHECK_EQUAL(4095U, etl::max_value_for_nbits<12>::value);
|
||||
CHECK_EQUAL(8191U, etl::max_value_for_nbits<13>::value);
|
||||
CHECK_EQUAL(16383U, etl::max_value_for_nbits<14>::value);
|
||||
CHECK_EQUAL(32767U, etl::max_value_for_nbits<15>::value);
|
||||
CHECK_EQUAL(65535U, etl::max_value_for_nbits<16>::value);
|
||||
CHECK_EQUAL(131071U, etl::max_value_for_nbits<17>::value);
|
||||
CHECK_EQUAL(262143U, etl::max_value_for_nbits<18>::value);
|
||||
CHECK_EQUAL(524287U, etl::max_value_for_nbits<19>::value);
|
||||
CHECK_EQUAL(1048575U, etl::max_value_for_nbits<20>::value);
|
||||
CHECK_EQUAL(2097151U, etl::max_value_for_nbits<21>::value);
|
||||
CHECK_EQUAL(4194303U, etl::max_value_for_nbits<22>::value);
|
||||
CHECK_EQUAL(8388607U, etl::max_value_for_nbits<23>::value);
|
||||
CHECK_EQUAL(16777215U, etl::max_value_for_nbits<24>::value);
|
||||
CHECK_EQUAL(33554431U, etl::max_value_for_nbits<25>::value);
|
||||
CHECK_EQUAL(67108863U, etl::max_value_for_nbits<26>::value);
|
||||
CHECK_EQUAL(134217727U, etl::max_value_for_nbits<27>::value);
|
||||
CHECK_EQUAL(268435455U, etl::max_value_for_nbits<28>::value);
|
||||
CHECK_EQUAL(536870911U, etl::max_value_for_nbits<29>::value);
|
||||
CHECK_EQUAL(1073741823U, etl::max_value_for_nbits<30>::value);
|
||||
CHECK_EQUAL(2147483647U, etl::max_value_for_nbits<31>::value);
|
||||
CHECK_EQUAL(4294967295U, etl::max_value_for_nbits<32>::value);
|
||||
CHECK_EQUAL(8589934591U, etl::max_value_for_nbits<33>::value);
|
||||
CHECK_EQUAL(17179869183U, etl::max_value_for_nbits<34>::value);
|
||||
CHECK_EQUAL(34359738367U, etl::max_value_for_nbits<35>::value);
|
||||
CHECK_EQUAL(68719476735U, etl::max_value_for_nbits<36>::value);
|
||||
CHECK_EQUAL(137438953471U, etl::max_value_for_nbits<37>::value);
|
||||
CHECK_EQUAL(274877906943U, etl::max_value_for_nbits<38>::value);
|
||||
CHECK_EQUAL(549755813887U, etl::max_value_for_nbits<39>::value);
|
||||
CHECK_EQUAL(1099511627775U, etl::max_value_for_nbits<40>::value);
|
||||
CHECK_EQUAL(2199023255551U, etl::max_value_for_nbits<41>::value);
|
||||
CHECK_EQUAL(4398046511103U, etl::max_value_for_nbits<42>::value);
|
||||
CHECK_EQUAL(8796093022207U, etl::max_value_for_nbits<43>::value);
|
||||
CHECK_EQUAL(17592186044415U, etl::max_value_for_nbits<44>::value);
|
||||
CHECK_EQUAL(35184372088831U, etl::max_value_for_nbits<45>::value);
|
||||
CHECK_EQUAL(70368744177663U, etl::max_value_for_nbits<46>::value);
|
||||
CHECK_EQUAL(140737488355327U, etl::max_value_for_nbits<47>::value);
|
||||
CHECK_EQUAL(281474976710655U, etl::max_value_for_nbits<48>::value);
|
||||
CHECK_EQUAL(562949953421311U, etl::max_value_for_nbits<49>::value);
|
||||
CHECK_EQUAL(1125899906842623U, etl::max_value_for_nbits<50>::value);
|
||||
CHECK_EQUAL(2251799813685247U, etl::max_value_for_nbits<51>::value);
|
||||
CHECK_EQUAL(4503599627370495U, etl::max_value_for_nbits<52>::value);
|
||||
CHECK_EQUAL(9007199254740991U, etl::max_value_for_nbits<53>::value);
|
||||
CHECK_EQUAL(18014398509481983U, etl::max_value_for_nbits<54>::value);
|
||||
CHECK_EQUAL(36028797018963967U, etl::max_value_for_nbits<55>::value);
|
||||
CHECK_EQUAL(72057594037927935U, etl::max_value_for_nbits<56>::value);
|
||||
CHECK_EQUAL(144115188075855871U, etl::max_value_for_nbits<57>::value);
|
||||
CHECK_EQUAL(288230376151711743U, etl::max_value_for_nbits<58>::value);
|
||||
CHECK_EQUAL(576460752303423487U, etl::max_value_for_nbits<59>::value);
|
||||
CHECK_EQUAL(1152921504606846975U, etl::max_value_for_nbits<60>::value);
|
||||
CHECK_EQUAL(2305843009213693951U, etl::max_value_for_nbits<61>::value);
|
||||
CHECK_EQUAL(4611686018427387903U, etl::max_value_for_nbits<62>::value);
|
||||
CHECK_EQUAL(9223372036854775807U, etl::max_value_for_nbits<63>::value);
|
||||
CHECK_EQUAL(18446744073709551615U, etl::max_value_for_nbits<64>::value);
|
||||
|
||||
// Check that the value types are correct.
|
||||
CHECK((std::is_same<uint8_t, etl::max_value_for_nbits<0>::value_type>::value));
|
||||
|
||||
@ -453,6 +453,23 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment_operator_iterface)
|
||||
{
|
||||
etl::bitset<60> data1(0xFFFFFFFFFFFFFFF);
|
||||
etl::bitset<60> data2;
|
||||
|
||||
etl::ibitset& idata1 = data1;
|
||||
etl::ibitset& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
for (size_t i = 0; i < data2.size(); ++i)
|
||||
{
|
||||
CHECK_EQUAL(data1.test(i), data2.test(i));
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_equality_operator)
|
||||
{
|
||||
|
||||
@ -198,8 +198,8 @@ namespace
|
||||
typedef etl::bloom_filter<256, hash1_t> Bloom;
|
||||
Bloom bloom;
|
||||
|
||||
CHECK_EQUAL(256, bloom.width());
|
||||
CHECK_EQUAL(256, Bloom::WIDTH);
|
||||
CHECK_EQUAL(256U, bloom.width());
|
||||
CHECK_EQUAL(256U, Bloom::WIDTH);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -247,8 +247,8 @@ namespace
|
||||
size_t usage = bloom.usage();
|
||||
size_t count = bloom.count();
|
||||
|
||||
CHECK_EQUAL(0, usage);
|
||||
CHECK_EQUAL(0, count);
|
||||
CHECK_EQUAL(0U, usage);
|
||||
CHECK_EQUAL(0U, count);
|
||||
|
||||
// Check that we get no matches.
|
||||
bool any_exist = false;
|
||||
|
||||
@ -15,6 +15,9 @@
|
||||
#include "vector.h"
|
||||
#include "variant.h"
|
||||
#include "list.h"
|
||||
#include "map.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#if defined(COMPILER_KEIL)
|
||||
#pragma diag_suppress 550
|
||||
@ -51,7 +54,7 @@ void test_algorithm()
|
||||
int y = 1;
|
||||
int* p;
|
||||
bool b;
|
||||
|
||||
|
||||
// minmax_element
|
||||
result1 = etl::minmax_element(etl::begin(data), etl::end(data));
|
||||
result1 = etl::minmax_element(etl::begin(data), etl::end(data), std::greater<int>());
|
||||
@ -359,6 +362,22 @@ void test_list()
|
||||
data2.erase(it2);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// map
|
||||
//*****************************************************************************
|
||||
void test_map()
|
||||
{
|
||||
typedef etl::map<int, int, 10> Data;
|
||||
|
||||
Data data;
|
||||
|
||||
data.insert(std::pair<int, int>(1, 2));
|
||||
data.insert(std::pair<int, int>(3, 4));
|
||||
|
||||
Data::iterator it = data.begin();
|
||||
data.erase(it);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// main
|
||||
//*****************************************************************************
|
||||
|
||||
@ -41,7 +41,7 @@ SOFTWARE.
|
||||
#include "../crc64_ecma.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_crc)
|
||||
{
|
||||
//*************************************************************************
|
||||
@ -65,7 +65,7 @@ namespace
|
||||
{
|
||||
crc_calculator.add(data[i]);
|
||||
}
|
||||
|
||||
|
||||
uint8_t crc = crc_calculator;
|
||||
|
||||
CHECK_EQUAL(0xF4, crc);
|
||||
@ -332,7 +332,7 @@ namespace
|
||||
|
||||
uint64_t crc = etl::crc64_ecma(data.begin(), data.end());
|
||||
|
||||
CHECK_EQUAL(0x6C40DF5F0B497347, crc);
|
||||
CHECK_EQUAL(0x6C40DF5F0B497347U, crc);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -349,7 +349,7 @@ namespace
|
||||
|
||||
uint64_t crc = crc_calculator;
|
||||
|
||||
CHECK_EQUAL(0x6C40DF5F0B497347, crc);
|
||||
CHECK_EQUAL(0x6C40DF5F0B497347U, crc);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -363,7 +363,7 @@ namespace
|
||||
|
||||
uint64_t crc = crc_calculator.value();
|
||||
|
||||
CHECK_EQUAL(0x6C40DF5F0B497347, crc);
|
||||
CHECK_EQUAL(0x6C40DF5F0B497347U, crc);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -56,6 +56,17 @@ namespace
|
||||
CHECK_EQUAL(7, value.last());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_copy_constructor)
|
||||
{
|
||||
etl::cyclic_value<int> value(2, 7);
|
||||
etl::cyclic_value<int> value2(value);
|
||||
CHECK(value == value2);
|
||||
|
||||
value2.set(3, 6);
|
||||
CHECK(value != value2);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_set)
|
||||
{
|
||||
|
||||
@ -39,49 +39,50 @@ SOFTWARE.
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
|
||||
const size_t SIZE = 14;
|
||||
|
||||
typedef TestDataDC<std::string> DC;
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
|
||||
typedef etl::deque<DC, SIZE> DataDC;
|
||||
typedef etl::deque<NDC, SIZE> DataNDC;
|
||||
|
||||
typedef std::deque<NDC> Compare_Data;
|
||||
typedef std::deque<DC> Compare_DataDC;
|
||||
|
||||
NDC N0 = NDC("0");
|
||||
NDC N1 = NDC("1");
|
||||
NDC N2 = NDC("2");
|
||||
NDC N3 = NDC("3");
|
||||
NDC N4 = NDC("4");
|
||||
NDC N5 = NDC("5");
|
||||
NDC N6 = NDC("6");
|
||||
NDC N7 = NDC("7");
|
||||
NDC N8 = NDC("8");
|
||||
NDC N9 = NDC("9");
|
||||
NDC N10 = NDC("10");
|
||||
NDC N11 = NDC("11");
|
||||
NDC N12 = NDC("12");
|
||||
NDC N13 = NDC("13");
|
||||
NDC N14 = NDC("14");
|
||||
NDC N15 = NDC("15");
|
||||
NDC N16 = NDC("16");
|
||||
NDC N17 = NDC("17");
|
||||
NDC N999 = NDC("999");
|
||||
|
||||
std::vector<NDC> blank_data = { N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999 };
|
||||
std::vector<NDC> initial_data = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13 };
|
||||
std::vector<NDC> initial_data_excess = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14 };
|
||||
std::vector<NDC> initial_data_under = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11 };
|
||||
std::vector<NDC> initial_data_small = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9 };
|
||||
std::vector<NDC> insert_data = { N10, N11, N12, N13, N14 };
|
||||
std::vector<DC> initial_data_dc = { DC("0"), DC("1"), DC("2"), DC("3"), DC("4"), DC("5"), DC("6"), DC("7"), DC("8"), DC("9"), DC("10"), DC("11"), DC("12"), DC("13") };
|
||||
|
||||
namespace
|
||||
{
|
||||
SUITE(test_deque)
|
||||
{
|
||||
const size_t SIZE = 14;
|
||||
|
||||
typedef TestDataDC<std::string> DC;
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
|
||||
typedef etl::deque<DC, SIZE> DataDC;
|
||||
typedef etl::deque<NDC, SIZE> DataNDC;
|
||||
typedef etl::ideque<NDC> IDataNDC;
|
||||
|
||||
typedef std::deque<NDC> Compare_Data;
|
||||
typedef std::deque<DC> Compare_DataDC;
|
||||
|
||||
NDC N0 = NDC("0");
|
||||
NDC N1 = NDC("1");
|
||||
NDC N2 = NDC("2");
|
||||
NDC N3 = NDC("3");
|
||||
NDC N4 = NDC("4");
|
||||
NDC N5 = NDC("5");
|
||||
NDC N6 = NDC("6");
|
||||
NDC N7 = NDC("7");
|
||||
NDC N8 = NDC("8");
|
||||
NDC N9 = NDC("9");
|
||||
NDC N10 = NDC("10");
|
||||
NDC N11 = NDC("11");
|
||||
NDC N12 = NDC("12");
|
||||
NDC N13 = NDC("13");
|
||||
NDC N14 = NDC("14");
|
||||
NDC N15 = NDC("15");
|
||||
NDC N16 = NDC("16");
|
||||
NDC N17 = NDC("17");
|
||||
NDC N999 = NDC("999");
|
||||
|
||||
std::vector<NDC> blank_data = { N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999, N999 };
|
||||
std::vector<NDC> initial_data = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13 };
|
||||
std::vector<NDC> initial_data_excess = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14 };
|
||||
std::vector<NDC> initial_data_under = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11 };
|
||||
std::vector<NDC> initial_data_small = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9 };
|
||||
std::vector<NDC> insert_data = { N10, N11, N12, N13, N14 };
|
||||
std::vector<DC> initial_data_dc = { DC("0"), DC("1"), DC("2"), DC("3"), DC("4"), DC("5"), DC("6"), DC("7"), DC("8"), DC("9"), DC("10"), DC("11"), DC("12"), DC("13") };
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_constructor)
|
||||
{
|
||||
@ -144,6 +145,21 @@ namespace
|
||||
CHECK(std::equal(deque1.begin(), deque1.end(), deque2.begin()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment_interface)
|
||||
{
|
||||
DataNDC deque1(initial_data.begin(), initial_data.end());
|
||||
DataNDC deque2;
|
||||
|
||||
IDataNDC& ideque1 = deque1;
|
||||
IDataNDC& ideque2 = deque2;
|
||||
|
||||
ideque2 = ideque1;
|
||||
|
||||
CHECK_EQUAL(deque1.size(), deque2.size());
|
||||
CHECK(std::equal(deque1.begin(), deque1.end(), deque2.begin()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_self_assignment)
|
||||
{
|
||||
|
||||
@ -27,7 +27,9 @@ SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include <UnitTest++/UnitTest++.h>
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@ -59,6 +61,7 @@ void receive_error(const etl::exception& e)
|
||||
std::ostringstream oss;
|
||||
oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n";
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
std::string stext = oss.str();
|
||||
|
||||
WCHAR text[200];
|
||||
@ -66,6 +69,7 @@ void receive_error(const etl::exception& e)
|
||||
LPCWSTR ltext = text;
|
||||
|
||||
OutputDebugString(ltext);
|
||||
#endif
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -82,6 +86,7 @@ public:
|
||||
std::ostringstream oss;
|
||||
oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n";
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
std::string stext = oss.str();
|
||||
|
||||
WCHAR text[200];
|
||||
@ -89,11 +94,12 @@ public:
|
||||
LPCWSTR ltext = text;
|
||||
|
||||
OutputDebugString(ltext);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_error_handler)
|
||||
{
|
||||
//*************************************************************************
|
||||
|
||||
@ -72,6 +72,7 @@ namespace
|
||||
|
||||
typedef etl::flat_map<int, DC, SIZE> DataDC;
|
||||
typedef etl::flat_map<int, NDC, SIZE> DataNDC;
|
||||
typedef etl::iflat_map<int, NDC> IDataNDC;
|
||||
|
||||
typedef std::map<int, DC> Compare_DataDC;
|
||||
typedef std::map<int, NDC> Compare_DataNDC;
|
||||
@ -186,6 +187,24 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
DataNDC data1(initial_data.begin(), initial_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = Check_Equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
@ -259,6 +278,31 @@ namespace
|
||||
CHECK_EQUAL(compare_data[9], data[9]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_index_value_changed)
|
||||
{
|
||||
Compare_DataNDC compare_data;
|
||||
DataNDC data;
|
||||
|
||||
data[0] = N0;
|
||||
compare_data[0] = N0;
|
||||
|
||||
bool isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
|
||||
data[0] = N2;
|
||||
compare_data[0] = N2;
|
||||
|
||||
isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_at)
|
||||
{
|
||||
@ -345,6 +389,31 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_value_changed)
|
||||
{
|
||||
Compare_DataNDC compare_data;
|
||||
DataNDC data;
|
||||
|
||||
data.insert(DataNDC::value_type(0, N0));
|
||||
compare_data.insert(std::make_pair(0, N0));
|
||||
|
||||
bool isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
|
||||
data.insert(std::make_pair(0, N2));
|
||||
compare_data.insert(std::make_pair(0, N2));
|
||||
|
||||
isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_value_multiple)
|
||||
{
|
||||
|
||||
@ -54,6 +54,7 @@ namespace
|
||||
|
||||
typedef etl::flat_multimap<int, DC, SIZE> DataDC;
|
||||
typedef etl::flat_multimap<int, NDC, SIZE> DataNDC;
|
||||
typedef etl::iflat_multimap<int, NDC> IDataNDC;
|
||||
|
||||
typedef std::multimap<int, DC> Compare_DataDC;
|
||||
typedef std::multimap<int, NDC> Compare_DataNDC;
|
||||
@ -176,6 +177,24 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
DataNDC data1(initial_data.begin(), initial_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = Check_Equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
|
||||
@ -49,8 +49,9 @@ namespace
|
||||
typedef TestDataDC<std::string> DC;
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
|
||||
typedef etl::flat_multiset<DC, SIZE> DataDC;
|
||||
typedef etl::flat_multiset<NDC, SIZE> DataNDC;
|
||||
typedef etl::flat_multiset<DC, SIZE> DataDC;
|
||||
typedef etl::flat_multiset<NDC, SIZE> DataNDC;
|
||||
typedef etl::iflat_multiset<NDC> IDataNDC;
|
||||
|
||||
typedef std::multiset<DC> Compare_DataDC;
|
||||
typedef std::multiset<NDC> Compare_DataNDC;
|
||||
@ -150,6 +151,24 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
DataNDC data1(initial_data.begin(), initial_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
|
||||
@ -49,8 +49,9 @@ namespace
|
||||
typedef TestDataDC<std::string> DC;
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
|
||||
typedef etl::flat_set<DC, SIZE> DataDC;
|
||||
typedef etl::flat_set<NDC, SIZE> DataNDC;
|
||||
typedef etl::flat_set<DC, SIZE> DataDC;
|
||||
typedef etl::flat_set<NDC, SIZE> DataNDC;
|
||||
typedef etl::iflat_set<NDC> IDataNDC;
|
||||
|
||||
typedef std::set<DC> Compare_DataDC;
|
||||
typedef std::set<NDC> Compare_DataNDC;
|
||||
@ -143,6 +144,24 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
DataNDC data1(initial_data.begin(), initial_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
|
||||
@ -50,6 +50,7 @@ namespace
|
||||
|
||||
typedef etl::forward_list<ItemDC, SIZE> DataDC;
|
||||
typedef etl::forward_list<ItemNDC, SIZE> DataNDC;
|
||||
typedef etl::iforward_list<ItemNDC> IDataNDC;
|
||||
|
||||
typedef std::forward_list<ItemNDC> CompareDataNDC;
|
||||
typedef std::vector<ItemNDC> InitialDataNDC;
|
||||
@ -499,6 +500,22 @@ namespace
|
||||
CHECK(are_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
DataNDC data1(sorted_data.begin(), sorted_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(), data1.end(), data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
|
||||
@ -126,7 +126,10 @@ namespace
|
||||
{
|
||||
size_t hash = etl::hash<long long>()((long long)(0x5AA555AA3CC333CC));
|
||||
|
||||
CHECK_EQUAL(0xEC6A8D69, hash);
|
||||
if (sizeof(size_t) == sizeof(long long))
|
||||
CHECK_EQUAL(0x5AA555AA3CC333CC, hash);
|
||||
else
|
||||
CHECK_EQUAL(0xEC6A8D69, hash);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -134,7 +137,10 @@ namespace
|
||||
{
|
||||
size_t hash = etl::hash<unsigned long long>()((unsigned long long)(0x5AA555AA3CC333CC));
|
||||
|
||||
CHECK_EQUAL(0xEC6A8D69, hash);
|
||||
if (sizeof(size_t) == sizeof(unsigned long long))
|
||||
CHECK_EQUAL(0x5AA555AA3CC333CC, hash);
|
||||
else
|
||||
CHECK_EQUAL(0xEC6A8D69, hash);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -142,7 +148,10 @@ namespace
|
||||
{
|
||||
size_t hash = etl::hash<float>()((float)(1.2345));
|
||||
|
||||
CHECK_EQUAL(0x3F9E0419, hash);
|
||||
if (sizeof(size_t) == sizeof(long long))
|
||||
CHECK_EQUAL(0x884B5E3F478AF88F, hash);
|
||||
else
|
||||
CHECK_EQUAL(0x3F9E0419, hash);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -150,7 +159,10 @@ namespace
|
||||
{
|
||||
size_t hash = etl::hash<double>()((double)(1.2345));
|
||||
|
||||
CHECK_EQUAL(0x86FBF224, hash);
|
||||
if (sizeof(size_t) == sizeof(long long))
|
||||
CHECK_EQUAL(0x3FF3C083126E978D, hash);
|
||||
else
|
||||
CHECK_EQUAL(0x86FBF224, hash);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -49,6 +49,7 @@ namespace
|
||||
|
||||
typedef etl::list<ItemDC, SIZE> DataDC;
|
||||
typedef etl::list<ItemNDC, SIZE> DataNDC;
|
||||
typedef etl::ilist<ItemNDC> IDataNDC;
|
||||
|
||||
typedef std::list<ItemNDC> CompareData;
|
||||
typedef std::vector<ItemNDC> InitialData;
|
||||
@ -700,6 +701,25 @@ namespace
|
||||
CHECK(are_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
CompareData compare_data(sorted_data.begin(), sorted_data.end());
|
||||
DataNDC data1(sorted_data.begin(), sorted_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
CHECK_EQUAL(data1.size(), data2.size());
|
||||
|
||||
are_equal = std::equal(data1.begin(), data1.end(), data2.begin());
|
||||
|
||||
CHECK(are_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
|
||||
@ -43,9 +43,11 @@ static const size_t SIZE = 10;
|
||||
#define TEST_GREATER_THAN
|
||||
#ifdef TEST_GREATER_THAN
|
||||
typedef etl::map<std::string, int, SIZE, std::greater<std::string> > Data;
|
||||
typedef etl::imap<std::string, int, std::greater<std::string> > IData;
|
||||
typedef std::map<std::string, int, std::greater<std::string> > Compare_Data;
|
||||
#else
|
||||
typedef etl::map<std::string, int, SIZE, std::less<std::string> > Data;
|
||||
typedef etl::imap<std::string, int, std::less<std::string> > IData;
|
||||
typedef std::map<std::string, int, std::less<std::string> > Compare_Data;
|
||||
#endif
|
||||
|
||||
@ -111,7 +113,7 @@ namespace
|
||||
//*************************************************************************
|
||||
struct SetupFixture
|
||||
{
|
||||
// Maps of predefined data from which to constuct maps used in each test
|
||||
// Maps of predefined data from which to construct maps used in each test
|
||||
std::map<std::string, int> initial_data;
|
||||
std::map<std::string, int> excess_data;
|
||||
std::map<std::string, int> different_data;
|
||||
@ -207,6 +209,39 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
Data data1(initial_data.begin(), initial_data.end());
|
||||
Data data2;
|
||||
|
||||
IData& idata1 = data1;
|
||||
IData& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
Data other_data(data);
|
||||
|
||||
other_data = other_data;
|
||||
|
||||
bool isEqual = std::equal(data.begin(),
|
||||
data.end(),
|
||||
other_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
@ -265,6 +300,21 @@ namespace
|
||||
CHECK_EQUAL(data["9"], compare_data["9"]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_index_value_changed)
|
||||
{
|
||||
Compare_Data compare_data;
|
||||
Data data;
|
||||
|
||||
data["0"] = 0;
|
||||
compare_data["0"] = 0;
|
||||
|
||||
data["0"] = 1;
|
||||
compare_data["0"] = 1;
|
||||
|
||||
CHECK_EQUAL(data["0"], compare_data["0"]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_at)
|
||||
{
|
||||
@ -365,6 +415,31 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_value_changed)
|
||||
{
|
||||
Compare_Data compare_data;
|
||||
Data data;
|
||||
|
||||
data.insert(Data::value_type(std::string("0"), 0));
|
||||
compare_data.insert(std::make_pair(std::string("0"), 0));
|
||||
|
||||
bool isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
|
||||
data.insert(std::make_pair(std::string("0"), 1));
|
||||
compare_data.insert(std::make_pair(std::string("0"), 1));
|
||||
|
||||
isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_hint_value)
|
||||
{
|
||||
|
||||
@ -34,7 +34,7 @@ SOFTWARE.
|
||||
#include "../factorial.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_maths)
|
||||
{
|
||||
//*************************************************************************
|
||||
@ -131,51 +131,51 @@ namespace
|
||||
|
||||
// 2^1
|
||||
actual = etl::power<2, 1>::value;
|
||||
CHECK_EQUAL(2, actual);
|
||||
CHECK_EQUAL(2U, actual);
|
||||
|
||||
// 3^2
|
||||
actual = etl::power<3, 2>::value;
|
||||
CHECK_EQUAL(9, actual);
|
||||
CHECK_EQUAL(9U, actual);
|
||||
|
||||
// 4^3
|
||||
actual = etl::power<4, 3>::value;
|
||||
CHECK_EQUAL(64, actual);
|
||||
CHECK_EQUAL(64U, actual);
|
||||
|
||||
// 5^4
|
||||
actual = etl::power<5, 4>::value;
|
||||
CHECK_EQUAL(625, actual);
|
||||
CHECK_EQUAL(625U, actual);
|
||||
|
||||
// 6^5
|
||||
actual = etl::power<6, 5>::value;
|
||||
CHECK_EQUAL(7776, actual);
|
||||
CHECK_EQUAL(7776U, actual);
|
||||
|
||||
// 7^6
|
||||
actual = etl::power<7, 6>::value;
|
||||
CHECK_EQUAL(117649, actual);
|
||||
CHECK_EQUAL(117649U, actual);
|
||||
|
||||
// 8^7
|
||||
actual = etl::power<8, 7>::value;
|
||||
CHECK_EQUAL(2097152, actual);
|
||||
CHECK_EQUAL(2097152U, actual);
|
||||
|
||||
// 9^8
|
||||
actual = etl::power<9, 8>::value;
|
||||
CHECK_EQUAL(43046721, actual);
|
||||
CHECK_EQUAL(43046721U, actual);
|
||||
|
||||
// 10^9
|
||||
actual = etl::power<10, 9>::value;
|
||||
CHECK_EQUAL(1000000000, actual);
|
||||
CHECK_EQUAL(1000000000U, actual);
|
||||
|
||||
// 2^16
|
||||
actual = etl::power<2, 15>::value;
|
||||
CHECK_EQUAL(0x8000, actual);
|
||||
CHECK_EQUAL(0x8000U, actual);
|
||||
|
||||
// 2^31
|
||||
actual = etl::power<2, 31>::value;
|
||||
CHECK_EQUAL(0x80000000, actual);
|
||||
CHECK_EQUAL(0x80000000U, actual);
|
||||
|
||||
// 2^63
|
||||
actual = etl::power<2, 63>::value;
|
||||
CHECK_EQUAL(0x8000000000000000, actual);
|
||||
CHECK_EQUAL(0x8000000000000000U, actual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -183,7 +183,7 @@ namespace
|
||||
{
|
||||
int actual;
|
||||
|
||||
//
|
||||
//
|
||||
actual = etl::power_of_2_round_up<0>::value;
|
||||
CHECK_EQUAL(2, actual);
|
||||
|
||||
@ -328,7 +328,7 @@ namespace
|
||||
CHECK_EQUAL(701408733, (size_t)etl::fibonacci<44>::value);
|
||||
CHECK_EQUAL(1134903170, (size_t)etl::fibonacci<45>::value);
|
||||
CHECK_EQUAL(1836311903, (size_t)etl::fibonacci<46>::value);
|
||||
CHECK_EQUAL(2971215073, (size_t)etl::fibonacci<47>::value);
|
||||
CHECK_EQUAL(2971215073U, (size_t)etl::fibonacci<47>::value);
|
||||
}
|
||||
|
||||
TEST(test_factorial)
|
||||
@ -348,4 +348,4 @@ namespace
|
||||
CHECK_EQUAL(479001600, (size_t)etl::factorial<12>::value);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,9 +42,11 @@ static const size_t SIZE = 10;
|
||||
#define TEST_GREATER_THAN
|
||||
#ifdef TEST_GREATER_THAN
|
||||
typedef etl::multimap<std::string, int, SIZE, std::greater<std::string> > Data;
|
||||
typedef etl::imultimap<std::string, int, std::greater<std::string> > IData;
|
||||
typedef std::multimap<std::string, int, std::greater<std::string> > Compare_Data;
|
||||
#else
|
||||
typedef etl::multimap<std::string, int, SIZE, std::less<std::string> > Data;
|
||||
typedef etl::imultimap<std::string, int, std::less<std::string> > IData;
|
||||
typedef std::multimap<std::string, int, std::less<std::string> > Compare_Data;
|
||||
#endif
|
||||
|
||||
@ -207,6 +209,39 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
Data data1(initial_data.begin(), initial_data.end());
|
||||
Data data2;
|
||||
|
||||
IData& idata1 = data1;
|
||||
IData& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
Data other_data(data);
|
||||
|
||||
other_data = other_data;
|
||||
|
||||
bool isEqual = std::equal(data.begin(),
|
||||
data.end(),
|
||||
other_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -41,11 +41,13 @@ static const size_t SIZE = 10;
|
||||
|
||||
#define TEST_GREATER_THAN
|
||||
#ifdef TEST_GREATER_THAN
|
||||
typedef etl::multiset<int, SIZE, std::greater<int> > Data;
|
||||
typedef std::multiset<int, std::greater<int> > Compare_Data;
|
||||
typedef etl::multiset<int, SIZE, std::greater<int> > Data;
|
||||
typedef etl::imultiset<int, std::greater<int> > IData;
|
||||
typedef std::multiset<int, std::greater<int> > Compare_Data;
|
||||
#else
|
||||
typedef etl::multiset<int, SIZE, std::less<int> > Data;
|
||||
typedef std::multiset<int, std::less<int> > Compare_Data;
|
||||
typedef etl::multiset<int, SIZE, std::less<int> > Data;
|
||||
typedef etl::multiset<int, std::less<int> > IData;
|
||||
typedef std::multiset<int, std::less<int> > Compare_Data;
|
||||
#endif
|
||||
|
||||
typedef Data::iterator Data_iterator;
|
||||
@ -199,6 +201,39 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
Data data1(initial_data.begin(), initial_data.end());
|
||||
Data data2;
|
||||
|
||||
IData& idata1 = data1;
|
||||
IData& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
Data other_data(data);
|
||||
|
||||
other_data = other_data;
|
||||
|
||||
bool isEqual = std::equal(data.begin(),
|
||||
data.end(),
|
||||
other_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -121,7 +121,7 @@ public:
|
||||
data3_count(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//*******************************************
|
||||
// Notification1 is passed by value.
|
||||
//*******************************************
|
||||
@ -225,7 +225,7 @@ namespace
|
||||
CHECK_EQUAL(0, observer2.data3_count);
|
||||
|
||||
observable2.send_notifications(); // Updates data3. observeable2 has no observers yet.
|
||||
|
||||
|
||||
CHECK_EQUAL(1, observer1.data1_count);
|
||||
CHECK_EQUAL(1, observer1.data2_count);
|
||||
CHECK_EQUAL(0, observer1.data3_count);
|
||||
@ -408,27 +408,27 @@ namespace
|
||||
Observer observer5;
|
||||
|
||||
observable.add_observer(observer1);
|
||||
CHECK_EQUAL(1, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(1), observable.number_of_observers());
|
||||
|
||||
observable.add_observer(observer2);
|
||||
CHECK_EQUAL(2, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(2), observable.number_of_observers());
|
||||
|
||||
observable.add_observer(observer3);
|
||||
CHECK_EQUAL(3, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(3), observable.number_of_observers());
|
||||
|
||||
observable.add_observer(observer2);
|
||||
CHECK_EQUAL(3, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(3), observable.number_of_observers());
|
||||
|
||||
observable.add_observer(observer4);
|
||||
CHECK_EQUAL(4, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(4), observable.number_of_observers());
|
||||
|
||||
CHECK_THROW(observable.add_observer(observer5), etl::observer_list_full);
|
||||
|
||||
observable.remove_observer(observer3);
|
||||
CHECK_EQUAL(3, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(3), observable.number_of_observers());
|
||||
|
||||
observable.clear_observers();
|
||||
CHECK_EQUAL(0, observable.number_of_observers());
|
||||
CHECK_EQUAL(size_t(0), observable.number_of_observers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ namespace
|
||||
TEST(test_allocate)
|
||||
{
|
||||
etl::pool<Test_Data, 4> pool;
|
||||
|
||||
|
||||
Test_Data* p1;
|
||||
Test_Data* p2;
|
||||
Test_Data* p3;
|
||||
@ -83,7 +83,7 @@ namespace
|
||||
CHECK_NO_THROW(pool.release(p1));
|
||||
CHECK_NO_THROW(pool.release(*p4));
|
||||
|
||||
CHECK_EQUAL(4, pool.available());
|
||||
CHECK_EQUAL(4U, pool.available());
|
||||
|
||||
Test_Data not_in_pool;
|
||||
|
||||
@ -102,7 +102,7 @@ namespace
|
||||
|
||||
// Allocated p1, p2, p3, p4
|
||||
|
||||
CHECK_EQUAL(0, pool.available());
|
||||
CHECK_EQUAL(0U, pool.available());
|
||||
|
||||
CHECK_NO_THROW(pool.release(p2));
|
||||
CHECK_NO_THROW(pool.release(p3));
|
||||
@ -138,7 +138,7 @@ namespace
|
||||
CHECK(p7 != p4);
|
||||
CHECK(p7 != p6);
|
||||
|
||||
CHECK(pool.none_free());
|
||||
CHECK(pool.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -163,24 +163,58 @@ namespace
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_none_free)
|
||||
TEST(test_max_size)
|
||||
{
|
||||
etl::pool<Test_Data, 4> pool;
|
||||
CHECK_EQUAL(4, pool.available());
|
||||
|
||||
CHECK(pool.max_size() == 4);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_size)
|
||||
{
|
||||
etl::pool<Test_Data, 4> pool;
|
||||
CHECK_EQUAL(0, pool.size());
|
||||
|
||||
Test_Data* p;
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.none_free());
|
||||
CHECK_EQUAL(1, pool.size());
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.none_free());
|
||||
CHECK_EQUAL(2, pool.size());
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.none_free());
|
||||
CHECK_EQUAL(3, pool.size());
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(pool.none_free());
|
||||
CHECK_EQUAL(4, pool.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_empty_full)
|
||||
{
|
||||
etl::pool<Test_Data, 4> pool;
|
||||
CHECK(pool.empty());
|
||||
CHECK(!pool.full());
|
||||
|
||||
Test_Data* p;
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.empty());
|
||||
CHECK(!pool.full());
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.empty());
|
||||
CHECK(!pool.full());
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.empty());
|
||||
CHECK(!pool.full());
|
||||
|
||||
p = pool.allocate();
|
||||
CHECK(!pool.empty());
|
||||
CHECK(pool.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -244,42 +278,42 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
////*************************************************************************
|
||||
//TEST(test_get_iterator)
|
||||
//{
|
||||
// typedef etl::pool<Test_Data, 4> Pool;
|
||||
//*************************************************************************
|
||||
TEST(test_get_iterator)
|
||||
{
|
||||
typedef etl::pool<Test_Data, 4> Pool;
|
||||
|
||||
// Pool pool;
|
||||
// Test_Data not_in_pool;
|
||||
Pool pool;
|
||||
Test_Data not_in_pool;
|
||||
|
||||
// Test_Data* p1 = pool.allocate();
|
||||
// Test_Data* p2 = pool.allocate();
|
||||
Test_Data* p1 = pool.allocate();
|
||||
Test_Data* p2 = pool.allocate();
|
||||
|
||||
// Pool::iterator i_data = pool.get_iterator(*p1);
|
||||
// Pool::iterator i_ndata = pool.get_iterator(not_in_pool);
|
||||
Pool::iterator i_data = pool.get_iterator(*p1);
|
||||
Pool::iterator i_ndata = pool.get_iterator(not_in_pool);
|
||||
|
||||
// CHECK(p1 == &*i_data);
|
||||
// CHECK(p2 != &*i_data);
|
||||
// CHECK(pool.end() == i_ndata);
|
||||
//}
|
||||
CHECK(p1 == &*i_data);
|
||||
CHECK(p2 != &*i_data);
|
||||
CHECK(pool.end() == i_ndata);
|
||||
}
|
||||
|
||||
////*************************************************************************
|
||||
//TEST(test_get_iterator_const)
|
||||
//{
|
||||
// typedef etl::pool<Test_Data, 4> Pool;
|
||||
//*************************************************************************
|
||||
TEST(test_get_iterator_const)
|
||||
{
|
||||
typedef etl::pool<Test_Data, 4> Pool;
|
||||
|
||||
// Pool pool;
|
||||
// const Test_Data not_in_pool;
|
||||
Pool pool;
|
||||
const Test_Data not_in_pool;
|
||||
|
||||
// const Test_Data* p1 = pool.allocate();
|
||||
// const Test_Data* p2 = pool.allocate();
|
||||
const Test_Data* p1 = pool.allocate();
|
||||
const Test_Data* p2 = pool.allocate();
|
||||
|
||||
// Pool::const_iterator i_data = pool.get_iterator(*p1);
|
||||
// Pool::const_iterator i_ndata = pool.get_iterator(not_in_pool);
|
||||
Pool::const_iterator i_data = pool.get_iterator(*p1);
|
||||
Pool::const_iterator i_ndata = pool.get_iterator(not_in_pool);
|
||||
|
||||
// CHECK(p1 == &*i_data);
|
||||
// CHECK(p2 != &*i_data);
|
||||
// CHECK(pool.end() == i_ndata);
|
||||
//}
|
||||
CHECK(p1 == &*i_data);
|
||||
CHECK(p2 != &*i_data);
|
||||
CHECK(pool.end() == i_ndata);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -324,6 +324,57 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
//TEST(test_assignment_interface)
|
||||
//{
|
||||
// etl::priority_queue<int, SIZE> priority_queue1;
|
||||
//
|
||||
// priority_queue1.push(1);
|
||||
// priority_queue1.push(4);
|
||||
// priority_queue1.push(3);
|
||||
// priority_queue1.push(2);
|
||||
|
||||
// etl::priority_queue<int, SIZE> priority_queue2;
|
||||
|
||||
// etl::ipriority_queue<int> ipriority_queue1 = priority_queue1;
|
||||
// etl::ipriority_queue<int> ipriority_queue2 = priority_queue2;
|
||||
|
||||
// ipriority_queue2 = ipriority_queue1;
|
||||
|
||||
// CHECK(priority_queue1.size() == priority_queue2.size());
|
||||
|
||||
// while (!priority_queue1.empty())
|
||||
// {
|
||||
// CHECK_EQUAL(priority_queue1.top(), priority_queue2.top());
|
||||
// priority_queue1.pop();
|
||||
// priority_queue2.pop();
|
||||
// }
|
||||
//}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_self_assignment)
|
||||
{
|
||||
etl::priority_queue<int, SIZE> priority_queue1;
|
||||
|
||||
priority_queue1.push(1);
|
||||
priority_queue1.push(4);
|
||||
priority_queue1.push(3);
|
||||
priority_queue1.push(2);
|
||||
|
||||
etl::priority_queue<int, SIZE> priority_queue2 = priority_queue1;
|
||||
|
||||
priority_queue1 = priority_queue1;
|
||||
|
||||
CHECK(priority_queue1.size() == priority_queue2.size());
|
||||
|
||||
while (!priority_queue1.empty())
|
||||
{
|
||||
CHECK_EQUAL(priority_queue1.top(), priority_queue2.top());
|
||||
priority_queue1.pop();
|
||||
priority_queue2.pop();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_interface)
|
||||
{
|
||||
@ -347,32 +398,5 @@ namespace
|
||||
CHECK_EQUAL(compare_priority_queue.size(), ipriority_queue.size());
|
||||
CHECK_EQUAL(compare_priority_queue.top(), ipriority_queue.top());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_self_assignment)
|
||||
{
|
||||
etl::priority_queue<int, SIZE> priority_queue;
|
||||
|
||||
priority_queue.push(2);
|
||||
priority_queue.push(1);
|
||||
priority_queue.push(4);
|
||||
priority_queue.push(3);
|
||||
|
||||
priority_queue = priority_queue;
|
||||
|
||||
CHECK(priority_queue.max_size() == priority_queue.size());
|
||||
|
||||
CHECK_EQUAL(4, priority_queue.top());
|
||||
priority_queue.pop();
|
||||
|
||||
CHECK_EQUAL(3, priority_queue.top());
|
||||
priority_queue.pop();
|
||||
|
||||
CHECK_EQUAL(2, priority_queue.top());
|
||||
priority_queue.pop();
|
||||
|
||||
CHECK_EQUAL(1, priority_queue.top());
|
||||
priority_queue.pop();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ SOFTWARE.
|
||||
#include "../queue.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_queue)
|
||||
{
|
||||
//*************************************************************************
|
||||
@ -67,7 +67,7 @@ namespace
|
||||
queue.push(2);
|
||||
queue.push(3);
|
||||
|
||||
CHECK_EQUAL(3, queue.size());
|
||||
CHECK_EQUAL(3U, queue.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -78,7 +78,7 @@ namespace
|
||||
queue.push(1);
|
||||
queue.push(2);
|
||||
queue.clear();
|
||||
CHECK_EQUAL(0, queue.size());
|
||||
CHECK_EQUAL(0U, queue.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -182,10 +182,10 @@ namespace
|
||||
etl::queue<int, 4> queue;
|
||||
|
||||
queue.push(1);
|
||||
CHECK_EQUAL(1, queue.size());
|
||||
CHECK_EQUAL(1U, queue.size());
|
||||
|
||||
queue.push(2);
|
||||
CHECK_EQUAL(2, queue.size());
|
||||
CHECK_EQUAL(2U, queue.size());
|
||||
|
||||
CHECK_EQUAL(1, queue.front());
|
||||
|
||||
@ -324,6 +324,33 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment_interface)
|
||||
{
|
||||
etl::queue<int, 4> queue1;
|
||||
|
||||
queue1.push(1);
|
||||
queue1.push(2);
|
||||
queue1.push(3);
|
||||
queue1.push(4);
|
||||
|
||||
etl::queue<int, 4> queue2;
|
||||
|
||||
etl::iqueue<int>& iqueue1 = queue1;
|
||||
etl::iqueue<int>& iqueue2 = queue2;
|
||||
|
||||
iqueue2 = iqueue1;
|
||||
|
||||
CHECK(queue1.size() == queue2.size());
|
||||
|
||||
while (!queue1.empty())
|
||||
{
|
||||
CHECK_EQUAL(queue1.front(), queue2.front());
|
||||
queue1.pop();
|
||||
queue2.pop();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_self_assignment)
|
||||
{
|
||||
|
||||
@ -43,6 +43,7 @@ static const size_t SIZE = 10;
|
||||
#define TEST_GREATER_THAN
|
||||
#ifdef TEST_GREATER_THAN
|
||||
typedef etl::set<int, SIZE, std::greater<int> > Data;
|
||||
typedef etl::iset<int, std::greater<int> > IData;
|
||||
typedef std::set<int, std::greater<int> > Compare_Data;
|
||||
#else
|
||||
typedef etl::set<int, SIZE, std::less<int> > Data;
|
||||
@ -211,6 +212,39 @@ namespace
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
Data data1(initial_data.begin(), initial_data.end());
|
||||
Data data2;
|
||||
|
||||
IData& idata1 = data1;
|
||||
IData& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = Check_Equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
Data otherData(data);
|
||||
|
||||
data = data;
|
||||
|
||||
bool isEqual = Check_Equal(data.begin(),
|
||||
data.end(),
|
||||
otherData.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include "../stack.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_stack)
|
||||
{
|
||||
typedef TestDataDC<std::string> ItemDC;
|
||||
@ -99,7 +99,7 @@ namespace
|
||||
stack.push(2);
|
||||
stack.push(3);
|
||||
|
||||
CHECK_EQUAL(3, stack.size());
|
||||
CHECK_EQUAL(3U, stack.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -107,7 +107,7 @@ namespace
|
||||
{
|
||||
etl::stack<int, 4> stack;
|
||||
|
||||
CHECK_EQUAL(4, stack.max_size());
|
||||
CHECK_EQUAL(4U, stack.max_size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -118,7 +118,7 @@ namespace
|
||||
stack.push(1);
|
||||
stack.push(2);
|
||||
stack.clear();
|
||||
CHECK_EQUAL(0, stack.size());
|
||||
CHECK_EQUAL(0U, stack.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -127,10 +127,10 @@ namespace
|
||||
etl::stack<int, 4> stack;
|
||||
|
||||
stack.push(1);
|
||||
CHECK_EQUAL(1, stack.size());
|
||||
CHECK_EQUAL(1U, stack.size());
|
||||
|
||||
stack.push(2);
|
||||
CHECK_EQUAL(2, stack.size());
|
||||
CHECK_EQUAL(2U, stack.size());
|
||||
|
||||
CHECK_EQUAL(2, stack.top());
|
||||
|
||||
@ -144,10 +144,10 @@ namespace
|
||||
etl::stack<int, 4> stack;
|
||||
|
||||
stack.push() = 1;
|
||||
CHECK_EQUAL(1, stack.size());
|
||||
CHECK_EQUAL(1U, stack.size());
|
||||
|
||||
stack.push() = 2;
|
||||
CHECK_EQUAL(2, stack.size());
|
||||
CHECK_EQUAL(2U, stack.size());
|
||||
|
||||
CHECK_EQUAL(2, stack.top());
|
||||
|
||||
@ -176,7 +176,7 @@ namespace
|
||||
stack.push(1);
|
||||
stack.push(2);
|
||||
stack.pop();
|
||||
CHECK_EQUAL(1, stack.size());
|
||||
CHECK_EQUAL(1U, stack.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -306,6 +306,34 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment_interface)
|
||||
{
|
||||
etl::stack<int, 4> stack1;
|
||||
|
||||
stack1.push(1);
|
||||
stack1.push(2);
|
||||
stack1.push(3);
|
||||
stack1.push(4);
|
||||
|
||||
etl::stack<int, 4> stack2;
|
||||
|
||||
etl::istack<int>& istack1 = stack1;
|
||||
etl::istack<int>& istack2 = stack2;
|
||||
|
||||
istack2 = istack1;
|
||||
|
||||
CHECK(istack1.size() == stack2.size());
|
||||
|
||||
while (!stack1.empty())
|
||||
{
|
||||
CHECK_EQUAL(stack1.top(), stack2.top());
|
||||
stack1.pop();
|
||||
stack2.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_self_assignment)
|
||||
{
|
||||
|
||||
545
test/test_unordered_map.cpp
Normal file
545
test/test_unordered_map.cpp
Normal file
@ -0,0 +1,545 @@
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
http://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2016 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.
|
||||
******************************************************************************/
|
||||
|
||||
#include <UnitTest++/UnitTest++.h>
|
||||
|
||||
#include <map>
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
|
||||
#include "data.h"
|
||||
|
||||
#include "../unordered_map.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
//*************************************************************************
|
||||
struct simple_hash
|
||||
{
|
||||
size_t operator ()(const std::string& text) const
|
||||
{
|
||||
return std::accumulate(text.begin(), text.end(), 0);
|
||||
}
|
||||
};
|
||||
|
||||
//*************************************************************************
|
||||
template <typename T1, typename T2>
|
||||
bool Check_Equal(T1 begin1, T1 end1, T2 begin2)
|
||||
{
|
||||
while (begin1 != end1)
|
||||
{
|
||||
if ((begin1->first != begin2->first) || (begin1->second != begin2->second))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
++begin1;
|
||||
++begin2;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
SUITE(test_unordered_map)
|
||||
{
|
||||
static const size_t SIZE = 10;
|
||||
|
||||
typedef TestDataDC<std::string> DC;
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
|
||||
typedef std::pair<std::string, DC> ElementDC;
|
||||
typedef std::pair<std::string, NDC> ElementNDC;
|
||||
|
||||
typedef etl::unordered_map<std::string, DC, SIZE, simple_hash> DataDC;
|
||||
typedef etl::unordered_map<std::string, NDC, SIZE, simple_hash> DataNDC;
|
||||
typedef etl::iunordered_map<std::string, NDC, simple_hash> IDataNDC;
|
||||
|
||||
NDC N0 = NDC("A");
|
||||
NDC N1 = NDC("B");
|
||||
NDC N2 = NDC("C");
|
||||
NDC N3 = NDC("D");
|
||||
NDC N4 = NDC("E");
|
||||
NDC N5 = NDC("F");
|
||||
NDC N6 = NDC("G");
|
||||
NDC N7 = NDC("H");
|
||||
NDC N8 = NDC("I");
|
||||
NDC N9 = NDC("J");
|
||||
NDC N10 = NDC("K");
|
||||
NDC N11 = NDC("L");
|
||||
NDC N12 = NDC("M");
|
||||
NDC N13 = NDC("N");
|
||||
NDC N14 = NDC("O");
|
||||
NDC N15 = NDC("P");
|
||||
NDC N16 = NDC("Q");
|
||||
NDC N17 = NDC("R");
|
||||
NDC N18 = NDC("S");
|
||||
NDC N19 = NDC("T");
|
||||
|
||||
const char* K0 = "FF"; // 0
|
||||
const char* K1 = "FG"; // 1
|
||||
const char* K2 = "FH"; // 2
|
||||
const char* K3 = "FI"; // 3
|
||||
const char* K4 = "FJ"; // 4
|
||||
const char* K5 = "FK"; // 5
|
||||
const char* K6 = "FL"; // 6
|
||||
const char* K7 = "FM"; // 7
|
||||
const char* K8 = "FN"; // 8
|
||||
const char* K9 = "FO"; // 9
|
||||
const char* K10 = "FP"; // 0
|
||||
const char* K11 = "FQ"; // 1
|
||||
const char* K12 = "FR"; // 2
|
||||
const char* K13 = "FS"; // 3
|
||||
const char* K14 = "FT"; // 4
|
||||
const char* K15 = "FU"; // 5
|
||||
const char* K16 = "FV"; // 6
|
||||
const char* K17 = "FW"; // 7
|
||||
const char* K18 = "FX"; // 8
|
||||
const char* K19 = "FY"; // 9
|
||||
|
||||
std::string K[] = { K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 };
|
||||
|
||||
std::vector<ElementNDC> initial_data;
|
||||
std::vector<ElementNDC> excess_data;
|
||||
std::vector<ElementNDC> different_data;
|
||||
|
||||
//*************************************************************************
|
||||
template <typename T1, typename T2>
|
||||
bool Check_Equal(T1 begin1, T1 end1, T2 begin2)
|
||||
{
|
||||
while (begin1 != end1)
|
||||
{
|
||||
if ((begin1->first != begin2->first) || (begin1->second != begin2->second))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
++begin1;
|
||||
++begin2;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
struct SetupFixture
|
||||
{
|
||||
SetupFixture()
|
||||
{
|
||||
ElementNDC n[] =
|
||||
{
|
||||
ElementNDC(K0, N0), ElementNDC(K1, N1), ElementNDC(K2, N2), ElementNDC(K3, N3), ElementNDC(K4, N4),
|
||||
ElementNDC(K5, N5), ElementNDC(K6, N6), ElementNDC(K7, N7), ElementNDC(K8, N8), ElementNDC(K9, N9)
|
||||
};
|
||||
|
||||
ElementNDC n2[] =
|
||||
{
|
||||
ElementNDC(K0, N0), ElementNDC(K1, N1), ElementNDC(K2, N2), ElementNDC(K3, N3), ElementNDC(K4, N4),
|
||||
ElementNDC(K5, N5), ElementNDC(K6, N6), ElementNDC(K7, N7), ElementNDC(K8, N8), ElementNDC(K9, N9),
|
||||
ElementNDC(K10, N10)
|
||||
};
|
||||
|
||||
ElementNDC n3[] =
|
||||
{
|
||||
ElementNDC(K10, N10), ElementNDC(K11, N11), ElementNDC(K12, N12), ElementNDC(K13, N13), ElementNDC(K14, N14),
|
||||
ElementNDC(K15, N15), ElementNDC(K16, N16), ElementNDC(K17, N17), ElementNDC(K18, N18), ElementNDC(K19, N19)
|
||||
};
|
||||
|
||||
initial_data.assign(std::begin(n), std::end(n));
|
||||
excess_data.assign(std::begin(n2), std::end(n2));
|
||||
different_data.assign(std::begin(n3), std::end(n3));
|
||||
}
|
||||
};
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor)
|
||||
{
|
||||
DataDC data;
|
||||
|
||||
CHECK_EQUAL(data.size(), size_t(0));
|
||||
CHECK(data.empty());
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK(data.size() == SIZE);
|
||||
CHECK(!data.empty());
|
||||
CHECK(data.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
DataNDC other_data;
|
||||
|
||||
other_data = data;
|
||||
|
||||
bool isEqual = std::equal(data.begin(),
|
||||
data.end(),
|
||||
other_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_interface)
|
||||
{
|
||||
DataNDC data1(initial_data.begin(), initial_data.end());
|
||||
DataNDC data2;
|
||||
|
||||
IDataNDC& idata1 = data1;
|
||||
IDataNDC& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool isEqual = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
DataNDC other_data(data);
|
||||
|
||||
other_data = other_data;
|
||||
|
||||
bool isEqual = std::equal(data.begin(),
|
||||
data.end(),
|
||||
other_data.begin());
|
||||
|
||||
CHECK(isEqual);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_empty_full)
|
||||
{
|
||||
DataNDC data;
|
||||
|
||||
CHECK(!data.full());
|
||||
CHECK(data.empty());
|
||||
|
||||
data.insert(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK(data.full());
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_index_read)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK_EQUAL(N0, data[K0]);
|
||||
CHECK_EQUAL(N1, data[K1]);
|
||||
CHECK_EQUAL(N2, data[K2]);
|
||||
CHECK_EQUAL(N3, data[K3]);
|
||||
CHECK_EQUAL(N4, data[K4]);
|
||||
CHECK_EQUAL(N5, data[K5]);
|
||||
CHECK_EQUAL(N6, data[K6]);
|
||||
CHECK_EQUAL(N7, data[K7]);
|
||||
CHECK_EQUAL(N8, data[K8]);
|
||||
CHECK_EQUAL(N9, data[K9]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_index_write)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
data[K0] = N9;
|
||||
data[K1] = N8;
|
||||
data[K2] = N7;
|
||||
data[K3] = N6;
|
||||
data[K4] = N5;
|
||||
data[K5] = N4;
|
||||
data[K6] = N3;
|
||||
data[K7] = N2;
|
||||
data[K8] = N1;
|
||||
data[K9] = N0;
|
||||
|
||||
CHECK_EQUAL(N9, data[K0]);
|
||||
CHECK_EQUAL(N8, data[K1]);
|
||||
CHECK_EQUAL(N7, data[K2]);
|
||||
CHECK_EQUAL(N6, data[K3]);
|
||||
CHECK_EQUAL(N5, data[K4]);
|
||||
CHECK_EQUAL(N4, data[K5]);
|
||||
CHECK_EQUAL(N3, data[K6]);
|
||||
CHECK_EQUAL(N2, data[K7]);
|
||||
CHECK_EQUAL(N1, data[K8]);
|
||||
CHECK_EQUAL(N0, data[K9]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_at)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK_EQUAL(data.at(K0), N0);
|
||||
CHECK_EQUAL(data.at(K1), N1);
|
||||
CHECK_EQUAL(data.at(K2), N2);
|
||||
CHECK_EQUAL(data.at(K3), N3);
|
||||
CHECK_EQUAL(data.at(K4), N4);
|
||||
CHECK_EQUAL(data.at(K5), N5);
|
||||
CHECK_EQUAL(data.at(K6), N6);
|
||||
CHECK_EQUAL(data.at(K7), N7);
|
||||
CHECK_EQUAL(data.at(K8), N8);
|
||||
CHECK_EQUAL(data.at(K9), N9);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_at_const)
|
||||
{
|
||||
const DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK_EQUAL(data.at(K0), N0);
|
||||
CHECK_EQUAL(data.at(K1), N1);
|
||||
CHECK_EQUAL(data.at(K2), N2);
|
||||
CHECK_EQUAL(data.at(K3), N3);
|
||||
CHECK_EQUAL(data.at(K4), N4);
|
||||
CHECK_EQUAL(data.at(K5), N5);
|
||||
CHECK_EQUAL(data.at(K6), N6);
|
||||
CHECK_EQUAL(data.at(K7), N7);
|
||||
CHECK_EQUAL(data.at(K8), N8);
|
||||
CHECK_EQUAL(data.at(K9), N9);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assign_range)
|
||||
{
|
||||
DataNDC data;
|
||||
|
||||
data.assign(initial_data.begin(), initial_data.end());
|
||||
|
||||
DataNDC::iterator idata;
|
||||
|
||||
for (size_t i = 0; i < 10; ++i)
|
||||
{
|
||||
idata = data.find(K[i]);
|
||||
CHECK(idata != data.end());
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_value)
|
||||
{
|
||||
DataNDC data;
|
||||
|
||||
data.insert(DataNDC::value_type(K0, N0)); // Inserted
|
||||
data.insert(DataNDC::value_type(K2, N2)); // Inserted
|
||||
data.insert(DataNDC::value_type(K1, N1)); // Inserted
|
||||
data.insert(DataNDC::value_type(K11, N1)); // Duplicate hash. Inserted
|
||||
data.insert(DataNDC::value_type(K1, N3)); // Duplicate key. Not inserted
|
||||
|
||||
CHECK_EQUAL(4, data.size());
|
||||
|
||||
DataNDC::iterator idata;
|
||||
|
||||
idata = data.find(K0);
|
||||
CHECK(idata != data.end());
|
||||
CHECK(idata->first == K0);
|
||||
CHECK(idata->second == N0);
|
||||
|
||||
idata = data.find(K1);
|
||||
CHECK(idata != data.end());
|
||||
CHECK(idata->first == K1);
|
||||
CHECK(idata->second == N1);
|
||||
|
||||
idata = data.find(K2);
|
||||
CHECK(idata != data.end());
|
||||
CHECK(idata->first == K2);
|
||||
CHECK(idata->second == N2);
|
||||
|
||||
idata = data.find(K11);
|
||||
CHECK(idata != data.end());
|
||||
CHECK(idata->first == K11);
|
||||
CHECK(idata->second == N1);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_value_excess)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK_THROW(data.insert(std::make_pair(K10, N10)), etl::unordered_map_full);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_range)
|
||||
{
|
||||
DataNDC data;
|
||||
|
||||
data.insert(initial_data.begin(), initial_data.end());
|
||||
|
||||
for (size_t i = 0; i < data.size(); ++i)
|
||||
{
|
||||
DataNDC::iterator idata = data.find(initial_data[i].first);
|
||||
CHECK(idata != data.end());
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_range_excess)
|
||||
{
|
||||
DataNDC data;
|
||||
|
||||
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::unordered_map_full);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_erase_key)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
size_t count = data.erase(K5);
|
||||
|
||||
CHECK_EQUAL(1, count);
|
||||
|
||||
DataNDC::iterator idata = data.find(K5);
|
||||
CHECK(idata == data.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_erase_single)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
DataNDC::const_iterator idata = data.find(K5);
|
||||
DataNDC::const_iterator inext = idata;
|
||||
++inext;
|
||||
|
||||
DataNDC::const_iterator iafter = data.erase(idata);
|
||||
idata = data.find(K5);
|
||||
|
||||
CHECK(idata == data.end());
|
||||
CHECK(inext == iafter);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_erase_range)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
DataNDC::iterator idata = data.find(K5);
|
||||
DataNDC::iterator idata_end = data.find(K8);
|
||||
|
||||
idata = data.erase(idata, idata_end); // Erase K5, K6, K7
|
||||
CHECK(idata == data.find(K8));
|
||||
|
||||
idata = data.find(K0);
|
||||
CHECK(idata != data.end());
|
||||
|
||||
idata = data.find(K1);
|
||||
CHECK(idata != data.end());
|
||||
|
||||
idata = data.find(K2);
|
||||
CHECK(idata != data.end());
|
||||
|
||||
idata = data.find(K3);
|
||||
CHECK(idata != data.end());
|
||||
|
||||
idata = data.find(K4);
|
||||
CHECK(idata != data.end());
|
||||
|
||||
idata = data.find(K5);
|
||||
CHECK(idata == data.end());
|
||||
|
||||
idata = data.find(K6);
|
||||
CHECK(idata == data.end());
|
||||
|
||||
idata = data.find(K7);
|
||||
CHECK(idata == data.end());
|
||||
|
||||
idata = data.find(K8);
|
||||
CHECK(idata != data.end());
|
||||
|
||||
idata = data.find(K9);
|
||||
CHECK(idata != data.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_clear)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
data.clear();
|
||||
|
||||
CHECK_EQUAL(data.size(), size_t(0));
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_count_key)
|
||||
{
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
|
||||
size_t count = data.count(K5);
|
||||
CHECK_EQUAL(1, count);
|
||||
|
||||
count = data.count(K12);
|
||||
CHECK_EQUAL(0, count);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_equal)
|
||||
{
|
||||
const DataNDC initial1(initial_data.begin(), initial_data.end());
|
||||
const DataNDC initial2(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK(initial1 == initial2);
|
||||
|
||||
const DataNDC different(different_data.begin(), different_data.end());
|
||||
|
||||
CHECK(!(initial1 == different));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_not_equal)
|
||||
{
|
||||
const DataNDC initial1(initial_data.begin(), initial_data.end());
|
||||
const DataNDC initial2(initial_data.begin(), initial_data.end());
|
||||
|
||||
CHECK(!(initial1 != initial2));
|
||||
|
||||
const DataNDC different(different_data.begin(), different_data.end());
|
||||
|
||||
CHECK(initial1 != different);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -274,6 +274,29 @@ namespace
|
||||
CHECK_EQUAL(std::string("Some Text"), variant.get<std::string>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment)
|
||||
{
|
||||
test_variant_1 variant1;
|
||||
test_variant_1 variant2;
|
||||
|
||||
variant1 = 1;
|
||||
variant2 = variant1;
|
||||
|
||||
CHECK_EQUAL(variant1.get<int>(), variant2.get<int>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_self_assignment)
|
||||
{
|
||||
test_variant_1 variant;
|
||||
|
||||
variant = 1;
|
||||
variant = variant;
|
||||
|
||||
CHECK_EQUAL(1, variant.get<int>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(TestGetException)
|
||||
{
|
||||
|
||||
@ -40,8 +40,9 @@ namespace
|
||||
{
|
||||
static const size_t SIZE = 10;
|
||||
|
||||
typedef etl::vector<int, SIZE> Data;
|
||||
typedef std::vector<int> Compare_Data;
|
||||
typedef etl::vector<int, SIZE> Data;
|
||||
typedef etl::ivector<int> IData;
|
||||
typedef std::vector<int> Compare_Data;
|
||||
|
||||
Compare_Data initial_data;
|
||||
Compare_Data less_data;
|
||||
@ -165,6 +166,24 @@ namespace
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment_iterface)
|
||||
{
|
||||
Data data1(initial_data.begin(), initial_data.end());
|
||||
Data data2;
|
||||
|
||||
IData& idata1 = data1;
|
||||
IData& idata2 = data2;
|
||||
|
||||
idata2 = idata1;
|
||||
|
||||
bool is_equal = std::equal(data1.begin(),
|
||||
data1.end(),
|
||||
data2.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
||||
{
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "etl", "etl.vcxproj", "{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug No Uint Tests|Win32 = Debug No Unit Tests|Win32
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No Unit Tests|Win32.ActiveCfg = Debug No Unit Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No Unit Tests|Win32.Build.0 = Debug No Unit Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug No Unit Tests|Win32">
|
||||
<Configuration>Debug No Unit Tests</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@ -23,6 +27,12 @@
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
@ -36,6 +46,9 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
@ -44,6 +57,10 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
@ -66,6 +83,26 @@
|
||||
<Command>$(OutDir)\etl.exe</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_THROW_EXCEPTIONS;PLATFORM_WINDOWS;COMPILER_MICROSOFT;ETL_VERBOSE_ERRORS;ETL_CHECK_PUSH_POP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../unittest-cpp</AdditionalIncludeDirectories>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@ -126,6 +163,7 @@
|
||||
<ClInclude Include="..\..\bitset.h" />
|
||||
<ClInclude Include="..\..\bloom_filter.h" />
|
||||
<ClInclude Include="..\..\bsd_checksum.h" />
|
||||
<ClInclude Include="..\..\char_traits.h" />
|
||||
<ClInclude Include="..\..\checksum.h" />
|
||||
<ClInclude Include="..\..\crc16.h" />
|
||||
<ClInclude Include="..\..\crc16_ccitt.h" />
|
||||
@ -211,11 +249,9 @@
|
||||
<ClInclude Include="..\..\private\multimap_base.h" />
|
||||
<ClInclude Include="..\..\private\multiset_base.h" />
|
||||
<ClInclude Include="..\..\private\pool_base.h" />
|
||||
<ClInclude Include="..\..\private\priority_queue_base.h" />
|
||||
<ClInclude Include="..\..\private\queue_base.h" />
|
||||
<ClInclude Include="..\..\private\set_base.h" />
|
||||
<ClInclude Include="..\..\private\stack_base.h" />
|
||||
<ClInclude Include="..\..\private\unordered_map_base.h" />
|
||||
<ClInclude Include="..\..\private\vector_base.h" />
|
||||
<ClInclude Include="..\..\queue.h" />
|
||||
<ClInclude Include="..\..\radix.h" />
|
||||
@ -280,6 +316,7 @@
|
||||
<ClCompile Include="..\test_deque.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_endian.cpp" />
|
||||
<ClCompile Include="..\test_enum_type.cpp" />
|
||||
@ -290,6 +327,7 @@
|
||||
<ClCompile Include="..\test_flat_multiset.cpp" />
|
||||
<ClCompile Include="..\test_flat_set.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_fnv_1.cpp" />
|
||||
<ClCompile Include="..\test_forward_list.cpp" />
|
||||
@ -305,6 +343,7 @@
|
||||
<ClCompile Include="..\test_list.cpp" />
|
||||
<ClCompile Include="..\test_flat_map.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_map.cpp" />
|
||||
<ClCompile Include="..\test_maths.cpp" />
|
||||
@ -314,6 +353,7 @@
|
||||
<ClCompile Include="..\test_numeric.cpp" />
|
||||
<ClCompile Include="..\test_observer.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No Unit Tests|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_optional.cpp" />
|
||||
<ClCompile Include="..\test_pearson.cpp" />
|
||||
@ -324,6 +364,7 @@
|
||||
<ClCompile Include="..\test_smallest.cpp" />
|
||||
<ClCompile Include="..\test_stack.cpp" />
|
||||
<ClCompile Include="..\test_type_traits.cpp" />
|
||||
<ClCompile Include="..\test_unordered_map.cpp" />
|
||||
<ClCompile Include="..\test_variant.cpp" />
|
||||
<ClCompile Include="..\test_vector.cpp" />
|
||||
<ClCompile Include="..\test_visitor.cpp" />
|
||||
|
||||
@ -450,9 +450,6 @@
|
||||
<ClInclude Include="..\..\private\pool_base.h">
|
||||
<Filter>ETL\Private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\private\priority_queue_base.h">
|
||||
<Filter>ETL\Private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\private\queue_base.h">
|
||||
<Filter>ETL\Private</Filter>
|
||||
</ClInclude>
|
||||
@ -462,15 +459,15 @@
|
||||
<ClInclude Include="..\..\private\stack_base.h">
|
||||
<Filter>ETL\Private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\private\unordered_map_base.h">
|
||||
<Filter>ETL\Private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\private\vector_base.h">
|
||||
<Filter>ETL\Private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\multi_array.h">
|
||||
<Filter>ETL\Containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\char_traits.h">
|
||||
<Filter>ETL\Utilities</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\unittest-cpp\UnitTest++\AssertException.cpp">
|
||||
@ -716,6 +713,9 @@
|
||||
<ClCompile Include="..\test_basic_intrusive_forward_list.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_unordered_map.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Doxyfile">
|
||||
|
||||
@ -267,7 +267,7 @@ namespace etl
|
||||
template <> struct make_unsigned<char> { typedef unsigned char type; };
|
||||
template <> struct make_unsigned<signed char> { typedef unsigned char type; };
|
||||
template <> struct make_unsigned<short> { typedef unsigned short type; };
|
||||
#if defined(COMPILER_GCC)
|
||||
#if defined(COMPILER_GCC) && !defined(PLATFORM_LINUX)
|
||||
template <> struct make_unsigned<wchar_t>
|
||||
{
|
||||
typedef wchar_t type;
|
||||
|
||||
119
unordered_map.h
Normal file
119
unordered_map.h
Normal file
@ -0,0 +1,119 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
http://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2016 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.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __ETL_UNORDERED_MAP__
|
||||
#define __ETL_UNORDERED_MAP__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
|
||||
#include "iunordered_map.h"
|
||||
#include "container.h"
|
||||
#include "pool.h"
|
||||
#include "vector.h"
|
||||
#include "basic_intrusive_forward_list.h"
|
||||
#include "hash.h"
|
||||
|
||||
//*****************************************************************************
|
||||
///\defgroup unordered_map unordered_map
|
||||
/// A unordered_map with the capacity defined at compile time.
|
||||
///\ingroup containers
|
||||
//*****************************************************************************
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//*************************************************************************
|
||||
/// A templated unordered_map implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = std::equal_to<TKey> >
|
||||
class unordered_map : public iunordered_map<TKey, TValue, THash, TKeyEqual>
|
||||
{
|
||||
public:
|
||||
|
||||
static const size_t MAX_SIZE = MAX_SIZE_;
|
||||
|
||||
//*************************************************************************
|
||||
/// Default constructor.
|
||||
//*************************************************************************
|
||||
unordered_map()
|
||||
: iunordered_map<TKey, TValue, THash, TKeyEqual>(node_pool, buckets)
|
||||
{
|
||||
iunordered_map<TKey, TValue, THash, TKeyEqual>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Copy constructor.
|
||||
//*************************************************************************
|
||||
unordered_map(const unordered_map& other)
|
||||
: iunordered_map<TKey, TValue, THash, TKeyEqual>(node_pool, buckets)
|
||||
{
|
||||
iunordered_map<TKey, TValue, THash, TKeyEqual>::assign(other.cbegin(), other.cend());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from an iterator range.
|
||||
///\tparam TIterator The iterator type.
|
||||
///\param first The iterator to the first element.
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
unordered_map(TIterator first, TIterator last)
|
||||
: iunordered_map<TKey, TValue, THash, TKeyEqual>(node_pool, buckets)
|
||||
{
|
||||
iunordered_map<TKey, TValue, THash, TKeyEqual>::assign(first, last);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assignment operator.
|
||||
//*************************************************************************
|
||||
unordered_map& operator = (const unordered_map& rhs)
|
||||
{
|
||||
// Skip if doing self assignment
|
||||
if (this != &rhs)
|
||||
{
|
||||
iunordered_map<TKey, TValue, THash, TKeyEqual>::assign(rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/// The pool of nodes used for the unordered_map.
|
||||
etl::pool<typename iunordered_map<TKey, TValue, THash, TKeyEqual>::node_t, MAX_SIZE> node_pool;
|
||||
|
||||
/// The buckets of node lists.
|
||||
etl::vector<etl::basic_intrusive_forward_list, MAX_SIZE> buckets;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
3
vector.h
3
vector.h
@ -67,6 +67,7 @@ namespace etl
|
||||
vector()
|
||||
: ivector<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ivector<T>::initialise();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -76,6 +77,7 @@ namespace etl
|
||||
explicit vector(size_t initialSize)
|
||||
: ivector<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ivector<T>::initialise();
|
||||
ivector<T>::resize(initialSize);
|
||||
}
|
||||
|
||||
@ -87,6 +89,7 @@ namespace etl
|
||||
vector(size_t initialSize, typename ivector<T>::parameter_t value)
|
||||
: ivector<T>(reinterpret_cast<T*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ivector<T>::initialise();
|
||||
ivector<T>::resize(initialSize, value);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user