framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
common_macros.hpp File Reference

Common macros. More...

#include <framework/common/pack_container.hpp>
#include <framework/common/type_string.hpp>
#include <framework/common/preprocessor/string_expansion.hpp>

Go to the source code of this file.

Macros

#define FRAMEWORK_SERIALIZABLE_NAME_LENGTH   100
 
#define FRAMEWORK_SERIALIZABLE_NAME(s)   ::framework::make_type_string <EXPAND_STRING_N(s, FRAMEWORK_SERIALIZABLE_NAME_LENGTH)>
 
#define NAME(s)   FRAMEWORK_SERIALIZABLE_NAME(s)
 
#define DEFINE_BASE_TEMPLATE(derived)
 

Detailed Description

Common macros.

Macro Definition Documentation

#define DEFINE_BASE_TEMPLATE (   derived)
Value:
template <typename T> \

Provides a common get_base alias. The following are equivalent:

using field_1 = typename get_base <derived, NAME("Field 1")>::type;
using field_1 = base <NAME("Field 1")>;
#define FRAMEWORK_SERIALIZABLE_NAME (   s)    ::framework::make_type_string <EXPAND_STRING_N(s, FRAMEWORK_SERIALIZABLE_NAME_LENGTH)>

Generates a unique typename from a string literal.

#define FRAMEWORK_SERIALIZABLE_NAME_LENGTH   100

Maximum name length specifier. Note that names exceeding this limit will generate a compile time error.

#define NAME (   s)    FRAMEWORK_SERIALIZABLE_NAME(s)

FRAMEWORK_SERIALIZABLE_NAME alias