fasmcpp  0.1
Public Member Functions | List of all members
fasmcpp::Assembler Class Reference

Manages resources for Flat Assembler. More...

#include <fasmcpp.h>

Public Member Functions

 Assembler ()
 Constructs an empty and invalid instance. More...
 
 Assembler (size_t memory, size_t predefinitionsMemory=10_KB)
 
 Assembler (const Assembler &)=delete
 
 Assembler (Assembler &&)
 
Assembler & operator= (const Assembler &)=delete
 
Assembler & operator= (Assembler &&)
 
void * getMemory () const
 Returns a pointer to the memory allocated for Flat Assembler.
 
uint32_t getMemorySize () const
 Returns the amount of memory in bytes allocated for Flat Assembler.
 
char * getPredefinitionsMemory () const
 Returns a pointer to the memory allocated for predefinitions. More...
 
uint32_t getPredefinitionsMemorySize () const
 Returns the amount of memory in bytes allocated for predefinitions. More...
 

Detailed Description

Manages resources for Flat Assembler.

Constructor & Destructor Documentation

◆ Assembler() [1/2]

fasmcpp::Assembler::Assembler ( )

Constructs an empty and invalid instance.

You should properly initialize an instance before using it.

◆ Assembler() [2/2]

fasmcpp::Assembler::Assembler ( size_t  memory,
size_t  predefinitionsMemory = 10_KB 
)
Parameters
[in]memoryAmount of memory to allocate for the assembler
[in]predefinitionsMemoryAmount of memory to allocate for storing predefinitions
Note
predefinitionsMemory is only used for 64-bit platforms and is ignored otherwise.
Warning
Some platforms allow only one Assembler to be constructed and will throw an exception otherwise.
Exceptions
std::runtime_errorif failed to allocate memory or if the binary was not found.
std::length_errorif the requested amount of memory cannot fit in 32-bit addressable memory.

Member Function Documentation

◆ getPredefinitionsMemory()

char* fasmcpp::Assembler::getPredefinitionsMemory ( ) const

Returns a pointer to the memory allocated for predefinitions.

Only for 64-bit platforms.

◆ getPredefinitionsMemorySize()

uint32_t fasmcpp::Assembler::getPredefinitionsMemorySize ( ) const

Returns the amount of memory in bytes allocated for predefinitions.

Only for 64-bit platforms


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