Moved some member functions to derived classes.

This commit is contained in:
John Wellbelove 2017-02-26 09:10:35 +00:00
parent a33ee11ef8
commit 824ff8e96e
4 changed files with 1 additions and 256 deletions

View File

@ -97,72 +97,6 @@ namespace etl
public:
typedef size_t size_type;
//*************************************************************************
/// Gets the current size of the flat_map.
///\return The current size of the flat_map.
//*************************************************************************
size_type size() const
{
return vbase.size();
}
//*************************************************************************
/// Checks the 'empty' state of the flat_map.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
{
return vbase.empty();
}
//*************************************************************************
/// Checks the 'full' state of the flat_map.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
{
return vbase.full();
}
//*************************************************************************
/// Returns the capacity of the flat_map.
///\return The capacity of the flat_map.
//*************************************************************************
size_type capacity() const
{
return vbase.capacity();
}
//*************************************************************************
/// Returns the maximum possible size of the flat_map.
///\return The maximum size of the flat_map.
//*************************************************************************
size_type max_size() const
{
return vbase.max_size();
}
//*************************************************************************
/// Returns the remaining capacity.
///\return The remaining capacity.
//*************************************************************************
size_t available() const
{
return vbase.available();
}
protected:
//*************************************************************************
/// Constructor.
//*************************************************************************
flat_map_base(vector_base& vbase)
: vbase(vbase)
{
}
vector_base& vbase;
};
}

View File

@ -83,72 +83,6 @@ namespace etl
public:
typedef size_t size_type;
//*************************************************************************
/// Gets the current size of the flat_multimap.
///\return The current size of the flat_multimap.
//*************************************************************************
size_type size() const
{
return vbase.size();
}
//*************************************************************************
/// Checks the 'empty' state of the flat_multimap.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
{
return vbase.empty();
}
//*************************************************************************
/// Checks the 'full' state of the flat_multimap.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
{
return vbase.full();
}
//*************************************************************************
/// Returns the capacity of the flat_multimap.
///\return The capacity of the flat_multimap.
//*************************************************************************
size_type capacity() const
{
return vbase.capacity();
}
//*************************************************************************
/// Returns the maximum possible size of the flat_multimap.
///\return The maximum size of the flat_multimap.
//*************************************************************************
size_type max_size() const
{
return vbase.max_size();
}
//*************************************************************************
/// Returns the remaining capacity.
///\return The remaining capacity.
//*************************************************************************
size_t available() const
{
return vbase.available();
}
protected:
//*************************************************************************
/// Constructor.
//*************************************************************************
flat_multimap_base(vector_base& vbase)
: vbase(vbase)
{
}
vector_base& vbase;
};
}

View File

@ -84,71 +84,14 @@ namespace etl
typedef size_t size_type;
//*************************************************************************
/// Gets the current size of the flat_multiset.
///\return The current size of the flat_multiset.
//*************************************************************************
size_type size() const
{
return vbase.size();
}
//*************************************************************************
/// Checks the 'empty' state of the flat_multiset.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
{
return vbase.empty();
}
//*************************************************************************
/// Checks the 'full' state of the flat_multiset.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
{
return vbase.full();
}
//*************************************************************************
/// Returns the capacity of the flat_multiset.
///\return The capacity of the flat_multiset.
//*************************************************************************
size_type capacity() const
{
return vbase.capacity();
}
//*************************************************************************
/// Returns the maximum possible size of the flat_multiset.
///\return The maximum size of the flat_multiset.
//*************************************************************************
size_type max_size() const
{
return vbase.max_size();
}
//*************************************************************************
/// Returns the remaining capacity.
///\return The remaining capacity.
//*************************************************************************
size_t available() const
{
return vbase.available();
}
protected:
//*************************************************************************
/// Constructor.
//*************************************************************************
flat_multiset_base(vector_base& vbase)
: vbase(vbase)
flat_multiset_base()
{
}
vector_base& vbase;
};
}

View File

@ -97,72 +97,6 @@ namespace etl
public:
typedef size_t size_type;
//*************************************************************************
/// Gets the current size of the flat_set.
///\return The current size of the flat_set.
//*************************************************************************
size_type size() const
{
return vbase.size();
}
//*************************************************************************
/// Checks the 'empty' state of the flat_set.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
{
return vbase.empty();
}
//*************************************************************************
/// Checks the 'full' state of the flat_set.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
{
return vbase.full();
}
//*************************************************************************
/// Returns the capacity of the flat_set.
///\return The capacity of the flat_set.
//*************************************************************************
size_type capacity() const
{
return vbase.capacity();
}
//*************************************************************************
/// Returns the maximum possible size of the flat_set.
///\return The maximum size of the flat_set.
//*************************************************************************
size_type max_size() const
{
return vbase.max_size();
}
//*************************************************************************
/// Returns the remaining capacity.
///\return The remaining capacity.
//*************************************************************************
size_t available() const
{
return vbase.available();
}
protected:
//*************************************************************************
/// Constructor.
//*************************************************************************
flat_set_base(vector_base& vbase)
: vbase(vbase)
{
}
vector_base& vbase;
};
}