Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00402.09.29.23.0627.blamite
The tag editor for the Blamite Game Engine.
comment.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 
16 enum class BlamCommentType
17 {
18  None,
19  Info,
20  Warning,
21  Error
22 };
23 
31 {
32 private:
33 
34 public:
36 
43 
49  void ParseCommentType(std::string comment_type_string);
50 
51  std::string GenerateXMLString() override;
52  std::string GenerateCppStructString(std::string line_prefix = "", bool generate_doxygen_comments = true) override;
53  std::string GenerateCppStructString(std::string line_prefix = "", bool generate_doxygen_comments = true, bool include_description = false);
54  std::string GenerateCppClassString(std::string line_prefix = "") override;
55  bool ParseXMLData(rapidxml::xml_node<>* field_node) override;
56  BlamTagField* GenerateTagField(BlamTag* tag) override;
57 };
58 
66 {
67 private:
68 
69 public:
76 
77  std::string GenerateXMLString();
78  std::vector<char> GetValueAsBytes();
79 };
BlamTagField
Class representing a tag field.
Definition: fields.h:231
comment.h
BlamPluginField_Comment::BlamPluginField_Comment
BlamPluginField_Comment(BlamPluginField *base_field)
Constructs a new comment plugin field.
Definition: BlamPluginField_Comment.cpp:8
BlamPluginField::GenerateTagField
virtual BlamTagField * GenerateTagField(BlamTag *tag)
Generates a new tag field from this plugin field.
Definition: BlamPluginField.cpp:41
BlamPluginField::GenerateXMLString
virtual std::string GenerateXMLString()
Generates a string representing this plugin field.
Definition: BlamPluginField.cpp:61
BlamPluginField_Comment::GenerateXMLString
std::string GenerateXMLString() override
Generates a string representing this plugin field.
Definition: BlamPluginField_Comment.cpp:39
BlamPluginField_Comment::GenerateCppClassString
std::string GenerateCppClassString(std::string line_prefix="") override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Comment.cpp:74
GUERILLA_LIB_API
#define GUERILLA_LIB_API
Definition: comment.h:10
BlamPluginField_Comment::comment_type
BlamCommentType comment_type
The type of the comment.
Definition: comment.h:35
BlamTagField::field_id
std::string field_id
The ID of this field.
Definition: fields.h:243
BlamCommentType::Info
@ Info
Indicates that the comment should be presented as an informative message.
BlamPluginField::GetType
BlamTagFieldType GetType()
Retrieves the type of this field.
Definition: BlamPluginField.cpp:31
BlamPluginField_Comment::ParseXMLData
bool ParseXMLData(rapidxml::xml_node<> *field_node) override
Populates data within the plugin field from an XML node.
Definition: BlamPluginField_Comment.cpp:90
BlamCommentType::Warning
@ Warning
Indicates that the comment should be presented as a warning message.
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:13
BlamCommentType
BlamCommentType
Enumerator used to identify the type of comment being displayed.
Definition: comment.h:16
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:235
BlamTagField_Comment::GetValueAsBytes
std::vector< char > GetValueAsBytes()
Retrieves the field value as a list of bytes.
Definition: BlamTagField_Comment.cpp:13
BlamPluginField::display_name
std::string display_name
The display name of the field.
Definition: fields.h:81
BlamPluginField
Class representing a plugin field.
Definition: fields.h:71
BlamPluginField_Comment
Class representing a comment plugin field.
Definition: comment.h:30
BlamTag
Class representing a Tag.
Definition: tags.h:277
BlamPluginField_Comment::GenerateTagField
BlamTagField * GenerateTagField(BlamTag *tag) override
Generates a new tag field from this plugin field.
Definition: BlamPluginField_Comment.cpp:114
BlamPluginField::visible
bool visible
Whether or not the field is visible.
Definition: fields.h:80
BlamPluginField::ParseXMLData
virtual bool ParseXMLData(rapidxml::xml_node<> *field_node)
Populates data within the plugin field from an XML node.
Definition: BlamPluginField.cpp:106
BlamCommentType::Error
@ Error
Indicates that the comment should be presented as an error message.
BlamTagField_Comment::GenerateXMLString
std::string GenerateXMLString()
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField_Comment.cpp:8
BlamPluginField::field_id
std::string field_id
The ID of the field.
Definition: fields.h:83
BlamTagField_Comment
Class representing a comment tag field.
Definition: comment.h:65
BlamTagField::plugin_field
BlamPluginField * plugin_field
The plugin data associated with this field, if any.
Definition: fields.h:242
BlamPluginField::description
std::string description
An optional description of the field.
Definition: fields.h:82
BlamTagField_Comment::BlamTagField_Comment
BlamTagField_Comment(BlamTag *_tag)
Constructs a new comment field.
Definition: BlamTagField_Comment.cpp:3
BlamPluginField::GetPlugin
BlamPlugin * GetPlugin()
Retrieves the plugin this field is associated with.
Definition: BlamPluginField.cpp:36
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
BlamCommentType::None
@ None
Default value. The comment will be given the standard appearance.
BlamPluginField_Comment::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_Comment.cpp:51