MAGE  v0.171.0
Matthias Advanced Game Engine
mage::loader Namespace Reference

Namespaces

 anonymous_namespace{var_writer.cpp}
 

Classes

class  VARReader
 
class  VARWriter
 

Functions

void ImportVARFromFile (const std::filesystem::path &path, ValueMap &variable_buffer)
 
void ExportVARToFile (const std::filesystem::path &path, const ValueMap &variable_buffer)
 
void ImportVariableScriptFromFile (const std::filesystem::path &path, ValueMap &variable_buffer)
 
void ExportVariableScriptToFile (const std::filesystem::path &path, const ValueMap &variable_buffer)
 

Variables

constexpr const char g_var_token_comment = '#'
 
template<typename T >
const_zstring g_var_token
 
template<>
constexpr const_zstring g_var_token< bool > = "bool"
 
template<>
constexpr const_zstring g_var_token< F32 > = "F32"
 
template<>
constexpr const_zstring g_var_token< F32x2 > = "F32x2"
 
template<>
constexpr const_zstring g_var_token< F32x3 > = "F32x3"
 
template<>
constexpr const_zstring g_var_token< F32x4 > = "F32x4"
 
template<>
constexpr const_zstring g_var_token< S32 > = "S32"
 
template<>
constexpr const_zstring g_var_token< S32x2 > = "S32x2"
 
template<>
constexpr const_zstring g_var_token< S32x3 > = "S32x3"
 
template<>
constexpr const_zstring g_var_token< S32x4 > = "S32x4"
 
template<>
constexpr const_zstring g_var_token< U32 > = "U32"
 
template<>
constexpr const_zstring g_var_token< U32x2 > = "U32x2"
 
template<>
constexpr const_zstring g_var_token< U32x3 > = "U32x3"
 
template<>
constexpr const_zstring g_var_token< U32x4 > = "U32x4"
 

Function Documentation

◆ ExportVariableScriptToFile()

void mage::loader::ExportVariableScriptToFile ( const std::filesystem::path &  path,
const ValueMap variable_buffer 
)

Exports the given variables to the file associated with the given path.

Parameters
[in]pathA reference to the path.
[in]variable_bufferA reference to a map containing the variables.
Exceptions
ExceptionFailed to export the variable script to file.

◆ ExportVARToFile()

void mage::loader::ExportVARToFile ( const std::filesystem::path &  path,
const ValueMap variable_buffer 
)

Exports the given variables to the VAR file associated with the given path.

Parameters
[in]pathA reference to the path.
[in]variable_bufferA reference to a map containing the variables.
Exceptions
ExceptionFailed to export the variable script to file.

◆ ImportVARFromFile()

void mage::loader::ImportVARFromFile ( const std::filesystem::path &  path,
ValueMap variable_buffer 
)

Imports the variables from the VAR file associated with the given path.

Parameters
[in]pathA reference to the path.
[out]variable_bufferA reference to a map containing the variables.
Exceptions
ExceptionFailed to import the variable script from file.

◆ ImportVariableScriptFromFile()

void mage::loader::ImportVariableScriptFromFile ( const std::filesystem::path &  path,
ValueMap variable_buffer 
)

Imports the variables from the file associated with the given path.

Parameters
[in]pathA reference to the path.
[in,out]variable_bufferA reference to a map containing the variables.
Exceptions
ExceptionFailed to import the variable script from file.

Variable Documentation

◆ g_var_token

template<typename T >
const_zstring mage::loader::g_var_token

◆ g_var_token< bool >

template<>
constexpr const_zstring mage::loader::g_var_token< bool > = "bool"

◆ g_var_token< F32 >

template<>
constexpr const_zstring mage::loader::g_var_token< F32 > = "F32"

◆ g_var_token< F32x2 >

template<>
constexpr const_zstring mage::loader::g_var_token< F32x2 > = "F32x2"

◆ g_var_token< F32x3 >

template<>
constexpr const_zstring mage::loader::g_var_token< F32x3 > = "F32x3"

◆ g_var_token< F32x4 >

template<>
constexpr const_zstring mage::loader::g_var_token< F32x4 > = "F32x4"

◆ g_var_token< S32 >

template<>
constexpr const_zstring mage::loader::g_var_token< S32 > = "S32"

◆ g_var_token< S32x2 >

template<>
constexpr const_zstring mage::loader::g_var_token< S32x2 > = "S32x2"

◆ g_var_token< S32x3 >

template<>
constexpr const_zstring mage::loader::g_var_token< S32x3 > = "S32x3"

◆ g_var_token< S32x4 >

template<>
constexpr const_zstring mage::loader::g_var_token< S32x4 > = "S32x4"

◆ g_var_token< U32 >

template<>
constexpr const_zstring mage::loader::g_var_token< U32 > = "U32"

◆ g_var_token< U32x2 >

template<>
constexpr const_zstring mage::loader::g_var_token< U32x2 > = "U32x2"

◆ g_var_token< U32x3 >

template<>
constexpr const_zstring mage::loader::g_var_token< U32x3 > = "U32x3"

◆ g_var_token< U32x4 >

template<>
constexpr const_zstring mage::loader::g_var_token< U32x4 > = "U32x4"

◆ g_var_token_comment

constexpr const char mage::loader::g_var_token_comment = '#'