Sleeping Wombat GUI  0.100
swGUI
Macros
ConfigHelper.h File Reference

Go to the source code of this file.

Macros

#define DEFINE_CONFIG_VALUE_DEFAULT(type, name, defaultValue)
 Helpers for writing configuration files. More...
 
#define DEFINE_CONFIG_VALUE(type, name)
 

Detailed Description

Author
nieznanysprawiciel

Macro Definition Documentation

#define DEFINE_CONFIG_VALUE (   type,
  name 
)
Value:
private: \
type m_##name; \
public: \
type name () const { return m_##name ; }
#define DEFINE_CONFIG_VALUE_DEFAULT (   type,
  name,
  defaultValue 
)
Value:
private: \
type m_##name = defaultValue; \
public: \
type name () const { return m_##name ; }

Helpers for writing configuration files.

These macros should be placed in class definition. They create field named "m_name" and expose getter function name. You can specify default value.

Todo:
Write base class for configs and make automatic serialization and deserialization.