Parses and represents data from a meta.lsx file for a Baldurs Gate 3 plugin.
More...
#include <bg3plugin.h>
|
| Bg3Plugin (const std::string &xml_string) |
| Initializes this object from the given xml string.
|
|
std::string | getUuid () const |
| Getter for the plugin UUID.
|
|
std::string | getVersion () const |
| Getter for the plugin version.
|
|
std::string | getDirectory () const |
| Getter for the plugin directory.
|
|
std::string | getName () const |
| Getter for the plugin name.
|
|
std::string | getDescription () const |
| Getter for the plugin description.
|
|
std::vector< std::pair< std::string, std::string > > | getDependencies () const |
| Getter for the plugin's dependencies.
|
|
bool | hasDependency (const std::string &uuid) |
| Checks if this plugin depends on the plugin with the given UUID.
|
|
std::vector< std::pair< std::string, std::string > > | getMissingDependencies (const std::set< std::string > &plugin_uuids) |
| Compares this plugin's dependencies with the given plugin UUIDs.
|
|
std::string | getXmlString () const |
| Getter for the plugins xml representation.
|
|
std::string | toXmlPluginString () const |
| Constructs an xml string for use in the Mods section of the modsettings.lsx file.
|
|
std::string | toXmlLoadorderString () const |
| Constructs an xml string for use in the ModOrder section of the modsettings.lsx file.
|
|
void | addToXmlModsNode (pugi::xml_node &root) const |
| Adds this plugin to the given Mods xml node in modsettings.lsx.
|
|
void | addToXmlOrderNode (pugi::xml_node &root) const |
| Adds this plugin to the given ModOrder xml node in modsettings.lsx.
|
|
|
static bool | isValidPlugin (const std::string &xml_string) |
| Checks if the given xml string contains a valid plugin that is not the GustavDev plugin.
|
|
|
static constexpr char | BG3_VANILLA_MOD_UUID [] = "28ac9ce2-2aba-8cda-b3b5-6e922f71b6b8" |
| UUID of the GustavDev plugin.
|
|
|
std::string | xml_string_ |
| Xml representation of this plugin.
|
|
std::string | uuid_ |
| UUID of this plugin.
|
|
std::string | version_ |
| Name of this plugin.
|
|
std::string | directory_ |
| Subdirectory of this plugin.
|
|
std::string | name_ |
| Name of this plugin.
|
|
std::string | description_ |
| Description of this plugin.
|
|
std::vector< std::pair< std::string, std::string > > | dependencies_ |
| For every plugin dependency: A pair of its UUID and name.
|
|
Parses and represents data from a meta.lsx file for a Baldurs Gate 3 plugin.
◆ Bg3Plugin()
Bg3Plugin::Bg3Plugin |
( |
const std::string & | xml_string | ) |
|
Initializes this object from the given xml string.
- Parameters
-
xml_string | Source xml string. |
◆ addToXmlModsNode()
void Bg3Plugin::addToXmlModsNode |
( |
pugi::xml_node & | root | ) |
const |
Adds this plugin to the given Mods xml node in modsettings.lsx.
- Parameters
-
root | Xml node to which to add this plugin. |
◆ addToXmlOrderNode()
void Bg3Plugin::addToXmlOrderNode |
( |
pugi::xml_node & | root | ) |
const |
Adds this plugin to the given ModOrder xml node in modsettings.lsx.
- Parameters
-
root | Xml node to which to add this plugin. |
◆ getDependencies()
std::vector< std::pair< std::string, std::string > > Bg3Plugin::getDependencies |
( |
| ) |
const |
Getter for the plugin's dependencies.
- Returns
- for every dependency: A pair of UUID and name.
◆ getDescription()
std::string Bg3Plugin::getDescription |
( |
| ) |
const |
Getter for the plugin description.
- Returns
- The description.
◆ getDirectory()
std::string Bg3Plugin::getDirectory |
( |
| ) |
const |
Getter for the plugin directory.
- Returns
- The directory.
◆ getMissingDependencies()
std::vector< std::pair< std::string, std::string > > Bg3Plugin::getMissingDependencies |
( |
const std::set< std::string > & | plugin_uuids | ) |
|
Compares this plugin's dependencies with the given plugin UUIDs.
- Parameters
-
plugin_uuids | UUIDs to check. |
- Returns
- For every dependency of this not in the given plugin UUIDs: A pair of UUID and name of that dependency.
◆ getName()
std::string Bg3Plugin::getName |
( |
| ) |
const |
Getter for the plugin name.
- Returns
- The name.
◆ getUuid()
std::string Bg3Plugin::getUuid |
( |
| ) |
const |
Getter for the plugin UUID.
- Returns
- The UUID.
◆ getVersion()
std::string Bg3Plugin::getVersion |
( |
| ) |
const |
Getter for the plugin version.
- Returns
- The version.
◆ getXmlString()
std::string Bg3Plugin::getXmlString |
( |
| ) |
const |
Getter for the plugins xml representation.
- Returns
- The xml string.
◆ hasDependency()
bool Bg3Plugin::hasDependency |
( |
const std::string & | uuid | ) |
|
Checks if this plugin depends on the plugin with the given UUID.
- Parameters
-
- Returns
- True if dependency exists.
◆ isValidPlugin()
bool Bg3Plugin::isValidPlugin |
( |
const std::string & | xml_string | ) |
|
|
static |
Checks if the given xml string contains a valid plugin that is not the GustavDev plugin.
- Parameters
-
xml_string | Xml string to check. |
- Returns
- True if the xml string contains a valid plugin.
◆ toXmlLoadorderString()
std::string Bg3Plugin::toXmlLoadorderString |
( |
| ) |
const |
Constructs an xml string for use in the ModOrder section of the modsettings.lsx file.
- Returns
- The xml string.
◆ toXmlPluginString()
std::string Bg3Plugin::toXmlPluginString |
( |
| ) |
const |
Constructs an xml string for use in the Mods section of the modsettings.lsx file.
- Returns
- The xml string.
The documentation for this class was generated from the following files: