Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
BlockField Class Reference

Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modding community. More...

#include <block.h>

+ Inheritance diagram for BlockField:
+ Collaboration diagram for BlockField:

Public Member Functions

 BlockField (int _entry_size, std::string _display_name, std::string _extra_info, std::vector< BlamTagClassField * > _block_template)
 
 BlockField (int _entry_size, std::string _display_name, std::string _extra_info, int _max_entries, std::vector< BlamTagClassField * > _block_template)
 
void SetMemoryLocation (void *new_address)
 Sets the address of the data that the plugin field should display. More...
 
std::string GetFieldXMLString (int offset)
 Generates a string representing an XML node associated with this tag field, used for generating plugin files. More...
 
void ShowImPropertyControl ()
 
- Public Member Functions inherited from BlamTagClassField
 BlamTagClassField (BlamTagFieldType _type, std::string _display_name, std::string _extra_info)
 
 BlamTagClassField (BlamTagFieldType _type, std::string _display_name, std::string _extra_info, std::string _valid_input_label)
 

Public Attributes

std::vector< BlamTagClassField * > block_template
 The list of block entries in this block. More...
 
int active_entry = 0
 The index of the active entry. More...
 
tag_block< void > * block_info
 Pointer to the current block info being represented. More...
 
int entry_size = 0
 The size of each block entry. More...
 
int max_entries = -1
 The maximum number of entries that this block can contain. More...
 
- Public Attributes inherited from BlamTagClassField
std::string display_name
 The display name of the tag field. More...
 
std::string extra_info
 Additional information to show alongside the field. More...
 
std::string input_hint
 A label specifying possible valid input. Not always shown. More...
 
bool visible = true
 Whether or not this field should be marked as visible within the editor. More...
 
void * read_address
 The address of the data the field is currently representing. More...
 
int read_length
 How many bytes to read from the start of the address. More...
 
BlamTagFieldType type
 The type of the field. More...
 

Detailed Description

Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modding community.

Tag blocks act much like a tag in that they store a set of child properties.

Todo:
document this

Constructor & Destructor Documentation

◆ BlockField() [1/2]

BlockField::BlockField ( int  _entry_size,
std::string  _display_name,
std::string  _extra_info,
std::vector< BlamTagClassField * >  _block_template 
)

◆ BlockField() [2/2]

BlockField::BlockField ( int  _entry_size,
std::string  _display_name,
std::string  _extra_info,
int  _max_entries,
std::vector< BlamTagClassField * >  _block_template 
)

Member Function Documentation

◆ GetFieldXMLString()

std::string BlockField::GetFieldXMLString ( int  offset)
virtual

Generates a string representing an XML node associated with this tag field, used for generating plugin files.

If this function is not overridden in the child class, the resulting string describes an unknown tag field.

Parameters
offset- The offset of this field relative to either the start of the tag data, or relative to the start of tag block entry data.
Returns
A string representation of the field, ready to be written to an XML file.

Reimplemented from BlamTagClassField.

◆ SetMemoryLocation()

void BlockField::SetMemoryLocation ( void *  new_address)
virtual

Sets the address of the data that the plugin field should display.

Parameters
new_address- The address of the field data.

Reimplemented from BlamTagClassField.

◆ ShowImPropertyControl()

void BlockField::ShowImPropertyControl ( )
virtual
Todo:
finish

Reimplemented from BlamTagClassField.

+ Here is the call graph for this function:

Member Data Documentation

◆ active_entry

int BlockField::active_entry = 0

The index of the active entry.

◆ block_info

tag_block<void>* BlockField::block_info

Pointer to the current block info being represented.

◆ block_template

std::vector<BlamTagClassField*> BlockField::block_template

The list of block entries in this block.

◆ entry_size

int BlockField::entry_size = 0

The size of each block entry.

◆ max_entries

int BlockField::max_entries = -1

The maximum number of entries that this block can contain.


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