fcml  1.1.3
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
fcml::AssemblerResult Class Reference

Assembler result. More...

#include <fcml_assembler.hpp>

Public Member Functions

 AssemblerResult ()
 
const AssembledInstructiongetChosenInstruction () const
 Gets instruction chosen by the assembler as the preferred one. More...
 
const ErrorContainergetErrorContainer () const
 Gets errors container. More...
 
fcml_usize getSize () const
 Gets number of instructions alternatives available in the result. More...
 
 operator const AssembledInstruction * () const
 Gets pointer to the chosen instruction. More...
 
const AssembledInstructionoperator[] (fcml_usize index) const
 Gets an assembled instruction reference by its index. More...
 
void clear ()
 Clears assembler result by removing all assembled instructions, errors and reseting the chosen instruction. More...
 

Protected Member Functions

void setErrorContainer (const ErrorContainer &errorContainer)
 
std::vector< AssembledInstruction > & getAssembledInstructions ()
 
void setChoosenInstructionIndex (fcml_int index)
 

Protected Attributes

friend Assembler
 

Friends

std::basic_ostream< fcml_uint8_t > & operator<< (std::basic_ostream< fcml_uint8_t > &out, const AssemblerResult &result)
 Copies machine code of the chosen instruction to the output stream. More...
 

Detailed Description

Assembler result.

Constructor & Destructor Documentation

fcml::AssemblerResult::AssemblerResult ( )
inline
Since
1.1.0

Member Function Documentation

void fcml::AssemblerResult::clear ( )
inline

Clears assembler result by removing all assembled instructions, errors and reseting the chosen instruction.

Since
1.1.0
const AssembledInstruction* fcml::AssemblerResult::getChosenInstruction ( ) const
inline

Gets instruction chosen by the assembler as the preferred one.

Returns
Preferred instruction.
Since
1.1.0
const ErrorContainer& fcml::AssemblerResult::getErrorContainer ( ) const
inline

Gets errors container.

Returns
Errors container.
Since
1.1.0
fcml_usize fcml::AssemblerResult::getSize ( ) const
inline

Gets number of instructions alternatives available in the result.

Returns
Number of available instructions.
Since
1.1.0
fcml::AssemblerResult::operator const AssembledInstruction * ( ) const
inline

Gets pointer to the chosen instruction.

Returns
Pointer to the chosen instruction.
Since
1.1.0
const AssembledInstruction& fcml::AssemblerResult::operator[] ( fcml_usize  index) const
inline

Gets an assembled instruction reference by its index.

Returns
The assembled instruction for given index.
Exceptions
BadArgumentExceptionArray index out of bound.
Since
1.1.0

Friends And Related Function Documentation

std::basic_ostream<fcml_uint8_t>& operator<< ( std::basic_ostream< fcml_uint8_t > &  out,
const AssemblerResult result 
)
friend

Copies machine code of the chosen instruction to the output stream.

Parameters
[out]outOutput stream.
resultAssembler result.
Returns
Output stream from the parameter.
Since
1.1.0

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