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

Represents literals which should go to the artifact source code as is. More...

#include <ArtifactModel.h>

Collaboration diagram for nnc::ArtifactLiteral:

Public Member Functions

 ArtifactLiteral (std::string value)
 
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 & getValue () 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

Represents literals which should go to the artifact source code as is.

Definition at line 100 of file ArtifactModel.h.

Constructor & Destructor Documentation

◆ ArtifactLiteral()

nnc::ArtifactLiteral::ArtifactLiteral ( std::string  value)
inlineexplicit

Definition at line 103 of file ArtifactModel.h.

103: _value(std::move(value)) {}

Member Function Documentation

◆ accept()

void nnc::ArtifactLiteral::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 105 of file ArtifactModel.h.

105{ g->visit(this); }

◆ getValue()

const std::string & nnc::ArtifactLiteral::getValue ( ) const
inline

Returns the literal value.

Returns
the literal value.

Definition at line 111 of file ArtifactModel.h.

111{ return _value; }

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


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