fcml  1.1.3
Public Member Functions | List of all members
fcml::Assembler Class Reference

An assembler wrapper. More...

#include <fcml_assembler.hpp>

Inheritance diagram for fcml::Assembler:
fcml::NonCopyable fcml::DialectAware

Public Member Functions

 Assembler (Dialect &dialect)
 Creates an assembler instance for given dialect. More...
 
virtual ~Assembler ()
 
fcml_ceh_error assemble (AssemblerContext &ctx, const Instruction &instruction, AssemblerResult &result)
 Assembles given generic instruction model. More...
 
DialectgetDialect () const
 Gets dialect associated with the assembler. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fcml::DialectAware
 DialectAware ()
 Default constructor. More...
 
virtual ~DialectAware ()
 Virtual destructor. More...
 
fcml_st_dialectextractDialect (const Dialect &dialect) const
 Extracts the native FCML dialect from the dialect object. More...
 

Detailed Description

An assembler wrapper.

As you can see the assembler instance is managed internally and is not exposed outside.

Since
1.1.0
Remarks
This class is thread-safe.

Constructor & Destructor Documentation

fcml::Assembler::Assembler ( Dialect dialect)
inline

Creates an assembler instance for given dialect.

Parameters
dialectThe dialect for the assembler instance.
Exceptions
InitExceptionCannot initialize the assembler.
Since
1.1.0
virtual fcml::Assembler::~Assembler ( )
inlinevirtual
Since
1.1.0

Member Function Documentation

fcml_ceh_error fcml::Assembler::assemble ( AssemblerContext ctx,
const Instruction instruction,
AssemblerResult result 
)
inline

Assembles given generic instruction model.

Parameters
ctxThe assembler context.
instructionThe generic instruction model to be assembled.
[out]resultAssembler result.
Exceptions
AssemblingFailedExceptionThrown if assembling fails and AssemblerConf.isThrowExceptionOnError returns true.
Returns
Error code.
Since
1.1.0
Dialect& fcml::Assembler::getDialect ( ) const
inline

Gets dialect associated with the assembler.

Returns
The dialect instance associated with the assembler.
Since
1.1.0

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