Cerata
A library to generate structural hardware designs
cerata::NodePool Class Reference

A pool of nodes. More...

#include <pool.h>

+ Inheritance diagram for cerata::NodePool:
+ Collaboration diagram for cerata::NodePool:

Public Member Functions

template<typename LitType >
std::shared_ptr< LiteralGetLiteral (LitType value)
 Obtain a literal node of raw storage type LitType with some value.
 
- Public Member Functions inherited from cerata::Pool< Node >
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

- Protected Attributes inherited from cerata::Pool< Node >
std::vector< std::shared_ptr< Node > > objects_
 A list of objects that this pool owns.
 

Detailed Description

A pool of nodes.

Useful to prevent duplicates of literal nodes.

Definition at line 105 of file pool.h.


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