Elaztek Developer Hub
Blamite Game Engine - Guerilla  00307.01.26.21.0804.blamite
The tag editor for the Blamite Game Engine.
BlamTag Class Reference

Class representing a Tag. More...

#include <tags.h>

Public Member Functions

 BlamTag (std::string _file_path)
 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...
 
BlamResult Decompile ()
 Attempts to read the binary tag data. More...
 
BlamResult Compile (std::string file_path)
 Compiles the tag data to a file that can be used with the engine. More...
 

Public Attributes

BlamPluginplugin = nullptr
 Pointer to the plugin associated with this tag. More...
 
std::vector< BlamRevisionrevisions = 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...
 
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...
 

Detailed Description

Class representing a Tag.

Tags can be in one of two formats:

  • Binary - Binary tags contain the raw tag data, similar to how the data would be stored within a Cache File. They do not store any layout information, and as such cannot be opened or modified without a compatiable plugin.
  • XML - XML tags store the tag data in an XML document, which also contains revision history and the tag structure. This is the default format that should be used during development as it is easier to track tag changes, and is more resilient to tag layout changes.

Constructor & Destructor Documentation

◆ BlamTag()

BlamTag::BlamTag ( std::string  _file_path)

Prepares a new tag to be loaded.

Note
This does NOT load the tag from disk. You must call LoadFromDisk or Decompile in order to load data from disk.
Parameters
_file_path- The path to the tag file.

◆ ~BlamTag()

BlamTag::~BlamTag ( )

Releases any data used by the tag by calling #ReleaseFieldData.

Member Function Documentation

◆ Compile()

BlamResult BlamTag::Compile ( std::string  file_path)

Compiles the tag data to a file that can be used with the engine.

Parameters
file_path- The path to the resulting tag file.
Returns
#BlamResult::Success_OK if the tag was compiled successfully, otherwise returns an error code.

◆ Decompile()

BlamResult BlamTag::Decompile ( )

Attempts to read the binary tag data.

Requires a compatiable plugin to be available.

Returns
#BlamResult::Success_OK if the tag was loaded successfully, otherwise returns an error code.

◆ LoadFromDisk()

BlamResult BlamTag::LoadFromDisk ( )

Loads the tag as an XML document from disk.

Returns
#BlamResult::Success_OK if the tag was loaded successfully, otherwise returns an error code.

◆ SaveToDisk()

void BlamTag::SaveToDisk ( std::string  file_path)

Saves any modifications to the XML tag back to disk.

Parameters
file_path- The path to the resulting tag file.

Member Data Documentation

◆ class_name

std::string BlamTag::class_name = ""

The class name as specified in the tag file. Used in the event a plugin could not be found.

◆ class_version

int BlamTag::class_version = -1

The class/plugin version of the tag.

◆ fields

std::vector<BlamTagField*> BlamTag::fields = std::vector<BlamTagField*>()

The list of fields within the tag.

◆ file_path

std::string BlamTag::file_path = ""

The path to the tag file.

◆ plugin

BlamPlugin* BlamTag::plugin = nullptr

Pointer to the plugin associated with this tag.

◆ revisions

std::vector<BlamRevision> BlamTag::revisions = std::vector<BlamRevision>()

The list of revisions within the tag.


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