Bitstream Interpretation Library (BIL)
0.1
|
A registry to hold and lookup V5AddressLayout instances. More...
#include <configuration/V5AddressLayoutRegistry.hpp>
Public Types | |
typedef std::pair< const DeviceID::ID_t, V5AddressLayout > | pair_t |
type for contained device ID/address layout pairs |
Public Member Functions | |
V5AddressLayoutRegistry () | |
Constructs a new V5AddressLayoutRegistry instance. | |
void | insert (DeviceID::ID_t deviceID, const V5AddressLayout &layout) |
Inserts a device ID/address layout pair into registry. | |
bool | erase (DeviceID::ID_t deviceID) |
Erases a device ID/address layout pair from registry. | |
void | clear () |
Erases all device ID/address layout pairs. | |
size_t | size () const |
Gets the number of contained device ID/address layout pairs. | |
pair_t & | at (size_t index) |
Gets a device ID/address layout pair by index. | |
const pair_t & | at (size_t index) const |
Gets a device ID/address layout pair by index read only. | |
V5AddressLayout * | lookup (DeviceID::ID_t deviceID) |
Looks up an address layout by ID. | |
const V5AddressLayout * | lookup (DeviceID::ID_t deviceID) const |
Looks up an address layout by ID read only. |
A registry to hold and lookup V5AddressLayout instances.
This registry holds V5AddressLayout instances. Each address layout is associated with the ID of the corresponding device and can be looked up by it.
Definition at line 26 of file V5AddressLayoutRegistry.hpp.
typedef std::pair<const DeviceID::ID_t, V5AddressLayout> bil::V5AddressLayoutRegistry::pair_t |
type for contained device ID/address layout pairs
Definition at line 75 of file V5AddressLayoutRegistry.hpp.
V5AddressLayoutRegistry::V5AddressLayoutRegistry | ( | ) |
Constructs a new V5AddressLayoutRegistry instance.
Definition at line 13 of file V5AddressLayoutRegistry.cpp.
void V5AddressLayoutRegistry::insert | ( | DeviceID::ID_t | deviceID, |
const V5AddressLayout & | layout | ||
) |
Inserts a device ID/address layout pair into registry.
deviceID | Device ID given layout will be associated with. |
layout | V5AddressLayout instance that will be copied. |
. |
Definition at line 20 of file V5AddressLayoutRegistry.cpp.
bool V5AddressLayoutRegistry::erase | ( | DeviceID::ID_t | deviceID | ) |
Erases a device ID/address layout pair from registry.
deviceID | Device ID of pair to erase. |
Definition at line 30 of file V5AddressLayoutRegistry.cpp.
void V5AddressLayoutRegistry::clear | ( | ) |
Erases all device ID/address layout pairs.
Definition at line 41 of file V5AddressLayoutRegistry.cpp.
size_t V5AddressLayoutRegistry::size | ( | ) | const |
Gets the number of contained device ID/address layout pairs.
Definition at line 47 of file V5AddressLayoutRegistry.cpp.
V5AddressLayoutRegistry::pair_t & V5AddressLayoutRegistry::at | ( | size_t | index | ) |
Gets a device ID/address layout pair by index.
index | Index of the pair to query. |
. |
Definition at line 53 of file V5AddressLayoutRegistry.cpp.
const V5AddressLayoutRegistry::pair_t & V5AddressLayoutRegistry::at | ( | size_t | index | ) | const |
Gets a device ID/address layout pair by index read only.
index | Index of the pair to query. |
. |
Definition at line 64 of file V5AddressLayoutRegistry.cpp.
V5AddressLayout * V5AddressLayoutRegistry::lookup | ( | DeviceID::ID_t | deviceID | ) |
Looks up an address layout by ID.
deviceID | Device ID associated with the layout to get. |
Definition at line 75 of file V5AddressLayoutRegistry.cpp.
const V5AddressLayout * V5AddressLayoutRegistry::lookup | ( | DeviceID::ID_t | deviceID | ) | const |
Looks up an address layout by ID read only.
deviceID | Device ID associated with the layout to get. |
Definition at line 85 of file V5AddressLayoutRegistry.cpp.