31 #ifndef DW_FRAMEWORK_PASSCOLLECTIONDESCRIPTOR_HPP_ 32 #define DW_FRAMEWORK_PASSCOLLECTIONDESCRIPTOR_HPP_ 36 #include <dw/core/container/VectorFixed.hpp> 51 dw::core::StringView
const&
getName()
const noexcept;
63 dw::core::StringView
const&
getDependency(
size_t const index)
const;
70 dw::core::StringView m_name;
72 dwProcessorType m_processorType;
74 bool m_hasExplicitDependencies;
76 dw::core::VectorFixed<dw::core::StringView> m_dependencies;
87 size_t getSize()
const;
97 size_t getIndex(dw::core::StringView
const& identifier)
const;
104 const PassDescriptor& getDescriptor(dw::core::StringView
const& identifier)
const;
107 bool isValid(
size_t const index)
const noexcept;
110 bool isValid(dw::core::StringView
const& identifier)
const noexcept;
121 dw::core::VectorFixed<PassDescriptor> m_descriptors;
129 typename NodeT,
size_t Index,
130 typename std::enable_if_t<Index == passSize<NodeT>(),
void>* =
nullptr>
140 typename NodeT,
size_t Index,
141 typename std::enable_if_t<Index<passSize<NodeT>(),
void>* =
nullptr>
146 constexpr
auto dependencies = passDependencies<NodeT, Index>();
147 PassDescriptor descriptor(passName<NodeT, Index>(), passProcessorType<NodeT, Index>(), hasPassDependencies<NodeT, Index>(), dependencies.size());
148 for (
size_t i = 0; i < dependencies.size(); ++i)
154 addPassDescriptor<NodeT, Index + 1>(collection);
160 template <
typename NodeT>
164 detail::addPassDescriptor<NodeT, 0>(collection);
171 #endif // DW_FRAMEWORK_PASSCOLLECTIONDESCRIPTOR_HPP_ static PassCollectionDescriptor createPassCollectionDescriptor()
Create a pass collection descriptor for a give node.
size_t getNumberOfDependencies() const
Get number of dependencies.
void addDescriptor(const PassDescriptor &descriptor)
Add a pass descriptor to the collection.
PassDescriptor(dw::core::StringView const &name, dwProcessorType const processorType, const bool hasExplicitDependencies, size_t const dependencies)
Constructor.
dwProcessorType getProcessorType() const noexcept
Get the processor type running on.
void addDependency(dw::core::StringView const &dependency)
Add another pass name as a dependency.
The description of a pass.
dw::core::StringView const & getName() const noexcept
Get the pass name.
dw::core::StringView const & getDependency(size_t const index) const
Get the dependent on pass name by index.
A collection of pass descriptors.
bool hasExplicitDependencies() const noexcept
Check if the pass specifies explicit dependencies.