NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
Package Class Reference

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>

Collaboration diagram for Package:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Package() [1/2]

Package::Package ( )

Default constructor.

Definition at line 33 of file plugin.cpp.

◆ Package() [2/2]

Package::Package ( const std::string &  sInstallInfoString)

Specialized constructor. Will fill the internal attributes using the passed install information string.

Parameters
sInstallInfoStringconst 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.

Here is the call graph for this function:

Member Function Documentation

◆ exportDefinition()

std::string Package::exportDefinition ( ) const

This member function will create the definition export string to be written to the plugin definition file.

Returns
std::string

Definition at line 126 of file plugin.cpp.

References sArgumentList, sAuthor, sChangesLog, sCommand, sDescription, sDocumentationIndexID, sKeyWords, sLicense, sMainProcedure, sMenuEntry, sName, sType, and sVersion.

◆ getAuthor()

std::string Package::getAuthor ( ) const

Returns the package author.

Returns
std::string

Definition at line 295 of file plugin.cpp.

References sAuthor, and stripParentheses().

Here is the call graph for this function:

◆ getChangesLog()

std::string Package::getChangesLog ( ) const

Returns the package changeslog.

Returns
std::string

Definition at line 386 of file plugin.cpp.

References sChangesLog, and stripParentheses().

Here is the call graph for this function:

◆ getCommandSignature()

std::string Package::getCommandSignature ( ) const

Creates a command signature for a plugin depending on the selected command line exraction tags of the main procedure.

Returns
std::string

Definition at line 357 of file plugin.cpp.

References sArgumentList, sCommand, and sType.

◆ getDescription()

std::string Package::getDescription ( ) const

Returns the package description.

Returns
std::string

Definition at line 307 of file plugin.cpp.

References sDescription, and stripParentheses().

Here is the call graph for this function:

◆ getKeyWords()

std::string Package::getKeyWords ( ) const

Returns the package keywords.

Returns
std::string

Definition at line 319 of file plugin.cpp.

References sKeyWords, and stripParentheses().

Here is the call graph for this function:

◆ getLicense()

std::string Package::getLicense ( ) const

Returns the package license.

Returns
std::string

Definition at line 331 of file plugin.cpp.

References sLicense, and stripParentheses().

Here is the call graph for this function:

◆ getMenuEntry()

std::string Package::getMenuEntry ( ) const

Returns the menu entry of this plugin.

Returns
std::string

Definition at line 343 of file plugin.cpp.

References sMenuEntry, and stripParentheses().

Here is the call graph for this function:

◆ getName()

std::string Package::getName ( ) const

Returns the package name.

Returns
std::string

Definition at line 283 of file plugin.cpp.

References sName, and stripParentheses().

Referenced by PackageManager::declareNewPackage().

Here is the call graph for this function:

◆ getOptionValue()

std::string Package::getOptionValue ( const std::string &  sInstallInfoString,
const std::string &  sOption,
const std::string &  sDefault 
)
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.

Parameters
sInstallInfoStringconst std::string&
sOptionconst std::string&
sDefaultconst std::string&
Returns
std::string

Definition at line 90 of file plugin.cpp.

References findParameter(), getArgAtPos(), and StripSpaces().

Referenced by Package().

Here is the call graph for this function:

◆ importDefinition()

void Package::importDefinition ( std::string  sDefinitionString)

This member function will import the package definition from the passed definition string.

Parameters
sDefinitionStringstd::string
Returns
void
Remarks
A default constructed Package object is assumed by this member function.

Definition at line 144 of file plugin.cpp.

References getNextArgument(), sArgumentList, sAuthor, sChangesLog, sCommand, sDescription, sDocumentationIndexID, sKeyWords, sLicense, sMainProcedure, sMenuEntry, sName, sType, and sVersion.

Here is the call graph for this function:

◆ incrementVersion()

void Package::incrementVersion ( )

This member function will increment the package version number by a build count.

Returns
void

Definition at line 271 of file plugin.cpp.

References incrementVersion(), and sVersion.

Referenced by incrementVersion(), and update().

Here is the call graph for this function:

◆ isPlugin()

bool Package::isPlugin ( ) const

Returns, whether the current package provides plugin functionalities.

Returns
bool

Definition at line 201 of file plugin.cpp.

References sType.

Referenced by PackageManager::declareNewPackage().

◆ operator!=()

bool Package::operator!= ( const Package _package) const

This member function is an overload for the inequality comparison operator.

Parameters
_packageconst Package&
Returns
bool

Definition at line 229 of file plugin.cpp.

References operator==().

Here is the call graph for this function:

◆ operator==()

bool Package::operator== ( const Package _package) const

This member function is an overload for the equality comparison operator.

Parameters
_packageconst Package&
Returns
bool

Definition at line 215 of file plugin.cpp.

References sAuthor, sCommand, and sName.

Referenced by operator!=().

◆ stripParentheses()

std::string Package::stripParentheses ( const std::string &  sString) const
inlineprivate

This private member function removes the surrounding parentheses, if available.

Parameters
sStringconst std::string&
Returns
std::string

Definition at line 57 of file plugin.hpp.

Referenced by getAuthor(), getChangesLog(), getDescription(), getKeyWords(), getLicense(), getMenuEntry(), and getName().

◆ update()

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.

Parameters
_packageconst Package&
Returns
void

Definition at line 245 of file plugin.cpp.

References incrementVersion(), sArgumentList, sAuthor, sDescription, sLicense, sMainProcedure, sName, sType, and sVersion.

Here is the call graph for this function:

Member Data Documentation

◆ sArgumentList

std::string Package::sArgumentList

◆ sAuthor

std::string Package::sAuthor

Definition at line 73 of file plugin.hpp.

Referenced by exportDefinition(), getAuthor(), importDefinition(), operator==(), Package(), and update().

◆ sChangesLog

std::string Package::sChangesLog

Definition at line 78 of file plugin.hpp.

Referenced by exportDefinition(), getChangesLog(), importDefinition(), and Package().

◆ sCommand

◆ sDescription

std::string Package::sDescription

Definition at line 74 of file plugin.hpp.

Referenced by exportDefinition(), getDescription(), importDefinition(), Package(), and update().

◆ sDocumentationIndexID

std::string Package::sDocumentationIndexID

Definition at line 76 of file plugin.hpp.

Referenced by exportDefinition(), and importDefinition().

◆ sKeyWords

std::string Package::sKeyWords

Definition at line 77 of file plugin.hpp.

Referenced by exportDefinition(), getKeyWords(), importDefinition(), and Package().

◆ sLicense

std::string Package::sLicense

Definition at line 70 of file plugin.hpp.

Referenced by exportDefinition(), getLicense(), importDefinition(), Package(), and update().

◆ sMainProcedure

std::string Package::sMainProcedure

◆ sMenuEntry

std::string Package::sMenuEntry

Definition at line 75 of file plugin.hpp.

Referenced by exportDefinition(), getMenuEntry(), importDefinition(), and Package().

◆ sName

std::string Package::sName

◆ sType

std::string Package::sType

◆ sVersion

std::string Package::sVersion

Definition at line 72 of file plugin.hpp.

Referenced by exportDefinition(), importDefinition(), incrementVersion(), Package(), and update().


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