Otawa  0.10
otawa::Loader Class Referenceabstract

This interface is implemented by all objects that may build and provide a process. More...

#include <otawa/prog/Loader.h>

Inheritance diagram for otawa::Loader:

Public Member Functions

 Loader (CString name, Version version, Version plugger_version, const elm::system::Plugin::aliases_t &aliases=elm::system::Plugin::aliases_t::EMPTY)
 
virtual CString getName (void) const =0
 Get the name of the loader. More...
 
virtual Processload (Manager *man, CString path, const PropList &props)=0
 Load the file matching the given path with the given properties. More...
 
virtual Processcreate (Manager *man, const PropList &props)=0
 Build a new empty process matching the given properties. More...
 
void check (WorkSpace *ws, cstring name, const Version &version)
 Check the loader used in the given workspace matches the given name and version. More...
 

Protected Member Functions

virtual ~Loader (void)
 Virtual destructor for destruction customization. More...
 

Friends

class Manager
 

Detailed Description

This interface is implemented by all objects that may build and provide a process.

Many kind of loader may exists from the simple binary loader to the complex program builder.

The loader may put on the created processes zero or several of the following features according the machine-level feature provided:

Constructor & Destructor Documentation

Loader::~Loader ( void  )
inlineprotectedvirtual

Virtual destructor for destruction customization.

otawa::Loader::Loader ( CString  name,
Version  version,
Version  plugger_version,
const elm::system::Plugin::aliases_t &  aliases = elm::system::Plugin::aliases_t::EMPTY 
)

Member Function Documentation

void Loader::check ( WorkSpace ws,
cstring  name,
const Version version 
)

Check the loader used in the given workspace matches the given name and version.

Parameters
wsCurrent workspace.
nameName to check.
versionVersion to check.
Exceptions
otawa::ExceptionIf the loader does not match.

References _, elm::Version::accepts(), otawa::Process::loader(), name, and otawa::WorkSpace::process().

Process * Loader::create ( Manager man,
const PropList props 
)
pure virtual

Build a new empty process matching the given properties.

Parameters
manCaller manager.
propsProperties describing the process.
Returns
Created process.
Exceptions
UnsupportedPlatformExceptionLoader does not handle
CString Loader::getName ( void  ) const
pure virtual

Get the name of the loader.

Returns
Name of the loader.
Process * Loader::load ( Manager man,
CString  path,
const PropList props 
)
pure virtual

Load the file matching the given path with the given properties.

The exact type of the file and of the properties depends upon the underlying loader.

Parameters
manCaller manager.
pathPath to the file to load.
propsProperty for loading.
Returns
Process containing the loaded file.
Exceptions
LoadExceptionError during the load.
UnsupportedPlatformExceptionLoader does not handle this platform.

Referenced by otawa::Manager::loadBin().

Friends And Related Function Documentation

friend class Manager
friend

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