Compute Graph Framework SDK Reference  5.8
dw::framework::ParameterCollectionDescriptor Class Reference

Detailed Description

A collection of parameter descriptors.

Definition at line 179 of file ParameterCollectionDescriptor.hpp.

Public Member Functions

void addDescriptor (const std::shared_ptr< const ParameterDescriptor > &descriptor)
 
template<typename NodeT , size_t ConstructorArgumentIndex, typename std::enable_if_t< ConstructorArgumentIndex==std::tuple_size< decltype(describeParameters< NodeT >())>::value , void , * = nullptr>
void addDescriptors ()
 Terminate recursion to add parameter descriptors for each node constructor argument to the collection. More...
 
const std::shared_ptr< const ParameterDescriptor > & getDescriptor (dw::core::StringView const &identifier) const
 
const std::shared_ptr< const ParameterDescriptor > & getDescriptor (size_t const index) const
 Get the parameter descriptor for the passed index. More...
 
size_t getIndex (dw::core::StringView const &identifier) const
 
size_t getSize () const
 Get the number of parameter descriptors. More...
 
bool isValid (dw::core::StringView const &identifier) const noexcept
 Check if the passed parameter name matches a parameter descriptor in the collection. More...
 
bool isValid (size_t const index) const
 Check if the passed index is valid, which mean is within [0, size()). More...
 
 ParameterCollectionDescriptor (size_t const capacity)
 Constructor. More...
 

Constructor & Destructor Documentation

◆ ParameterCollectionDescriptor()

dw::framework::ParameterCollectionDescriptor::ParameterCollectionDescriptor ( size_t const  capacity)
explicit

Constructor.

Member Function Documentation

◆ addDescriptor()

void dw::framework::ParameterCollectionDescriptor::addDescriptor ( const std::shared_ptr< const ParameterDescriptor > &  descriptor)

Add a parameter descriptor to the collection.

Exceptions
Exceptionif the same parameter descriptor is already in the collection or the collection is already at capacity

◆ addDescriptors()

template<typename NodeT , size_t ConstructorArgumentIndex, typename std::enable_if_t< ConstructorArgumentIndex==std::tuple_size< decltype(describeParameters< NodeT >())>::value , void , * = nullptr>
void dw::framework::ParameterCollectionDescriptor::addDescriptors ( )
inline

Terminate recursion to add parameter descriptors for each node constructor argument to the collection.

Definition at line 222 of file ParameterCollectionDescriptor.hpp.

Referenced by dw::framework::createParameterCollectionDescriptor().

◆ getDescriptor() [1/2]

const std::shared_ptr< const ParameterDescriptor > & dw::framework::ParameterCollectionDescriptor::getDescriptor ( dw::core::StringView const &  identifier) const

Get the parameter descriptor with the passed name.

Exceptions
Exceptionif a parameter descriptor with the passed name isn't in the collection

◆ getDescriptor() [2/2]

const std::shared_ptr< const ParameterDescriptor > & dw::framework::ParameterCollectionDescriptor::getDescriptor ( size_t const  index) const

Get the parameter descriptor for the passed index.

◆ getIndex()

size_t dw::framework::ParameterCollectionDescriptor::getIndex ( dw::core::StringView const &  identifier) const

Get the index of the parameter descriptor with the passed name.

Exceptions
Exceptionif a parameter descriptor with the passed name isn't in the collection

◆ getSize()

size_t dw::framework::ParameterCollectionDescriptor::getSize ( ) const

Get the number of parameter descriptors.

◆ isValid() [1/2]

bool dw::framework::ParameterCollectionDescriptor::isValid ( dw::core::StringView const &  identifier) const
noexcept

Check if the passed parameter name matches a parameter descriptor in the collection.

◆ isValid() [2/2]

bool dw::framework::ParameterCollectionDescriptor::isValid ( size_t const  index) const

Check if the passed index is valid, which mean is within [0, size()).


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