GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gd::InstructionSentenceFormatter Class Reference

Generate user friendly sentences and information from an action or condition metadata. More...

#include <InstructionSentenceFormatter.h>

Public Member Functions

gd::String Translate (const gd::Instruction &instr, const gd::InstructionMetadata &metadata)
 Create a sentence from an instruction and its metadata. More...
 
std::vector< std::pair
< gd::String,
gd::TextFormatting > > 
GetAsFormattedText (const gd::Instruction &instr, const gd::InstructionMetadata &metadata)
 Create a formatted sentence from an instruction and its metadata.
 
TextFormatting GetFormattingFromType (const gd::String &type)
 Return the TextFormatting object associated to the type.
 
gd::String LabelFromType (const gd::String &type)
 Return the label of a parameter type.
 
void LoadTypesFormattingFromConfig ()
 Load the configuration from the default configuration.
 

Static Public Member Functions

static
InstructionSentenceFormatter
Get ()
 
static void DestroySingleton ()
 

Public Attributes

std::map< gd::String,
gd::TextFormatting
typesFormatting
 

Detailed Description

Generate user friendly sentences and information from an action or condition metadata.

Member Function Documentation

gd::String gd::InstructionSentenceFormatter::Translate ( const gd::Instruction instr,
const gd::InstructionMetadata metadata 
)

Create a sentence from an instruction and its metadata.

Sentence is provided in the gd::InstructionMetadata passed as parameter. Parameters placeholders ("_PARAMx_", x being the parameter index) are replaced by their values stored in the isntruction passed as parameter.


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