#include <netlist/ExternalManager.hpp>
template<typename T>
ExternalManager class
A class to manage objects of type T that are external to an interval map.
This is due to interval maps requiring their values to be trivially copyable, which is not the case for vectors or other STL containers. This class provides a simple handle-based interface to allocate, access, and free objects of type T, where the handle is simply an index into a vector.
Public types
- using Handle = std::uint32_t
Constructors, destructors, conversion operators
- ExternalManager() defaulted
- ~ExternalManager() defaulted
- ExternalManager(const ExternalManager& other)
- Deep-copy constructor.
Public functions
- auto operator=(ExternalManager&&) -> ExternalManager& defaulted
- auto operator=(const ExternalManager& other) -> ExternalManager&
- Deep-copy assignment.
-
template<typename... Args>auto allocate(Args && ... args) -> Handle
- auto get(Handle handle) const -> const T&
- Const access to the T referenced by the specified handle.
- auto get(Handle handle) -> T&
- Non-const access to the T referenced by the specified handle.
- void erase(Handle handle)
- Free the T referenced by the specified handle.
- auto valid(Handle handle) const -> bool
- Check whether a handle is valid.
- auto clone() const -> ExternalManager
- Return a deep copy.
- void swap(ExternalManager& other)
- Swap with another manager (noexcept)