ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
etiss::LibraryInterface Class Reference

interface class for libraries. More...

#include <LibraryInterface.h>

Inheritance diagram for etiss::LibraryInterface:
Inheritance graph
[legend]
Collaboration diagram for etiss::LibraryInterface:
Collaboration graph
[legend]

Public Member Functions

 LibraryInterface (std::string name)
 
virtual ~LibraryInterface ()
 
virtual std::string versionInfo ()
 simple version info string. intended to present information in a human readable way. More...
 
virtual unsigned countPlugins ()
 
virtual unsigned countCPUArchs ()
 
virtual unsigned countJITs ()
 
virtual std::string nameJIT (unsigned index)
 
virtual std::string namePlugin (unsigned index)
 
virtual std::string nameCPUArch (unsigned index)
 
virtual etiss::JITcreateJIT (unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 
virtual etiss::CPUArchcreateCPUArch (unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 
virtual etiss::PlugincreatePlugin (unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 
virtual void deleteJIT (etiss::JIT *)
 
virtual void deleteCPUArch (etiss::CPUArch *)
 
virtual void deletePlugin (etiss::Plugin *)
 
virtual bool isEmpty ()
 returns true if this library provides nothing More...
 
virtual const std::string & getName ()
 

Static Public Member Functions

static std::shared_ptr< LibraryInterfaceopenSharedLibrary (std::string path, std::string name)
 
static std::shared_ptr< LibraryInterfaceopenIntegratedLibrary ()
 
static unsigned getCurrentLibraryVersion ()
 
static void addSearchPath (const std::string &path)
 

Private Attributes

std::string name_
 

Detailed Description

interface class for libraries.

override functions as needed.

it is neccessary to override all function of the same category. e.g. for plugins: countPlugins(),namePlugin(1),createPlugin(1),deletePlugin(1). isEmpty() uses countXXXXXX() functions to assess its return value and doesn't need to be implemented.

to implement a dynamic library do NOT use this class. Refer to etiss/helper/CPUArchLibrary.h , etiss/helper/JITLibrary.h , etiss/helper/PluginLibrary.h for library functions to implement and use etiss::LibraryInterface::openSharedLibrary to load the dynamic library

Definition at line 91 of file LibraryInterface.h.

Constructor & Destructor Documentation

◆ LibraryInterface()

LibraryInterface::LibraryInterface ( std::string  name)
Parameters
namename of the library
pathlocation of the library and its files

Definition at line 66 of file LibraryInterface.cpp.

◆ ~LibraryInterface()

LibraryInterface::~LibraryInterface ( )
virtual

Definition at line 67 of file LibraryInterface.cpp.

Member Function Documentation

◆ addSearchPath()

void LibraryInterface::addSearchPath ( const std::string &  path)
static

Definition at line 606 of file LibraryInterface.cpp.

References int.

Referenced by TCCJIT::translate().

Here is the caller graph for this function:

◆ countCPUArchs()

unsigned LibraryInterface::countCPUArchs ( )
virtual

Reimplemented in IntegratedLibrary.

Definition at line 78 of file LibraryInterface.cpp.

Referenced by isEmpty().

Here is the caller graph for this function:

◆ countJITs()

unsigned LibraryInterface::countJITs ( )
virtual

Reimplemented in IntegratedLibrary.

Definition at line 82 of file LibraryInterface.cpp.

Referenced by isEmpty().

Here is the caller graph for this function:

◆ countPlugins()

unsigned LibraryInterface::countPlugins ( )
virtual

Reimplemented in IntegratedLibrary.

Definition at line 74 of file LibraryInterface.cpp.

Referenced by isEmpty().

Here is the caller graph for this function:

◆ createCPUArch()

etiss::CPUArch * LibraryInterface::createCPUArch ( unsigned  index,
std::map< std::string, std::string >  options = std::map<std::string, std::string>() 
)
virtual

Reimplemented in IntegratedLibrary.

Definition at line 104 of file LibraryInterface.cpp.

◆ createJIT()

etiss::JIT * LibraryInterface::createJIT ( unsigned  index,
std::map< std::string, std::string >  options = std::map<std::string, std::string>() 
)
virtual

Reimplemented in IntegratedLibrary.

Definition at line 100 of file LibraryInterface.cpp.

◆ createPlugin()

etiss::Plugin * LibraryInterface::createPlugin ( unsigned  index,
std::map< std::string, std::string >  options = std::map<std::string, std::string>() 
)
virtual

Reimplemented in IntegratedLibrary.

Definition at line 108 of file LibraryInterface.cpp.

◆ deleteCPUArch()

void LibraryInterface::deleteCPUArch ( etiss::CPUArch )
virtual

Reimplemented in IntegratedLibrary.

Definition at line 114 of file LibraryInterface.cpp.

◆ deleteJIT()

void LibraryInterface::deleteJIT ( etiss::JIT )
virtual

Reimplemented in IntegratedLibrary.

Definition at line 113 of file LibraryInterface.cpp.

◆ deletePlugin()

void LibraryInterface::deletePlugin ( etiss::Plugin )
virtual

Reimplemented in IntegratedLibrary.

Definition at line 115 of file LibraryInterface.cpp.

◆ getCurrentLibraryVersion()

unsigned etiss::LibraryInterface::getCurrentLibraryVersion ( )
static

Definition at line 152 of file IntegratedLibrary.cpp.

◆ getName()

const std::string & LibraryInterface::getName ( )
virtual
Returns
name of this library

Definition at line 122 of file LibraryInterface.cpp.

References name_.

◆ isEmpty()

bool LibraryInterface::isEmpty ( )
virtual

returns true if this library provides nothing

Definition at line 117 of file LibraryInterface.cpp.

References countCPUArchs(), countJITs(), and countPlugins().

Here is the call graph for this function:

◆ nameCPUArch()

std::string LibraryInterface::nameCPUArch ( unsigned  index)
virtual

Reimplemented in IntegratedLibrary.

Definition at line 95 of file LibraryInterface.cpp.

◆ nameJIT()

std::string LibraryInterface::nameJIT ( unsigned  index)
virtual

Reimplemented in IntegratedLibrary.

Definition at line 87 of file LibraryInterface.cpp.

◆ namePlugin()

std::string LibraryInterface::namePlugin ( unsigned  index)
virtual

Reimplemented in IntegratedLibrary.

Definition at line 91 of file LibraryInterface.cpp.

◆ openIntegratedLibrary()

std::shared_ptr< etiss::LibraryInterface > etiss::LibraryInterface::openIntegratedLibrary ( )
static

Definition at line 122 of file IntegratedLibraryHelper.cpp.

Referenced by etiss_initialize().

Here is the caller graph for this function:

◆ openSharedLibrary()

std::shared_ptr< LibraryInterface > LibraryInterface::openSharedLibrary ( std::string  path,
std::string  name 
)
static

Definition at line 527 of file LibraryInterface.cpp.

References etiss::ERROR, ETISS_SRCLOC, ETISS_VARVAL, etiss::INFO, etiss::log(), etiss::VERBOSE, and etiss::WARNING.

Referenced by etiss::loadLibrary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ versionInfo()

std::string LibraryInterface::versionInfo ( )
virtual

simple version info string. intended to present information in a human readable way.

Reimplemented in IntegratedLibrary.

Definition at line 69 of file LibraryInterface.cpp.

Member Data Documentation

◆ name_

std::string etiss::LibraryInterface::name_
private

Definition at line 147 of file LibraryInterface.h.

Referenced by getName().


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