Cerata
A library to generate structural hardware designs
|
A pool of nodes. More...
#include <pool.h>
Public Member Functions | |
template<typename LitType > | |
std::shared_ptr< Literal > | GetLiteral (LitType value) |
Obtain a literal node of raw storage type LitType with some value. | |
![]() | |
void | Add (const std::shared_ptr< Node > &object) |
Add an object to the pool, taking shared ownership. Object may not already exist in the pool. | |
std::optional< Node * > | Get (const std::string &name) |
Retrieve a component from the pool by name, if it exists. Returns empty option otherwise. | |
void | Clear () |
Release ownership of all components. | |
Additional Inherited Members | |
![]() | |
std::vector< std::shared_ptr< Node > > | objects_ |
A list of objects that this pool owns. | |
A pool of nodes.
Useful to prevent duplicates of literal nodes.