ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::ArtifactId Class Reference

Type of objects which can be used to reference named entities by their names. More...

#include <ArtifactModel.h>

Collaboration diagram for nnc::ArtifactId:

Public Member Functions

 ArtifactId (std::string id)
 
 ArtifactId (const ArtifactNamed *named)
 
void accept (IArtifactGenerator *g) const override
 This is the core function of each artifact entity and is implemented by all concrete classes in the hierarchy.
 
const std::string & name () const
 
- Public Member Functions inherited from nnc::ArtifactEntity
virtual ~ArtifactEntity ()=default
 
virtual bool isBlock () const
 If this entity represents something containing a block of instructions.
 

Additional Inherited Members

- Protected Member Functions inherited from nnc::ArtifactEntity
 ArtifactEntity ()=default
 

Detailed Description

Type of objects which can be used to reference named entities by their names.

Definition at line 120 of file ArtifactModel.h.

Constructor & Destructor Documentation

◆ ArtifactId() [1/2]

nnc::ArtifactId::ArtifactId ( std::string  id)
inlineexplicit

Definition at line 123 of file ArtifactModel.h.

123: _id(std::move(id)) {}

◆ ArtifactId() [2/2]

nnc::ArtifactId::ArtifactId ( const ArtifactNamed named)
inlineexplicit

Definition at line 124 of file ArtifactModel.h.

124: _id(named->name()) {}

Member Function Documentation

◆ accept()

void nnc::ArtifactId::accept ( IArtifactGenerator g) const
inlineoverridevirtual

This is the core function of each artifact entity and is implemented by all concrete classes in the hierarchy.

Implements nnc::ArtifactEntity.

Definition at line 126 of file ArtifactModel.h.

126{ g->visit(this); }

◆ name()

const std::string & nnc::ArtifactId::name ( ) const
inline

Definition at line 128 of file ArtifactModel.h.

128{ return _id; }

Referenced by nnc::ArtifactGeneratorCppCode::visit(), and nnc::ArtifactGeneratorCppDecl::visit().


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