Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00385.05.12.23.0209.blamite
The tag editor for the Blamite Game Engine.
ascii.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include "../fields.h"
6 
7 #ifdef GUERILLA_LIB_EXPORTS
8 #define GUERILLA_LIB_API __declspec(dllexport)
9 #else
10 #define GUERILLA_LIB_API __declspec(dllimport)
11 #endif
12 
19 {
20 private:
21 
22 public:
23  std::string value = "";
24 
31 
32  std::string GenerateXMLString();
33  std::vector<char> GetValueAsBytes();
34 };
BlamTagField
Class representing a tag field.
Definition: fields.h:164
comment.h
BlamTagFieldType::Int16
@ Int16
Indicates that the field is a 16-bit integer.
block.h
BlamTag::GetTagPath
std::string GetTagPath()
Generates the tag path, relative to its project.
Definition: BlamTag.cpp:704
BlamTagField::GetType
BlamTagFieldType GetType()
Retrieves the type of this field.
Definition: BlamTagField.cpp:19
BlamTagFieldType::Real
@ Real
Indicates that the field is a Float32.
BlamEnumFieldOption::value
int value
The raw value of the option. This is what is stored within a compiled tag.
Definition: enum.h:21
BlamTagFieldType::Int32
@ Int32
Indicates that the field is a 32-bit integer.
BlamProject::content_root
std::string content_root
The root folder containing project content.
Definition: projects.h:94
BlamPluginField_Enum::options
std::vector< BlamEnumFieldOption > options
The list of options within the enum.
Definition: enum.h:34
BlamTag::ReleaseFieldData
void ReleaseFieldData()
Releases all items in fields.
Definition: BlamTag.cpp:402
bitfield.h
BlamPluginField_Tagref
Definition: tagref.h:14
BlamPluginField_Block::entry_size
int entry_size
The size of a each block entry.
Definition: block.h:44
next_new_tag_number
int next_new_tag_number
The number to use for the next newly created tag.
Definition: BlamPlugin.cpp:18
BlamPlugin::fieldset_version
int fieldset_version
The fieldset version of the tag.
Definition: tags.h:109
BlamTagFieldType::Enum8
@ Enum8
Indicates that the field is an Enum8.
BlamPluginField_Enum
Class representing a plugin enum field.
Definition: enum.h:31
BlamTag::project
BlamProject * project
The project that this tag belongs to.
Definition: tags.h:237
BlamPlugin::class_name_short
std::string class_name_short
The short class name. Ex: scnr. Must be 4 characters or fewer.
Definition: tags.h:106
BlamTagFieldType::Vector4
@ Vector4
Indicates that the field is a vector4.
BlamTagField_Bitfield::bits
std::vector< BlamBitfieldBitData > bits
The list of bits within this bitfield.
Definition: bitfield.h:60
tags.h
ENGINE_VERSION
#define ENGINE_VERSION
BlamPlugin::~BlamPlugin
~BlamPlugin()
Destroys the plugin data and releases all field data.
Definition: BlamPlugin.cpp:450
BlamTagFieldType::Block
@ Block
Indicates that the field is a tag block.
BlamTagField_Block::entries
std::vector< BlamTagBlockEntry * > entries
The list of entries within this block.
Definition: block.h:80
BlamRevision::description
std::string description
The description of the revision.
Definition: tags.h:69
Guerilla::Tags::PluginExistsMatchOrNewer
GUERILLA_LIB_API bool PluginExistsMatchOrNewer(std::string class_name, int min_version)
Checks whether or not a plugin exists.
Definition: plugins.cpp:211
BlamRevision::author
std::string author
The revision author.
Definition: tags.h:67
BlamTag::revisions
std::vector< BlamRevision > revisions
The list of revisions within the tag.
Definition: tags.h:232
BlamTagFieldType::Ascii
@ Ascii
Indicates that the field is a string of text.
BlamTagField::field_id
std::string field_id
The ID of this field.
Definition: fields.h:175
BlamTagField_Vector::value
BlamVector4 value
The value of the field, represented as a 4D vector.
Definition: vector.h:23
BlamTagFieldType::Dataref
@ Dataref
Indicates that the field is a data reference.
BlamPluginField::input_hint
std::string input_hint
An additional piece of short text that can be used to suggest valid input for a field.
Definition: fields.h:72
BlamPluginField::GetType
BlamTagFieldType GetType()
Retrieves the type of this field.
Definition: BlamPluginField.cpp:44
BlamTagFieldType::Enum16
@ Enum16
Indicates that the field is an Enum16.
BlamTagBlockEntry
Data structure representing a tag block entry.
Definition: block.h:17
BlamTagFieldType::Bitfield16
@ Bitfield16
Indicates that the field is a Bitfield16.
BlamTag::upgrade_policy
BlamTagUpgradePolicy upgrade_policy
The tag's upgrade policy.
Definition: tags.h:249
BlamTagFieldType
BlamTagFieldType
Enumerator containing all possible tag field types.
Definition: fields.h:23
Guerilla::Tags::GetPlugin
GUERILLA_LIB_API BlamPlugin * GetPlugin(std::string class_name)
Retrieves a plugin based on its name.
Definition: plugins.cpp:136
BlamPluginField_Comment::ParseCommentType
void ParseCommentType(std::string comment_type_string)
Attempts to parse the comment_type of the field from a string.
Definition: BlamPluginField_Comment.cpp:12
BlamTagFieldType::Int8
@ Int8
Indicates that the field is an 8-bit integer.
BlamBitfieldBitData::id
std::string id
The ID of the bit.
Definition: bitfield.h:30
BlamTagField_Color::value
BlamColor value
The value of the field, represented as a color.
Definition: color.h:22
BlamPlugin::revisions
std::vector< BlamRevision > revisions
The list of revisions contained within this plugin.
Definition: tags.h:111
BlamTagField_Float32
Class representing a float32 tag field.
Definition: float32.h:16
BlamBitfieldBitInfo::index
int index
The bit's index.
Definition: bitfield.h:22
BlamPlugin::fields
std::vector< BlamPluginField * > fields
The list of fields contained within this plugin.
Definition: tags.h:112
Guerilla::Tags::PluginExists
GUERILLA_LIB_API bool PluginExists(std::string class_name)
Checks whether or not a plugin exists.
Definition: plugins.cpp:191
BlamPlugin::RecalculateFieldData
void RecalculateFieldData()
Recalculates all offsets and lengths for the plugin.
Definition: BlamPlugin.cpp:664
BlamRevision
Structure representing a tag or plugin revision.
Definition: tags.h:65
BlamTagField_Tagref::referenced_tag_class
std::string referenced_tag_class
Definition: tagref.h:29
BlamTagUpgradePolicy
BlamTagUpgradePolicy
Enumerator representing the tag upgrade policy.
Definition: tags.h:24
BlamPluginField_Block
Class representing a block plugin field.
Definition: block.h:41
BlamTagFieldType::Color
@ Color
Indicates that the field is a color.
BlamTagFieldType::Comment
@ Comment
Indicates that the field is a comment. These do not store any tag data.
dataref.h
BlamTagField::GenerateXMLString
virtual std::string GenerateXMLString()
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField.cpp:9
tagref.h
BlamPlugin::file_path
std::string file_path
The path to the plugin file.
Definition: tags.h:114
BlamTag::fields
std::vector< BlamTagField * > fields
The list of fields within the tag.
Definition: tags.h:233
BlamTag::LoadFromDisk
BlamResult LoadFromDisk()
Loads the tag as an XML document from disk.
Definition: BlamTag.cpp:425
BlamPlugin::GetVersion
int GetVersion()
Retrieves the current revision of the plugin.
Definition: BlamPlugin.cpp:570
BlamTag::plugin
BlamPlugin * plugin
Pointer to the plugin associated with this tag.
Definition: tags.h:230
BlamTagField_Tagref
Definition: tagref.h:22
BlamBitfieldBitInfo::id
std::string id
The ID of the bit.
Definition: bitfield.h:20
BlamPluginField::display_name
std::string display_name
The display name of the field.
Definition: fields.h:69
BlamTagField_Bitfield
Clas representing a bitfield tag field.
Definition: bitfield.h:57
BlamTagField_Block
Class representing a block tag field.
Definition: block.h:77
BlamPluginField
Class representing a plugin field.
Definition: fields.h:59
BlamPluginField_Comment
Class representing a comment plugin field.
Definition: comment.h:52
BlamTagField_Dataref
Definition: dataref.h:11
BlamTag
Class representing a Tag.
Definition: tags.h:210
BlamEnumFieldOption::id
std::string id
The ID of the option.
Definition: enum.h:19
BlamPlugin::SavePlugin
bool SavePlugin(bool recalculate_field_data=true)
Saves the plugin file back to disk.
Definition: BlamPlugin.cpp:679
BlamTag::GetField
BlamTagField * GetField(std::string field_id)
Locates a tag field with a specific ID.
Definition: BlamTag.cpp:672
BlamBitfieldBitData::value
bool value
The bit's value.
Definition: bitfield.h:31
Guerilla::Tags::GetPluginMatchOrNewer
GUERILLA_LIB_API BlamPlugin * GetPluginMatchOrNewer(std::string class_name, int min_version)
Retrieves a plugin based on its name and version.
Definition: plugins.cpp:171
BlamTagField_Block::GenerateXMLString
std::string GenerateXMLString()
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField_Block.cpp:128
BlamTagFieldType::Int64
@ Int64
Indicates that the field is a 32-bit integer.
BlamTagField_Enum::current_option
std::string current_option
The ID of the currently selected option.
Definition: enum.h:56
BlamTagFieldType::Tagref
@ Tagref
Indicates that the field is a tag reference.
BlamPluginField::visible
bool visible
Whether or not the field is visible.
Definition: fields.h:68
BlamTagField::HasPluginField
bool HasPluginField()
Checks whether the field has plugin data available.
Definition: BlamTagField.cpp:34
BlamTagField_Dataref::data_size
int data_size
Definition: dataref.h:15
BlamTagBlockEntry::fields
std::vector< BlamTagField * > fields
The list of fields within the entry.
Definition: block.h:21
BlamTagFieldType::Vector3
@ Vector3
Indicates that the field is a vector3.
BlamTagField_Enum
Class representing a tag enum field.
Definition: enum.h:53
BlamBitfieldBitInfo::name
std::string name
The display name of the bit.
Definition: bitfield.h:21
BlamRevision::version
int version
The revision version.
Definition: tags.h:68
BlamTagField_Float32::value
float value
The value of the field.
Definition: float32.h:21
BlamTag::SaveToDisk
void SaveToDisk(std::string _file_path)
Saves any modifications to the XML tag back to disk.
Definition: BlamTag.cpp:519
Guerilla::Tags::Fields::DetermineFieldType
GUERILLA_LIB_API BlamTagFieldType DetermineFieldType(std::string node_name)
Determines the field type from a string, used to determine the field type when parsing XML tags and p...
Definition: fields.cpp:98
BlamPluginField::field_id
std::string field_id
The ID of the field.
Definition: fields.h:71
BlamTagField_Int
Class representing an integer tag field.
Definition: int.h:16
BlamPlugin::base_size
int base_size
The base size of the tag.
Definition: tags.h:108
BlamEnumFieldOption::name
std::string name
The display name of the option.
Definition: enum.h:20
BlamTagField_Vector
Class representing a vector tag field.
Definition: vector.h:18
BlamTag::BlamTag
BlamTag(std::string _file_path, BlamTagUpgradePolicy _upgrade_policy)
Prepares a new tag to be loaded.
Definition: BlamTag.cpp:412
BlamPluginField_Bitfield
Clas representing a bitfield plugin field.
Definition: bitfield.h:39
BlamTagFieldType::Bitfield8
@ Bitfield8
Indicates that the field is a Bitfield8.
BlamPluginField_Block::fields
std::vector< BlamPluginField * > fields
The list of fields within the tag block.
Definition: block.h:45
BlamTag::LocatePlugin
bool LocatePlugin()
Attempts to locate a compatiable plugin for a given tag.
Definition: BlamTag.cpp:640
BlamPlugin::BlamPlugin
BlamPlugin(std::string _file_path)
Prepares a new plugin for load.
Definition: BlamPlugin.cpp:445
BlamTagField_Dataref::data_address
void * data_address
Definition: dataref.h:14
BlamTagUpgradePolicy::IGNORE_VERSION
@ IGNORE_VERSION
Instructs the tag to allow the use of any plugin, either newer or older.
float32.h
Guerilla::Tags::Fields::GetStandardFieldLength
GUERILLA_LIB_API int GetStandardFieldLength(BlamTagFieldType type)
Retrieves the length of a tag field.
Definition: fields.cpp:7
BlamTagUpgradePolicy::UPGRADE_IF_NEWER
@ UPGRADE_IF_NEWER
Instructs the tag to allow the use of equal or newer plugin versions.
vector.h
BlamPlugin::LoadFromDisk
BlamResult LoadFromDisk()
Loads the plugin XML document from disk.
Definition: BlamPlugin.cpp:455
BlamPlugin::class_name_long
std::string class_name_long
The long class name. Ex: scenario. Can be any length.
Definition: tags.h:105
BlamTag::file_path
std::string file_path
The path to the tag file.
Definition: tags.h:235
projects.h
BlamPluginField_Tagref::allowed_classes
std::vector< std::string > allowed_classes
Definition: tagref.h:17
BlamPluginField::description
std::string description
An optional description of the field.
Definition: fields.h:70
BlamTag::class_name
std::string class_name
The class name as specified in the tag file. Used in the event a plugin could not be found.
Definition: tags.h:246
BlamEnumFieldOption
Data structure representing an enum option.
Definition: enum.h:17
BlamTagFieldType::Unspecified
@ Unspecified
Indicates that the field's type is not specified. Fields with this type should be considered invalid.
BlamPluginField_Bitfield::bits
std::vector< BlamBitfieldBitInfo > bits
The list of bits within this bitfield.
Definition: bitfield.h:42
config.h
color.h
TAG_FIELDSET_VERSION
#define TAG_FIELDSET_VERSION
BlamPlugin::CreateNewTag
BlamTag * CreateNewTag()
Creates a new tag using the plugin.
Definition: BlamPlugin.cpp:585
BlamPlugin::GetField
BlamPluginField * GetField(std::string id)
Attempts to locate a field with a given ID.
Definition: BlamPlugin.cpp:624
BlamTagFieldType::Bitfield32
@ Bitfield32
Indicates that the field is a Bitfield32.
BlamPluginField::offset
int offset
The offset of the field data.
Definition: fields.h:66
BlamTagBlockEntry::name
std::string name
The name of the entry.
Definition: block.h:20
BlamTagFieldType::Vector2
@ Vector2
Indicates that the field is a vector2.
BlamBitfieldBitData
Data structure containing data for a bitfield bit.
Definition: bitfield.h:28
ascii.h
GUERILLA_LIB_API
#define GUERILLA_LIB_API
Definition: ascii.h:10
BlamTagField_Int::value
int64_t value
The value of the field, represented as a 32-bit integer.
Definition: int.h:21
BlamPluginField::length
int length
The length of the field data.
Definition: fields.h:67
BlamTagUpgradePolicy::EXACT_VERSION
@ EXACT_VERSION
Instructs the tag to require an exactly matching plugin version.
BlamTag::class_version
int class_version
The class/plugin version of the tag.
Definition: tags.h:245
int.h
BlamTagField::GetValueAsBytes
virtual std::vector< char > GetValueAsBytes()
Retrieves the field value as a list of bytes.
Definition: BlamTagField.cpp:14
BlamTagFieldType::Enum32
@ Enum32
Indicates that the field is an Enum32.
BlamTagField_Tagref::referenced_tag_path
std::string referenced_tag_path
Definition: tagref.h:28
BlamTagField_Ascii::value
std::string value
The value of the field.
Definition: ascii.h:23
BlamTag::~BlamTag
~BlamTag()
Releases any data used by the tag by calling ReleaseFieldData.
Definition: BlamTag.cpp:420
BlamBitfieldBitInfo
Data structure containing extra data for a bitfield bit.
Definition: bitfield.h:18
enum.h
BlamTagField_Color
Class representing a color tag field.
Definition: color.h:17
BlamTagField_Ascii
Class representing an ascii tag field.
Definition: ascii.h:18