NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class implements a single declared package. It can be constructed directly from an install information string. It also supports importing from and exporting to the plugin definition file. More...
#include <plugin.hpp>
Public Member Functions | |
Package () | |
Default constructor. More... | |
Package (const std::string &sInstallInfoString) | |
Specialized constructor. Will fill the internal attributes using the passed install information string. More... | |
std::string | exportDefinition () const |
This member function will create the definition export string to be written to the plugin definition file. More... | |
void | importDefinition (std::string sDefinitionString) |
This member function will import the package definition from the passed definition string. More... | |
bool | isPlugin () const |
Returns, whether the current package provides plugin functionalities. More... | |
bool | operator== (const Package &_plugin) const |
This member function is an overload for the equality comparison operator. More... | |
bool | operator!= (const Package &_plugin) const |
This member function is an overload for the inequality comparison operator. More... | |
void | update (const Package &_plugin) |
This member function can be used to update a package definition with a newer definition. It will automatically increment the packge version, if necessary. More... | |
void | incrementVersion () |
This member function will increment the package version number by a build count. More... | |
std::string | getName () const |
Returns the package name. More... | |
std::string | getAuthor () const |
Returns the package author. More... | |
std::string | getDescription () const |
Returns the package description. More... | |
std::string | getKeyWords () const |
Returns the package keywords. More... | |
std::string | getLicense () const |
Returns the package license. More... | |
std::string | getMenuEntry () const |
Returns the menu entry of this plugin. More... | |
std::string | getCommandSignature () const |
Creates a command signature for a plugin depending on the selected command line exraction tags of the main procedure. More... | |
std::string | getChangesLog () const |
Returns the package changeslog. More... | |
Public Attributes | |
std::string | sCommand |
std::string | sMainProcedure |
std::string | sArgumentList |
std::string | sType |
std::string | sLicense |
std::string | sName |
std::string | sVersion |
std::string | sAuthor |
std::string | sDescription |
std::string | sMenuEntry |
std::string | sDocumentationIndexID |
std::string | sKeyWords |
std::string | sChangesLog |
Private Member Functions | |
std::string | getOptionValue (const std::string &sInstallInfoString, const std::string &sOption, const std::string &sDefault) |
This private member function extracts the option value of the passed option and replaces it by its default value, if it does not exist. More... | |
std::string | stripParentheses (const std::string &sString) const |
This private member function removes the surrounding parentheses, if available. More... | |
This class implements a single declared package. It can be constructed directly from an install information string. It also supports importing from and exporting to the plugin definition file.
Definition at line 44 of file plugin.hpp.
Package::Package | ( | ) |
Default constructor.
Definition at line 33 of file plugin.cpp.
Package::Package | ( | const std::string & | sInstallInfoString | ) |
Specialized constructor. Will fill the internal attributes using the passed install information string.
sInstallInfoString | const std::string& |
Definition at line 45 of file plugin.cpp.
References getOptionValue(), sArgumentList, sAuthor, sChangesLog, sCommand, sDescription, sKeyWords, sLicense, sMainProcedure, sMenuEntry, sName, sType, and sVersion.
std::string Package::exportDefinition | ( | ) | const |
This member function will create the definition export string to be written to the plugin definition file.
Definition at line 126 of file plugin.cpp.
References sArgumentList, sAuthor, sChangesLog, sCommand, sDescription, sDocumentationIndexID, sKeyWords, sLicense, sMainProcedure, sMenuEntry, sName, sType, and sVersion.
std::string Package::getAuthor | ( | ) | const |
Returns the package author.
Definition at line 295 of file plugin.cpp.
References sAuthor, and stripParentheses().
std::string Package::getChangesLog | ( | ) | const |
Returns the package changeslog.
Definition at line 386 of file plugin.cpp.
References sChangesLog, and stripParentheses().
std::string Package::getCommandSignature | ( | ) | const |
Creates a command signature for a plugin depending on the selected command line exraction tags of the main procedure.
Definition at line 357 of file plugin.cpp.
References sArgumentList, sCommand, and sType.
std::string Package::getDescription | ( | ) | const |
Returns the package description.
Definition at line 307 of file plugin.cpp.
References sDescription, and stripParentheses().
std::string Package::getKeyWords | ( | ) | const |
Returns the package keywords.
Definition at line 319 of file plugin.cpp.
References sKeyWords, and stripParentheses().
std::string Package::getLicense | ( | ) | const |
Returns the package license.
Definition at line 331 of file plugin.cpp.
References sLicense, and stripParentheses().
std::string Package::getMenuEntry | ( | ) | const |
Returns the menu entry of this plugin.
Definition at line 343 of file plugin.cpp.
References sMenuEntry, and stripParentheses().
std::string Package::getName | ( | ) | const |
Returns the package name.
Definition at line 283 of file plugin.cpp.
References sName, and stripParentheses().
Referenced by PackageManager::declareNewPackage().
|
private |
This private member function extracts the option value of the passed option and replaces it by its default value, if it does not exist.
sInstallInfoString | const std::string& |
sOption | const std::string& |
sDefault | const std::string& |
Definition at line 90 of file plugin.cpp.
References findParameter(), getArgAtPos(), and StripSpaces().
Referenced by Package().
void Package::importDefinition | ( | std::string | sDefinitionString | ) |
This member function will import the package definition from the passed definition string.
sDefinitionString | std::string |
Definition at line 144 of file plugin.cpp.
References getNextArgument(), sArgumentList, sAuthor, sChangesLog, sCommand, sDescription, sDocumentationIndexID, sKeyWords, sLicense, sMainProcedure, sMenuEntry, sName, sType, and sVersion.
void Package::incrementVersion | ( | ) |
This member function will increment the package version number by a build count.
Definition at line 271 of file plugin.cpp.
References incrementVersion(), and sVersion.
Referenced by incrementVersion(), and update().
bool Package::isPlugin | ( | ) | const |
Returns, whether the current package provides plugin functionalities.
Definition at line 201 of file plugin.cpp.
References sType.
Referenced by PackageManager::declareNewPackage().
bool Package::operator!= | ( | const Package & | _package | ) | const |
This member function is an overload for the inequality comparison operator.
_package | const Package& |
Definition at line 229 of file plugin.cpp.
References operator==().
bool Package::operator== | ( | const Package & | _package | ) | const |
This member function is an overload for the equality comparison operator.
_package | const Package& |
Definition at line 215 of file plugin.cpp.
References sAuthor, sCommand, and sName.
Referenced by operator!=().
|
inlineprivate |
This private member function removes the surrounding parentheses, if available.
sString | const std::string& |
Definition at line 57 of file plugin.hpp.
Referenced by getAuthor(), getChangesLog(), getDescription(), getKeyWords(), getLicense(), getMenuEntry(), and getName().
void Package::update | ( | const Package & | _package | ) |
This member function can be used to update a package definition with a newer definition. It will automatically increment the packge version, if necessary.
_package | const Package& |
Definition at line 245 of file plugin.cpp.
References incrementVersion(), sArgumentList, sAuthor, sDescription, sLicense, sMainProcedure, sName, sType, and sVersion.
std::string Package::sArgumentList |
Definition at line 68 of file plugin.hpp.
Referenced by PackageManager::evalPluginCmd(), exportDefinition(), getCommandSignature(), importDefinition(), Package(), and update().
std::string Package::sAuthor |
Definition at line 73 of file plugin.hpp.
Referenced by exportDefinition(), getAuthor(), importDefinition(), operator==(), Package(), and update().
std::string Package::sChangesLog |
Definition at line 78 of file plugin.hpp.
Referenced by exportDefinition(), getChangesLog(), importDefinition(), and Package().
std::string Package::sCommand |
Definition at line 66 of file plugin.hpp.
Referenced by PackageManager::declareNewPackage(), PackageManager::evalPluginCmd(), exportDefinition(), getCommandSignature(), importDefinition(), operator==(), and Package().
std::string Package::sDescription |
Definition at line 74 of file plugin.hpp.
Referenced by exportDefinition(), getDescription(), importDefinition(), Package(), and update().
std::string Package::sDocumentationIndexID |
Definition at line 76 of file plugin.hpp.
Referenced by exportDefinition(), and importDefinition().
std::string Package::sKeyWords |
Definition at line 77 of file plugin.hpp.
Referenced by exportDefinition(), getKeyWords(), importDefinition(), and Package().
std::string Package::sLicense |
Definition at line 70 of file plugin.hpp.
Referenced by exportDefinition(), getLicense(), importDefinition(), Package(), and update().
std::string Package::sMainProcedure |
Definition at line 67 of file plugin.hpp.
Referenced by PackageManager::declareNewPackage(), PackageManager::evalPluginCmd(), exportDefinition(), importDefinition(), Package(), and update().
std::string Package::sMenuEntry |
Definition at line 75 of file plugin.hpp.
Referenced by exportDefinition(), getMenuEntry(), importDefinition(), and Package().
std::string Package::sName |
Definition at line 71 of file plugin.hpp.
Referenced by PackageManager::declareNewPackage(), exportDefinition(), getName(), importDefinition(), operator==(), Package(), and update().
std::string Package::sType |
Definition at line 69 of file plugin.hpp.
Referenced by PackageManager::evalPluginCmd(), exportDefinition(), getCommandSignature(), importDefinition(), isPlugin(), Package(), and update().
std::string Package::sVersion |
Definition at line 72 of file plugin.hpp.
Referenced by exportDefinition(), importDefinition(), incrementVersion(), Package(), and update().