gramods
Classes | Public Member Functions | Static Public Attributes | List of all members
gramods::gmCore::ImportLibrary Class Reference

Loads a shared library and loads its nodes into the object factory. More...

#include <ImportLibrary.hh>

Inheritance diagram for gramods::gmCore::ImportLibrary:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmCore::ImportLibrary:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

bool isLoaded ()
 Check if the library has been successfully loaded. More...
 
void initialize () override
 Called to initialize the Object. More...
 
void setLibraryFile (std::filesystem::path path)
 Set full path to library file. More...
 
void setLibrary (std::string file)
 Set name of library, used to create the name of the file. More...
 
void setPrefix (std::string str)
 Set a string to prepend to the library name. More...
 
void setSuffix (std::string str)
 Set a string to append to the library name. More...
 
void setDbgSuffix (std::string str)
 Set a string to append to the library name, before the file suffix. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data. More...
 
virtual ~Object ()
 Cleaning up internal data. More...
 
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument. More...
 
virtual void traverse (Visitor *visitor)
 Calls the child Object's accept method, if such exist. More...
 
virtual std::string getDefaultKey ()
 Returns the default key for the Object when automatically instantiated in a Configuration, i.e. More...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Detailed Description

Loads a shared library and loads its nodes into the object factory.

Member Function Documentation

◆ initialize()

void gramods::gmCore::ImportLibrary::initialize ( )
overridevirtual

Called to initialize the Object.

This should be called once only!

Reimplemented from gramods::gmCore::Object.

◆ isLoaded()

bool gramods::gmCore::ImportLibrary::isLoaded ( )

Check if the library has been successfully loaded.

◆ setDbgSuffix()

void gramods::gmCore::ImportLibrary::setDbgSuffix ( std::string  str)

Set a string to append to the library name, before the file suffix.

Default is "-d" for debug build and an empty string for release.

◆ setLibrary()

void gramods::gmCore::ImportLibrary::setLibrary ( std::string  file)

Set name of library, used to create the name of the file.

The filename is generated as prefix + library + suffix.

XML-attribute: library

◆ setLibraryFile()

void gramods::gmCore::ImportLibrary::setLibraryFile ( std::filesystem::path  path)

Set full path to library file.

XML-attribute: libraryFile

◆ setPrefix()

void gramods::gmCore::ImportLibrary::setPrefix ( std::string  str)

Set a string to prepend to the library name.

Default is "lib" on Linux and the empty string on Windows.

◆ setSuffix()

void gramods::gmCore::ImportLibrary::setSuffix ( std::string  str)

Set a string to append to the library name.

Default is ".so" on Linux and ".dll" on Windows. Observe that this string includes the dot.


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