Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00390.07.02.23.1947.blamite
The tag editor for the Blamite Game Engine.
tagref.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <string>
5 
6 #include "../fields.h"
7 
8 #ifdef GUERILLA_LIB_EXPORTS
9 #define GUERILLA_LIB_API __declspec(dllexport)
10 #else
11 #define GUERILLA_LIB_API __declspec(dllimport)
12 #endif
13 
21 {
22 public:
23  std::vector<std::string> allowed_classes;
24 
26 
27  std::string GenerateXMLString() override;
28  std::string GenerateCppStructString(std::string line_prefix = "", bool generate_doxygen_comments = true) override;
29  std::string GenerateCppClassString(std::string line_prefix = "") override;
30  bool ParseXMLData(rapidxml::xml_node<>* field_node) override;
31  BlamTagField* GenerateTagField(BlamTag* tag, void* address) override;
32  BlamTagField* GenerateTagField(BlamTag* tag) override;
33 };
34 
42 {
43 public:
44  int data_size = 0;
45  void* data_address = nullptr;
46 
47  std::string referenced_tag_path = "";
48  std::string referenced_tag_class = "";
49 
51 
52  std::string GenerateXMLString();
53  std::vector<char> GetValueAsBytes();
54 
55  std::vector<char> GetReferencedTagPathAsBytes();
56 };
BlamTagField
Class representing a tag field.
Definition: fields.h:261
BlamPluginField::GenerateTagField
virtual BlamTagField * GenerateTagField(BlamTag *tag)
Generates a new tag field from this plugin field.
Definition: BlamPluginField.cpp:41
BlamTagField_Tagref::data_size
int data_size
Definition: tagref.h:44
BlamPluginField_Tagref
Class representing an tagref plugin field.
Definition: tagref.h:20
BlamTagField_Tagref::GetValueAsBytes
std::vector< char > GetValueAsBytes()
Retrieves the field value as a list of bytes.
Definition: BlamTagField_Tagref.cpp:15
BlamPluginField_Tagref::GenerateCppStructString
std::string GenerateCppStructString(std::string line_prefix="", bool generate_doxygen_comments=true) override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Tagref.cpp:22
tags.h
BlamPluginField::GenerateXMLString
virtual std::string GenerateXMLString()
Generates a string representing this plugin field.
Definition: BlamPluginField.cpp:61
BlamPluginField_Tagref::BlamPluginField_Tagref
BlamPluginField_Tagref(BlamPluginField *base_field)
Definition: BlamPluginField_Tagref.cpp:6
BlamPluginField_Tagref::GenerateTagField
BlamTagField * GenerateTagField(BlamTag *tag, void *address) override
Generates a new tag field from this plugin field.
Definition: BlamPluginField_Tagref.cpp:78
BlamTagField::field_id
std::string field_id
The ID of this field.
Definition: fields.h:272
BlamPluginField::GetType
BlamTagFieldType GetType()
Retrieves the type of this field.
Definition: BlamPluginField.cpp:31
BlamTagFieldType
BlamTagFieldType
Enumerator containing all possible tag field types.
Definition: fields.h:65
BlamTagField_Tagref::referenced_tag_class
std::string referenced_tag_class
Definition: tagref.h:48
BlamTagField_Tagref::data_address
void * data_address
Definition: tagref.h:45
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
Guerilla::Tags::Fields::GetFieldTypeName
GUERILLA_LIB_API std::string GetFieldTypeName(BlamTagFieldType type)
Generates a string name based on the provided tag field type.
Definition: fields.cpp:222
tagref.h
BlamTagField_Tagref
Class representing an tagref tag field.
Definition: tagref.h:41
BlamPluginField::display_name
std::string display_name
The display name of the field.
Definition: fields.h:111
BlamPluginField
Class representing a plugin field.
Definition: fields.h:101
BlamTag
Class representing a Tag.
Definition: tags.h:277
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:110
BlamPluginField::ParseXMLData
virtual bool ParseXMLData(rapidxml::xml_node<> *field_node)
Populates data within the plugin field from an XML node.
Definition: BlamPluginField.cpp:106
BlamTagField_Tagref::GetReferencedTagPathAsBytes
std::vector< char > GetReferencedTagPathAsBytes()
Definition: BlamTagField_Tagref.cpp:35
BlamPluginField::field_id
std::string field_id
The ID of the field.
Definition: fields.h:113
BlamTagField_Tagref::GenerateXMLString
std::string GenerateXMLString()
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField_Tagref.cpp:10
BlamTagField::plugin_field
BlamPluginField * plugin_field
The plugin data associated with this field, if any.
Definition: fields.h:271
BlamPluginField_Tagref::allowed_classes
std::vector< std::string > allowed_classes
Definition: tagref.h:23
BlamPluginField::description
std::string description
An optional description of the field.
Definition: fields.h:112
GUERILLA_LIB_API
#define GUERILLA_LIB_API
Definition: tagref.h:11
BlamPluginField::offset
int offset
The offset of the field data.
Definition: fields.h:108
BlamPluginField_Tagref::GenerateCppClassString
std::string GenerateCppClassString(std::string line_prefix="") override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Tagref.cpp:34
BlamPluginField::GenerateCppClassString
virtual std::string GenerateCppClassString(std::string line_prefix="")
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField.cpp:101
BlamPluginField::GenerateCppStructString
virtual std::string GenerateCppStructString(std::string line_prefix="", bool generate_doxygen_comments=true)
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField.cpp:96
BlamTagField::GetValueAsBytes
virtual std::vector< char > GetValueAsBytes()
Retrieves the field value as a list of bytes.
Definition: BlamTagField.cpp:14
BlamTagField_Tagref::referenced_tag_path
std::string referenced_tag_path
Definition: tagref.h:47
BlamTagField_Tagref::BlamTagField_Tagref
BlamTagField_Tagref(BlamTag *_tag)
Definition: BlamTagField_Tagref.cpp:5
BlamPluginField_Tagref::GenerateXMLString
std::string GenerateXMLString() override
Generates a string representing this plugin field.
Definition: BlamPluginField_Tagref.cpp:11
BlamPluginField_Tagref::ParseXMLData
bool ParseXMLData(rapidxml::xml_node<> *field_node) override
Populates data within the plugin field from an XML node.
Definition: BlamPluginField_Tagref.cpp:48