|
My Project
|
Provide mapping from Region IDs to user-specified collection of per-region attributes. More...
#include <RegionAttributeHelpers.hpp>
Classes | |
| struct | Value |
| Aggregate per-region attributes along with region's representative cell. More... | |
Public Types | |
| using | RegionID = typename Select::RegionIDParameter< RegionId, std::is_integral< RegionId >::value >::type |
Expose RegionId as a vocabulary type for use in query methods. | |
| using | ID = typename std::remove_reference< RegionId >::type |
| using | AttributeMap = std::unordered_map< ID, std::unique_ptr< Value > > |
Public Member Functions | |
| template<class RMap > | |
| RegionAttributes (const RMap &rmap, const Attributes &attr) | |
| Constructor. | |
| int | cell (const RegionID reg) const |
| Retrieve representative cell in region. | |
| bool | has (const RegionID reg) const |
| void | insert (const RegionID r, const Attributes &attr) |
| const AttributeMap & | attributes () const |
| Request read-only access to region's attributes. | |
| const Attributes & | attributes (const RegionID reg) const |
| Request read-only access to region's attributes. | |
| Attributes & | attributes (const RegionID reg) |
| Request modifiable access to region's attributes. | |
Provide mapping from Region IDs to user-specified collection of per-region attributes.
| RegionId | Region identifier type. Must be hashable by std::hash<>
int. |
| Attributes | User-defined type that represents collection of attributes that have meaning in a per-region aggregate sense. Must be copy-constructible. |
|
inline |
Constructor.
| RMap | Class type that implements the RegionMapping protocol. Typically an instantiation of Definition AquiferInterface.hpp:35 |
| [in] | rmap | Specific region mapping that provides reverse lookup from regions to cells. |
| [in] | attr | Pre-constructed initialiser for Attributes. |
|
inline |
Request read-only access to region's attributes.
|
inline |
Request modifiable access to region's attributes.
| [in] | reg | Specific region. |
reg's per-region attributes.
|
inline |
Request read-only access to region's attributes.
| [in] | reg | Specific region. |
reg's per-region attributes.
|
inline |
Retrieve representative cell in region.
| [in] | reg | Specific region. |
reg.