#pragma once #include #include #include // Implementing this base class allows an object to be collection of objects. template class CollectionBase { public: void Append(T const & collector) { m_collection.push_back(collector); } void AddCollection(CollectionBase const & collection) { std::copy(std::begin(collection.m_collection), std::end(collection.m_collection), std::back_inserter(m_collection)); } std::vector const & GetCollection() const { return m_collection; } bool Empty() const { return m_collection.empty(); } protected: std::vector m_collection; };