aes70::dynamic_device::block class

Class for building blocks inside of dynamic device trees.

Base classes

template<class Class>
class aes70::device::OcaBlock

Constructors, destructors, conversion operators

template<typename String>
block(String role)

Public functions

void init(aes70::device::device* d, uint32_t n) virtual
void deinit() virtual
auto get_members() -> const std::vector<std::shared_ptr<aes70::device::object>>&
auto add(std::shared_ptr<aes70::device::object> child) -> bool
auto remove(std::shared_ptr<aes70::device::object> child) -> bool
template<typename Iterator>
auto remove_children(Iterator first, Iterator last) -> Iterator
void clear()
template<typename Iterator>
auto add_children(Iterator first, Iterator last) -> Iterator
template<typename Type, typename... TN>
auto create_child(TN && ... args) -> std::shared_ptr<Type>
template<typename String>
auto create_block(const String& role) -> std::shared_ptr<block>
auto get_role() const -> const std::string&

Function documentation

template<typename String>
aes70::dynamic_device::block::block(String role)

Template parameters
String - The type of the role name, needs to be convertible to std::string.
Parameters
role - The role name of this block.

Creates a block with the given role name.

void aes70::dynamic_device::block::init(aes70::device::device* d, uint32_t n) virtual

Internal method. Initializes this block.

void aes70::dynamic_device::block::deinit() virtual

Internal method. De-initializes this block.

const std::vector<std::shared_ptr<aes70::device::object>>& aes70::dynamic_device::block::get_members()

Returns the list of child objects.

bool aes70::dynamic_device::block::add(std::shared_ptr<aes70::device::object> child)

Adds a child object to a block. Returns false if the child was already within another block.

bool aes70::dynamic_device::block::remove(std::shared_ptr<aes70::device::object> child)

Removes a child object from a block.

template<typename Iterator>
Iterator aes70::dynamic_device::block::remove_children(Iterator first, Iterator last)

Removes a range of children from this block. Returns the iterator position immediately after the last child which was successfully removed. In other words, if one children could not be removed from this block (because it was not a child of this block), the operation stops. If the removal completes, last is returned.

void aes70::dynamic_device::block::clear()

Removes all children from this block.

template<typename Iterator>
Iterator aes70::dynamic_device::block::add_children(Iterator first, Iterator last)

Adds a range of objects to a block. Returns the iterator after the last child which was successfully added.

template<typename Type, typename... TN>
std::shared_ptr<Type> aes70::dynamic_device::block::create_child(TN && ... args)

Template parameters
Type - The type of object to construct. Needs to be a subclass of aes70::device::object.
TN
Parameters
args - The constructor arguments passed to Type

Create a new child object.

template<typename String>
std::shared_ptr<block> aes70::dynamic_device::block::create_block(const String& role)

Create a new child block.

@tparams String - This can be any argument type which can be converted to a std::string.

const std::string& aes70::dynamic_device::block::get_role() const

Returns the role name of this block.