7#include <unordered_map>
77 template <typename... TFunctions> decltype(auto)
AddFunctions(TFunctions... functions)
80 return std::tuple_cat(temp);
112 std::unordered_map<FunctionID, typename std::list<std::unique_ptr<FunctionType>>::iterator>
Base class for all functions contained in a FunctionContainer.
Definition BaseFunction.hpp:10
bool IsEmpty() const
Returns true if the container is empty.
Definition FunctionContainer.hpp:93
const std::list< std::unique_ptr< FunctionType > > & GetFunctions()
Gets the list of functions in the container.
Definition FunctionContainer.hpp:87
~FunctionContainer()=default
Default destructor for FunctionContainer.
BaseFunction< void, TArgs... > FunctionType
Definition FunctionContainer.hpp:16
FunctionID AddFunction(TCallable callable)
FunctionContainer()=default
Default constructor for FunctionContainer.
std::size_t Size() const
Returns the number of functions in the container.
Definition FunctionContainer.hpp:99
FunctionContainer(FunctionContainer &&) noexcept=default
Move constructor.
FunctionContainer & operator=(const FunctionContainer &)=delete
Deleted copy assignment (FunctionContainer is not copyable due to unique_ptr).
decltype(auto) AddFunctions(TFunctions... functions)
Definition FunctionContainer.hpp:77
FunctionContainer(const FunctionContainer &)=delete
Deleted copy constructor (FunctionContainer is not copyable due to unique_ptr).
std::unordered_map< FunctionID, typename std::list< std::unique_ptr< FunctionType > >::iterator > _idToIterator
Definition FunctionContainer.hpp:113
bool Contains(FunctionID id) const
Definition FunctionContainer.hpp:108
std::unique_ptr< FunctionType > DeleteFunction(FunctionID id)
Deletes a function from the container.
Definition FunctionContainer.inl:60
std::list< std::unique_ptr< FunctionType > > _orderedFunctions
Definition FunctionContainer.hpp:111
Definition BaseFunction.hpp:6
std::size_t FunctionID
FunctionID class to represent a unique identifier for functions.
Definition FunctionID.hpp:9
Type trait to check if a type is derived from BaseFunction.
Definition FunctionContainer.hpp:24