Bitstream Interpretation Library (BIL)  0.1
Public Types | Public Member Functions
bil::V5AddressLayoutRegistry Class Reference

A registry to hold and lookup V5AddressLayout instances. More...

#include <configuration/V5AddressLayoutRegistry.hpp>

List of all members.

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_tat (size_t index)
 Gets a device ID/address layout pair by index.
const pair_tat (size_t index) const
 Gets a device ID/address layout pair by index read only.
V5AddressLayoutlookup (DeviceID::ID_t deviceID)
 Looks up an address layout by ID.
const V5AddressLayoutlookup (DeviceID::ID_t deviceID) const
 Looks up an address layout by ID read only.

Detailed Description

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.


Member Typedef Documentation

type for contained device ID/address layout pairs

Definition at line 75 of file V5AddressLayoutRegistry.hpp.


Constructor & Destructor Documentation

V5AddressLayoutRegistry::V5AddressLayoutRegistry ( )

Constructs a new V5AddressLayoutRegistry instance.

Definition at line 13 of file V5AddressLayoutRegistry.cpp.


Member Function Documentation

void V5AddressLayoutRegistry::insert ( DeviceID::ID_t  deviceID,
const V5AddressLayout layout 
)

Inserts a device ID/address layout pair into registry.

Parameters:
deviceIDDevice ID given layout will be associated with.
layoutV5AddressLayout instance that will be copied.
Exceptions:
.

Definition at line 20 of file V5AddressLayoutRegistry.cpp.

bool V5AddressLayoutRegistry::erase ( DeviceID::ID_t  deviceID)

Erases a device ID/address layout pair from registry.

Parameters:
deviceIDDevice ID of pair to erase.
Returns:
True, if designated pair was found, false otherwise.

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.

Returns:
Number of contained 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.

Parameters:
indexIndex of the pair to query.
Returns:
Reference to pair at given index. Valid until it is erased.
Exceptions:
.

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.

Parameters:
indexIndex of the pair to query.
Returns:
Reference to pair at given index. Valid until it is erased.
Exceptions:
.

Definition at line 64 of file V5AddressLayoutRegistry.cpp.

V5AddressLayout * V5AddressLayoutRegistry::lookup ( DeviceID::ID_t  deviceID)

Looks up an address layout by ID.

Parameters:
deviceIDDevice ID associated with the layout to get.
Returns:
Pointer to queried V5AddressLayout instance if found, 0 otherwise. Valid until that instance is erased.

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.

Parameters:
deviceIDDevice ID associated with the layout to get.
Returns:
Pointer to queried V5AddressLayout instance if found, 0 otherwise. Valid until that instance is erased.

Definition at line 85 of file V5AddressLayoutRegistry.cpp.


The documentation for this class was generated from the following files: