#ifndef CONTAINER_HPP #define CONTAINER_HPP /* ************************************************************************** */ #include #include /* ************************************************************************** */ namespace lasd { /* ************************************************************************** */ class Container { private: // ... protected: // ... public: // Destructor // ~Container() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // type Empty() specifiers; // (concrete function should not throw exceptions) // type Size() specifiers; // (concrete function should not throw exceptions) // type Clear() specifiers; }; /* ************************************************************************** */ template class LinearContainer { // Must extend Container private: // ... protected: // ... public: // Destructor // ~LinearContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types is possible. // type operator!=(argument) specifiers; // Comparison of abstract types is possible. /* ************************************************************************ */ // Specific member functions // type Front() specifiers; // (concrete function must throw std::length_error when empty) // type Back() specifiers; // (concrete function must throw std::length_error when empty) // type operator[](argument) specifiers; // (concrete function must throw std::out_of_range when out of range) }; /* ************************************************************************** */ template class TestableContainer { // Must extend Container private: // ... protected: // ... public: // Destructor // ~TestableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // type Exists(argument) specifiers; // (concrete function should not throw exceptions) }; /* ************************************************************************** */ template class MappableContainer { // Must extend Container private: // ... protected: // ... public: // Destructor // ~MappableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // typedef std::function MapFunctor; // type MapPreOrder(arguments) specifiers; // type MapPostOrder(arguments) specifiers; }; /* ************************************************************************** */ template class FoldableContainer { // Must extend TestableContainer private: // ... protected: // ... public: // Destructor // ~FoldableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // typedef std::function FoldFunctor; // type FoldPreOrder(arguments) specifiers; // type FoldPostOrder(arguments) specifiers; // type Exists(argument) specifiers; // Override TestableContainer member }; /* ************************************************************************** */ template class InOrderMappableContainer { // Must extend MappableContainer private: // ... protected: // ... public: // Destructor // ~InOrderMappableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // using typename MappableContainer::MapFunctor; // type MapInOrder(arguments) specifiers; }; /* ************************************************************************** */ template class InOrderFoldableContainer { // Must extend FoldableContainer private: // ... protected: // ... public: // Destructor // ~InOrderFoldableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // using typename MappableContainer::MapFunctor; // type FoldInOrder(arguments) specifiers; }; /* ************************************************************************** */ template class BreadthMappableContainer { // Must extend MappableContainer private: // ... protected: // ... public: // Destructor // ~BreadthMappableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // using typename MappableContainer::MapFunctor; // type MapBreadth(arguments) specifiers; }; /* ************************************************************************** */ template class BreadthFoldableContainer { // Must extend FoldableContainer private: // ... protected: // ... public: // Destructor // ~BreadthFoldableContainer() specifiers /* ************************************************************************ */ // Copy assignment // type operator=(argument); // Copy assignment of abstract types should not be possible. // Move assignment // type operator=(argument); // Move assignment of abstract types should not be possible. /* ************************************************************************ */ // Comparison operators // type operator==(argument) specifiers; // Comparison of abstract types might not be possible. // type operator!=(argument) specifiers; // Comparison of abstract types might not be possible. /* ************************************************************************ */ // Specific member functions // using typename FoldableContainer::FoldFunctor; // type FoldBreadth(arguments) specifiers; }; /* ************************************************************************** */ } #include "container.cpp" #endif