Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00402.09.29.23.0627.blamite
The tag editor for the Blamite Game Engine.
tags.h File Reference
#include <string>
#include <vector>
#include <Strings/components/diagnostics/errors/errors.h>
#include <Strings/components/3rdparty/rapidxml/rapidxml.hpp>
#include <HEKGuerilla/components/tags/fields/fields.h>
+ Include dependency graph for tags.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BlamRevision
 Structure representing a tag or plugin revision. More...
 
class  BlamPlugin
 Class representing a Plugin. More...
 
class  BlamTag
 Class representing a Tag. More...
 

Namespaces

 Guerilla
 
 Guerilla::Tags
 Namespace containing functions relating to tags and plugins.
 
 Guerilla::Tags::Compiler
 Namespace containing functions for compiling and decompiling tags.
 

Macros

#define GUERILLA_LIB_API   __declspec(dllimport)
 

Enumerations

enum  BlamTagUpgradePolicy { BlamTagUpgradePolicy::EXACT_VERSION, BlamTagUpgradePolicy::UPGRADE_IF_NEWER, BlamTagUpgradePolicy::IGNORE_VERSION }
 Enumerator representing the tag upgrade policy. More...
 

Functions

GUERILLA_LIB_API BlamTagGuerilla::Tags::LoadTag (std::string file_path)
 Attempts to load a tag from disk and link plugin data. More...
 
GUERILLA_LIB_API BlamTagGuerilla::Tags::LoadTag (std::string file_path, BlamTagTreeNode *tree_node)
 Attempts to load a tag from disk and link plugin data. More...
 
GUERILLA_LIB_API BlamTagGuerilla::Tags::LoadTag (std::string file_path, BlamTagTreeNode *tree_node, BlamTagUpgradePolicy upgrade_policy)
 Attempts to load a tag from disk and link plugin data. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::SaveTag (BlamTag *tag, bool save_both=true)
 Attempts to save a tag back to disk. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::SaveTag (BlamTag *tag, bool keep_unused, bool keep_invalid, bool save_both=true)
 Attempts to save a tag back to disk. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::SaveTagAs (BlamTag *tag, std::string file_path, bool save_both=true)
 Attempts to save a tag to disk under a new filename. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::LinkPluginData (BlamTag *tag)
 Attempts to link all plugin data for a given tag. More...
 
GUERILLA_LIB_API BlamResult Guerilla::Tags::LoadPlugins ()
 Loads all available plugins within the default plugin directory '. More...
 
GUERILLA_LIB_API BlamResult Guerilla::Tags::LoadPlugins (std::vector< std::string > search_folders)
 Loads all available plugins within the application plugin directory. More...
 
GUERILLA_LIB_API void Guerilla::Tags::ReleasePlugins ()
 Releases all plugin data. More...
 
GUERILLA_LIB_API std::vector< BlamPlugin * > Guerilla::Tags::GetPluginList ()
 Retrieves the list of loaded plugins. More...
 
GUERILLA_LIB_API BlamPluginGuerilla::Tags::GetPlugin (std::string class_name)
 Retrieves a plugin based on its name. More...
 
GUERILLA_LIB_API BlamPluginGuerilla::Tags::GetPlugin (std::string class_name, int version)
 Retrieves a plugin based on its name and version. More...
 
GUERILLA_LIB_API BlamPluginGuerilla::Tags::GetPluginMatchOrNewer (std::string class_name, int min_version)
 Retrieves a plugin based on its name and version. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::PluginExists (std::string class_name)
 Checks whether or not a plugin exists. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::PluginExists (std::string class_name, int version)
 Checks whether or not a plugin exists. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::PluginExistsMatchOrNewer (std::string class_name, int min_version)
 Checks whether or not a plugin exists. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::VerifyPluginCompilationData (BlamPlugin *plugin)
 Performs a series of checks on a plugin to ensure that it is ready to be used for compilation. More...
 
GUERILLA_LIB_API BlamResult Guerilla::Tags::Compiler::Decompile (BlamTag *tag)
 Attempts to read the binary tag data. More...
 
GUERILLA_LIB_API BlamResult Guerilla::Tags::Compiler::Compile (BlamTag *tag, std::string compiled_file_path)
 Compiles the tag data to a file that can be used with the engine. More...
 
GUERILLA_LIB_API BlamResult Guerilla::Tags::Compiler::CompileToMemory (BlamTag *tag, void **address, int *size)
 Compiles the tag data to a block of memory, which can then be manipulated further, written to a file, loaded into the game engine directly, and so on. More...
 
GUERILLA_LIB_API bool Guerilla::Tags::VerifyPluginIDs (std::vector< BlamPluginField * > field_list, std::string scope_name)
 

Macro Definition Documentation

◆ GUERILLA_LIB_API

#define GUERILLA_LIB_API   __declspec(dllimport)

Enumeration Type Documentation

◆ BlamTagUpgradePolicy

enum BlamTagUpgradePolicy
strong

Enumerator representing the tag upgrade policy.

When loading tags of an earlier version, there are several ways that they can be handled. Each of these possible methods are described below in their respective enumerator values.

Enumerator
EXACT_VERSION 

Instructs the tag to require an exactly matching plugin version.

This approach prevents a tag from being loaded with an older or newer plugin version. With this approach, a compatiable plugin must be present in one of the plugin folders. This prevents data loss entirely, and is ideal for allowing editing of older tags within newer editing kit versions (though this may not work properly due to the fieldset versions). However, it also prevents tags from being automatically upgraded, making it difficult to use earlier tags in newer engine versions.

UPGRADE_IF_NEWER 

Instructs the tag to allow the use of equal or newer plugin versions.

With this approach, the tag class must either be identical to the tag version, or newer than the tag version. If the plugin is newer, then the tag is upgraded to work with the newer plugin file and, from then onwards, is a newer tag and will no longer be compatiable with earlier plugin versions.

This does present the possibility of data loss, in the case of a newer plugin removing fields that existed previously - however, by default, these fields are preserved within the decompiled tag data for later retrieval, allowing the user to migrate this data to the newer appropriate fields.

IGNORE_VERSION 

Instructs the tag to allow the use of any plugin, either newer or older.

With this approach, no plugin checks are performed outside of the tag class itself. The tag can be loaded using either an outdated plugin or a newer plugin.

This presents the potential risk of loading a newer plugin with an older tag class, which could result in data loss or invalid tag data.