Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00386.06.16.23.0646.blamite
The tag editor for the Blamite Game Engine.
BlamTagField Class Reference

Class representing a tag field. More...

#include <fields.h>

+ Inheritance diagram for BlamTagField:
+ Collaboration diagram for BlamTagField:

Public Member Functions

 BlamTagField (BlamTag *_tag, BlamTagFieldType _type)
 Constructs a new tag field. More...
 
virtual std::string GenerateXMLString ()
 Generates a string with the field ID and value, ready to be written to an XML file. More...
 
virtual std::vector< char > GetValueAsBytes ()
 Retrieves the field value as a list of bytes. More...
 
BlamTagFieldType GetType ()
 Retrieves the type of this field. More...
 
BlamTagGetTag ()
 Retrieves the tag associated with this field. More...
 
BlamPluginFieldGetPluginField ()
 Retrieves the plugin data associated with this field, if available. More...
 
bool HasPluginField ()
 Checks whether the field has plugin data available. More...
 

Public Attributes

int c_entry_index = 0
 Temporary field storing the entry index of this field's parent block. Used only during compilation. More...
 
int c_entry_size = 0
 Temporary field storing the entry size of this field's parent block. Used only during compilation. More...
 
BlamPluginFieldplugin_field = nullptr
 The plugin data associated with this field, if any. More...
 
std::string field_id = ""
 The ID of this field. More...
 

Detailed Description

Class representing a tag field.

Tag fields only store a field ID and value. This class is intended to be used as an interface, in that storing the field value is entirely up to the child class which inherits this class.

Constructor & Destructor Documentation

◆ BlamTagField()

BlamTagField::BlamTagField ( BlamTag _tag,
BlamTagFieldType  _type 
)

Constructs a new tag field.

Parameters
_tag- The tag to associate with this field.
_type- The type of the field.

Member Function Documentation

◆ GenerateXMLString()

std::string BlamTagField::GenerateXMLString ( )
virtual

Generates a string with the field ID and value, ready to be written to an XML file.

Returns
An XML string containing the field ID and value.

Reimplemented in BlamTagField_Block, BlamTagField_Dataref, BlamTagField_Bitfield, BlamTagField_Comment, BlamTagField_Enum, BlamTagField_Tagref, BlamTagField_Vector, BlamTagField_Ascii, BlamTagField_Color, BlamTagField_Int, and BlamTagField_Float32.

+ Here is the caller graph for this function:

◆ GetPluginField()

BlamPluginField * BlamTagField::GetPluginField ( )

Retrieves the plugin data associated with this field, if available.

Returns
Pointer to the plugin data for the field if available. If no plugin data is available, nullptr is returned.
+ Here is the caller graph for this function:

◆ GetTag()

BlamTag * BlamTagField::GetTag ( )

Retrieves the tag associated with this field.

Returns
Pointer to the tag associated with this field.
+ Here is the caller graph for this function:

◆ GetType()

BlamTagFieldType BlamTagField::GetType ( )

Retrieves the type of this field.

Returns
The type of this field.
+ Here is the caller graph for this function:

◆ GetValueAsBytes()

std::vector< char > BlamTagField::GetValueAsBytes ( )
virtual

Retrieves the field value as a list of bytes.

Returns
The field value as a list of bytes.

Reimplemented in BlamTagField_Block, BlamTagField_Dataref, BlamTagField_Bitfield, BlamTagField_Comment, BlamTagField_Enum, BlamTagField_Tagref, BlamTagField_Vector, BlamTagField_Ascii, BlamTagField_Color, BlamTagField_Int, and BlamTagField_Float32.

+ Here is the caller graph for this function:

◆ HasPluginField()

bool BlamTagField::HasPluginField ( )

Checks whether the field has plugin data available.

Returns
true if the field has plugin data available, otherwise returns false.
+ Here is the caller graph for this function:

Member Data Documentation

◆ c_entry_index

int BlamTagField::c_entry_index = 0

Temporary field storing the entry index of this field's parent block. Used only during compilation.

◆ c_entry_size

int BlamTagField::c_entry_size = 0

Temporary field storing the entry size of this field's parent block. Used only during compilation.

◆ field_id

std::string BlamTagField::field_id = ""

The ID of this field.

◆ plugin_field

BlamPluginField* BlamTagField::plugin_field = nullptr

The plugin data associated with this field, if any.


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