33#include "../io/filesystem.hpp"
34#include "../ui/error.hpp"
47 std::string
getOptionValue(
const std::string& sInstallInfoString,
const std::string& sOption,
const std::string& sDefault);
59 if (sString.front() ==
'(' && sString.back() ==
')')
60 return sString.substr(1, sString.length()-2);
81 Package(
const std::string& sInstallInfoString);
137 std::map<std::string, std::string>
getMenuMap()
const;
150 void addHelpIndex(
const std::string& _sPluginName, std::string _sHelpId);
173 std::string sReturn =
";";
This class implements the basic input/ output file system and provides functionalities to work with f...
This class implements a single declared package. It can be constructed directly from an install infor...
std::string getCommandSignature() const
Creates a command signature for a plugin depending on the selected command line exraction tags of the...
std::string sDocumentationIndexID
std::string sMainProcedure
Package()
Default constructor.
bool operator!=(const Package &_plugin) const
This member function is an overload for the inequality comparison operator.
std::string getLicense() const
Returns the package license.
std::string getChangesLog() const
Returns the package changeslog.
void importDefinition(std::string sDefinitionString)
This member function will import the package definition from the passed definition string.
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 de...
std::string getName() const
Returns the package name.
std::string sArgumentList
bool operator==(const Package &_plugin) const
This member function is an overload for the equality comparison operator.
std::string getDescription() const
Returns the package description.
std::string exportDefinition() const
This member function will create the definition export string to be written to the plugin definition ...
void update(const Package &_plugin)
This member function can be used to update a package definition with a newer definition....
std::string stripParentheses(const std::string &sString) const
This private member function removes the surrounding parentheses, if available.
bool isPlugin() const
Returns, whether the current package provides plugin functionalities.
std::string getMenuEntry() const
Returns the menu entry of this plugin.
void incrementVersion()
This member function will increment the package version number by a build count.
std::string getKeyWords() const
Returns the package keywords.
std::string getAuthor() const
Returns the package author.
This class implements the procedure plugin system. It will be a parent class of the procedure class.
std::string getPackageName(unsigned int i=0) const
Returns the plugin name of the ith plugin.
std::string getPackageDescription(unsigned int i=0) const
Returns the description of the ith plugin.
PackageManager()
PluginManager default constructor.
std::string getPluginCommandSignature(unsigned int i=0) const
Returns the plugin command signature of the ith plugin.
void addHelpIndex(const std::string &_sPluginName, std::string _sHelpId)
This member function adds the passed documentation index ID to the plugin definition.
std::string getPluginProcName() const
Returns the current plugin's procedure name.
std::string deletePackage(const std::string &sPackage)
This member function deletes the plugin with the passed name from the internal set of definitions and...
std::vector< Package > vPackageInfo
std::string getPluginInfoPath()
This member function simply returns the plugin definition file path.
std::string sPluginProcName
bool loadPlugins()
This member function will read the plugin definitions from the definitions file and create the intern...
std::string getPackageLicense(unsigned int i=0) const
Returns the license information of the ith plugin.
std::string getPluginVarList() const
Returns the current plugin's procedure argument list.
std::string getPackageVersion(unsigned int i=0) const
Returns the version number string of the ith plugin.
const std::vector< Package > & getPackages() const
Returns a const reference to the currently installed packages.
bool isPluginCmd(const std::string &sCmd) const
This member function determines, whether the passed command line contains a plugin command.
bool evalPluginCmd(std::string &sCmd)
This member function converts the call to a plugin in the passed command line into a call to the corr...
~PackageManager()
PluginManager destructor. Will close the internal file stream if it is still open.
std::string getPluginNames() const
Returns the names of the installed plugins.
std::string getPluginMenuEntry(unsigned int i=0) const
Returns the menu entry of the ith plugin.
void updatePluginFile()
This member function will update the plugin definition file with the internal plugin definitions.
std::string sPluginDefinitionFile
unsigned int getPackageCount() const
Returns the number of installed plugins.
std::string getPackageAuthor(unsigned int i=0) const
Returns the author of the ith plugin.
bool declareNewPackage(const std::string &sInstallInfoString)
This member function declares a new plugin from the passed install information string.
PackageManager & operator=(const PackageManager &_manager)
This is the overload for the assignment operator.
std::map< std::string, std::string > getMenuMap() const
Returns the menu map connecting menu entry names with their corresponding procedure,...
std::string sPluginVarList
std::string getPluginCommand(unsigned int i=0) const
Returns the plugin command of the ith plugin.
void assign(const PackageManager &_manager)
This private member function handles the actual copy process.