Skip to content

Linker

INCLUDE FILE
#include "Linker.h"

class Linker

The base class to translate a program or library.

DEFINITION
class Linker;

constructor Linker

DEFINITION
Linker ( );

constructor Linker

DEFINITION
Linker ( Symbol  name,
Target * target_ );
PARAMETERDESCRIPTION
name
target_

destructor ~Linkervirtual

DEFINITION
virtual ~Linker ( );

method as

Get the linker as a specific type.

DEFINITION
template <typename T>
T * as ( );
RETURNSDESCRIPTION
T *

The linker as the specified type, or nullptr if it is not of that type.

method asconst

Get the linker as a specific type.

DEFINITION
template <typename T>
const T * as ( ) const;
RETURNSDESCRIPTION
const T *

The linker as the specified type, or nullptr if it is not of that type.

method isconst

Check if the linker is of a specific type.

DEFINITION
template <typename T>
bool  is ( ) const;
RETURNSDESCRIPTION
bool

true if the linker is of the specified type, false otherwise.

DEFINITION
void  link ( );
DEFINITION
void  link_new ( );
DEFINITION
virtual void  link_sub ( );

method moduleconst

DEFINITION
const Module & module ( ) const;
RETURNSDESCRIPTION
const Module &

method module

DEFINITION
Module & module ( );
RETURNSDESCRIPTION
Module &

method outputvirtual

DEFINITION
virtual void  output ( const std::filesystem::path & file_name ) = 0;
PARAMETERDESCRIPTION
file_name

method output_extensionconst virtual

DEFINITION
virtual const std::string & output_extension ( ) const = 0;
RETURNSDESCRIPTION
const std::string &

method root_entitiesvirtual protected

DEFINITION
virtual std::vector< Entity * >  root_entities ( ) = 0;
RETURNSDESCRIPTION
std::vector< Entity * >

method set_target

DEFINITION
void  set_target ( Target * new_target );
PARAMETERDESCRIPTION
new_target

method set_target_from_module

If no target has been set yet, use the target from the module.

DEFINITION
bool  set_target_from_module ( );
RETURNSDESCRIPTION
bool

true if a target is now set, false otherwise.

member entitiesprotected

DEFINITION
std::vector< Entity * >  entities;

member module_protected

DEFINITION
Module  module_;

member target

DEFINITION
Target * target;