![]() |
Blamite Game Engine - Guerilla (Library)
00390.07.02.23.1947.blamite
The tag editor for the Blamite Game Engine.
|
Class representing a Tag. More...
#include <tags.h>
Public Member Functions | |
BlamTag (std::string _file_path, BlamTagUpgradePolicy _upgrade_policy) | |
Prepares a new tag to be loaded. More... | |
~BlamTag () | |
Releases any data used by the tag by calling ReleaseFieldData. More... | |
BlamResult | LoadFromDisk () |
Loads the tag as an XML document from disk. More... | |
void | SaveToDisk (std::string _file_path) |
Saves any modifications to the XML tag back to disk. More... | |
void | SaveToDisk (std::string _file_path, bool keep_unused, bool keep_broken) |
Saves any modifications to the XML tag back to disk. More... | |
void | ReleaseFieldData () |
Releases all items in fields. More... | |
bool | LocatePlugin () |
Attempts to locate a compatiable plugin for a given tag. More... | |
BlamTagField * | GetField (std::string field_id) |
Locates a tag field with a specific ID. More... | |
BlamTagField * | GetField (std::string field_id, BlamTagFieldType field_type) |
Locates a tag field with a specific ID and type. More... | |
std::string | GetTagPath () |
Generates the tag path, relative to its project. More... | |
int | GetVersion () |
Retrieves the current revision of the tag. More... | |
Public Attributes | |
BlamPlugin * | plugin = nullptr |
Pointer to the plugin associated with this tag. More... | |
std::vector< BlamRevision > | revisions = std::vector<BlamRevision>() |
The list of revisions within the tag. More... | |
std::vector< BlamTagField * > | fields = std::vector<BlamTagField*>() |
The list of fields within the tag. More... | |
std::string | file_path = "" |
The path to the tag file. More... | |
BlamProject * | project = nullptr |
The project that this tag belongs to. More... | |
BlamTagTreeNode * | tree_node = nullptr |
The tree node within the hierarchy that this tag belongs to. More... | |
int | class_version = -1 |
The class/plugin version of the tag. More... | |
std::string | class_name = "" |
The class name as specified in the tag file. Used in the event a plugin could not be found. More... | |
int | fieldset_version = 0 |
The fieldset version of the tag. Used when decompiling binary tags. More... | |
std::string | engine_version = "" |
The engine version that was used to create the tag. Used when decompiling binary tags. More... | |
BlamTagUpgradePolicy | upgrade_policy = BlamTagUpgradePolicy::EXACT_VERSION |
The tag's upgrade policy. More... | |
Class representing a Tag.
Tags can be in one of two formats:
BlamTag::BlamTag | ( | std::string | _file_path, |
BlamTagUpgradePolicy | _upgrade_policy | ||
) |
Prepares a new tag to be loaded.
_file_path | - The path to the tag file. |
_upgrade_policy | - Determines what versioning conditions must be met for the tag to be loaded. See BlamTagUpgradePolicy for details. |
BlamTag::~BlamTag | ( | ) |
Releases any data used by the tag by calling ReleaseFieldData.
BlamTagField * BlamTag::GetField | ( | std::string | field_id | ) |
Locates a tag field with a specific ID.
field_id | - The ID of the field. |
nullptr
if no field exists with that ID. BlamTagField * BlamTag::GetField | ( | std::string | field_id, |
BlamTagFieldType | field_type | ||
) |
Locates a tag field with a specific ID and type.
The field must have a matching ID and type.
field_id | - The ID of the field. |
field_type | - The type of the field. |
nullptr
if no field exists with that ID. std::string BlamTag::GetTagPath | ( | ) |
Generates the tag path, relative to its project.
This will be the same path that the engine will see in-game.
int BlamTag::GetVersion | ( | ) |
Retrieves the current revision of the tag.
BlamResult BlamTag::LoadFromDisk | ( | ) |
Loads the tag as an XML document from disk.
bool BlamTag::LocatePlugin | ( | ) |
Attempts to locate a compatiable plugin for a given tag.
true
if a plugin was found, otherwise returns false
. void BlamTag::ReleaseFieldData | ( | ) |
Releases all items in fields.
This will both clear the list and free any memory used by the items within the list. After this is called, any references to the fields within the tag become invalid.
void BlamTag::SaveToDisk | ( | std::string | _file_path | ) |
Saves any modifications to the XML tag back to disk.
_file_path | - The path to the resulting tag file. |
void BlamTag::SaveToDisk | ( | std::string | _file_path, |
bool | keep_unused, | ||
bool | keep_broken | ||
) |
Saves any modifications to the XML tag back to disk.
_file_path | - The path to the resulting tag file. |
keep_unused | - Whether or not to retain unused fields within the tag file. |
keep_broken | - Whether or not to retain broken fields within the tag file. |
std::string BlamTag::class_name = "" |
The class name as specified in the tag file. Used in the event a plugin could not be found.
int BlamTag::class_version = -1 |
The class/plugin version of the tag.
std::string BlamTag::engine_version = "" |
The engine version that was used to create the tag. Used when decompiling binary tags.
std::vector<BlamTagField*> BlamTag::fields = std::vector<BlamTagField*>() |
The list of fields within the tag.
int BlamTag::fieldset_version = 0 |
The fieldset version of the tag. Used when decompiling binary tags.
std::string BlamTag::file_path = "" |
The path to the tag file.
BlamPlugin* BlamTag::plugin = nullptr |
Pointer to the plugin associated with this tag.
BlamProject* BlamTag::project = nullptr |
The project that this tag belongs to.
std::vector<BlamRevision> BlamTag::revisions = std::vector<BlamRevision>() |
The list of revisions within the tag.
BlamTagTreeNode* BlamTag::tree_node = nullptr |
The tree node within the hierarchy that this tag belongs to.
Will be nullptr
if the tag was opened outside of the context of a project.
BlamTagUpgradePolicy BlamTag::upgrade_policy = BlamTagUpgradePolicy::EXACT_VERSION |
The tag's upgrade policy.