mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Library 2
update from library 1
This commit is contained in:
@ -25,90 +25,53 @@ protected:
|
||||
using LinearContainer<Data>::size;
|
||||
Data* Elements = nullptr;
|
||||
|
||||
// ...
|
||||
|
||||
public:
|
||||
|
||||
// Default constructor
|
||||
// Vector() specifiers;
|
||||
Vector() = default;
|
||||
|
||||
|
||||
/* ************************************************************************ */
|
||||
Vector() = default;
|
||||
|
||||
// Specific constructors
|
||||
Vector(const ulong); // A vector with a given initial dimension
|
||||
Vector(const LinearContainer<Data>&); // A vector obtained from a LinearContainer
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Copy constructor
|
||||
Vector(const Vector&);
|
||||
Vector(const Vector&);
|
||||
|
||||
// Move constructor
|
||||
Vector(Vector&&)noexcept;
|
||||
|
||||
/* ************************************************************************ */
|
||||
Vector(Vector&&)noexcept;
|
||||
|
||||
// Destructor
|
||||
~Vector();
|
||||
|
||||
/* ************************************************************************ */
|
||||
~Vector();
|
||||
|
||||
// Copy assignment
|
||||
Vector& operator=(const Vector&);
|
||||
Vector& operator=(const Vector&);
|
||||
|
||||
// Move assignment
|
||||
Vector& operator=(Vector&&) noexcept;
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Comparison operators
|
||||
bool operator==(const Vector&) const noexcept;
|
||||
bool operator!=(const Vector&) const noexcept;
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Specific member functions
|
||||
|
||||
void Resize(const ulong); // Resize the vector to a given size
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Specific member functions (inherited from Container)
|
||||
|
||||
void Clear() override; // Override Container member
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Specific member functions (inherited from LinearContainer)
|
||||
|
||||
Data& Front() const override; // Override LinearContainer member (must throw std::length_error when empty)
|
||||
Data& Back() const override; // Override LinearContainer member (must throw std::length_error when empty)
|
||||
|
||||
Data& operator[](const ulong) const override; // Override LinearContainer member (must throw std::out_of_range when out of range)
|
||||
|
||||
/* ************************************************************************ */
|
||||
using typename MappableContainer<Data>::MapFunctor;
|
||||
|
||||
// Specific member functions (inherited from MappableContainer)
|
||||
void MapPreOrder(const MapFunctor, void*) override; // Override MappableContainer member
|
||||
void MapPostOrder(const MapFunctor, void*) override; // Override MappableContainer member
|
||||
|
||||
using typename MappableContainer<Data>::MapFunctor;
|
||||
|
||||
void MapPreOrder(const MapFunctor, void*) override; // Override MappableContainer member
|
||||
void MapPostOrder(const MapFunctor, void*) override; // Override MappableContainer member
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Specific member functions (inherited from FoldableContainer)
|
||||
|
||||
using typename FoldableContainer<Data>::FoldFunctor;
|
||||
using typename FoldableContainer<Data>::FoldFunctor;
|
||||
|
||||
void FoldPreOrder(const FoldFunctor, const void*, void*) const override; // Override FoldableContainer member
|
||||
void FoldPostOrder(const FoldFunctor, const void*, void*) const override; // Override FoldableContainer member
|
||||
};
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
}
|
||||
|
||||
#include "vector.cpp"
|
||||
|
Reference in New Issue
Block a user