Macros for frequently used patterns. More...
#include <experimental/propagate_const>
#include <memory>
Go to the source code of this file.
Macros | |
#define | NAWA_PRIVATE_DATA() |
#define | NAWA_DEFAULT_DESTRUCTOR_DEF(Class) virtual ~Class() |
#define | NAWA_DEFAULT_DESTRUCTOR_OVERRIDE_DEF(Class) ~Class() override |
#define | NAWA_DEFAULT_DESTRUCTOR_IMPL(Class) Class::~Class() = default; |
#define | NAWA_DEFAULT_DESTRUCTOR_IMPL_WITH_NS(Namespace, Class) Namespace::Class::~Class() = default; |
#define | NAWA_DEFAULT_CONSTRUCTOR_DEF(Class) Class() |
#define | NAWA_DEFAULT_CONSTRUCTOR_IMPL(Class) Class::Class() { data = make_unique<Data>(); } |
#define | NAWA_DEFAULT_CONSTRUCTOR_IMPL_WITH_NS(Namespace, Class) Namespace::Class::Class() { data = make_unique<Data>(); } |
#define | NAWA_COPY_CONSTRUCTOR_DEF(Class) Class(Class const& other) |
#define | NAWA_COPY_CONSTRUCTOR_IMPL(Class) Class::Class(const Class& other) { data = make_unique<Data>(*other.data); } |
#define | NAWA_COPY_CONSTRUCTOR_IMPL_WITH_NS(Namespace, Class) Namespace::Class::Class(const Namespace::Class& other) { data = make_unique<Data>(*other.data); } |
#define | NAWA_COPY_CONSTRUCTOR_DERIVED_IMPL(Class, Parent) Class::Class(const Class& other) : Parent(other) { data = make_unique<Data>(*other.data); } |
#define | NAWA_COPY_CONSTRUCTOR_DERIVED_IMPL_WITH_NS(Namespace, Class, Parent) Namespace::Class::Class(const Namespace::Class& other) : Parent(other) { data = make_unique<Data>(*other.data); } |
#define | NAWA_COPY_ASSIGNMENT_OPERATOR_DEF(Class) Class& operator=(const Class& other) |
#define | NAWA_COPY_ASSIGNMENT_OPERATOR_IMPL(Class) |
#define | NAWA_COPY_ASSIGNMENT_OPERATOR_IMPL_WITH_NS(Namespace, Class) |
#define | NAWA_COPY_ASSIGNMENT_OPERATOR_DERIVED_IMPL(Class, Parent) |
#define | NAWA_COPY_ASSIGNMENT_OPERATOR_DERIVED_IMPL_WITH_NS(Namespace, Class, Parent) |
#define | NAWA_MOVE_CONSTRUCTOR_DEF(Class) Class(Class&& other) noexcept |
#define | NAWA_MOVE_CONSTRUCTOR_IMPL(Class) Class::Class(Class&& other) noexcept : data(std::move(other.data)) {} |
#define | NAWA_MOVE_CONSTRUCTOR_IMPL_WITH_NS(Namespace, Class) Namespace::Class::Class(Namespace::Class&& other) noexcept : data(std::move(other.data)) {} |
#define | NAWA_MOVE_CONSTRUCTOR_DERIVED_IMPL(Class, Parent) Class::Class(Class&& other) noexcept : Parent(std::move(other)), data(std::move(other.data)) {} |
#define | NAWA_MOVE_CONSTRUCTOR_DERIVED_IMPL_WITH_NS(Namespace, Class, Parent) Namespace::Class::Class(Namespace::Class&& other) noexcept : Parent(std::move(other)), data(std::move(other.data)) {} |
#define | NAWA_MOVE_ASSIGNMENT_OPERATOR_DEF(Class) Class& operator=(Class&& other) noexcept |
#define | NAWA_MOVE_ASSIGNMENT_OPERATOR_IMPL(Class) |
#define | NAWA_MOVE_ASSIGNMENT_OPERATOR_IMPL_WITH_NS(Namespace, Class) |
#define | NAWA_MOVE_ASSIGNMENT_OPERATOR_DERIVED_IMPL(Class, Parent) |
#define | NAWA_MOVE_ASSIGNMENT_OPERATOR_DERIVED_IMPL_WITH_NS(Namespace, Class, Parent) |
#define | NAWA_PRIMITIVE_DATA_ACCESSORS_DEF(Class, Member, Type) |
#define | NAWA_COMPLEX_DATA_ACCESSORS_DEF(Class, Member, Type) |
#define | NAWA_PRIMITIVE_DATA_ACCESSORS_IMPL(Class, Member, Type) |
#define | NAWA_COMPLEX_DATA_ACCESSORS_IMPL(Class, Member, Type) |
Macros for frequently used patterns.
Definition in file macros.h.
#define NAWA_PRIVATE_DATA | ( | ) |
#define NAWA_DEFAULT_DESTRUCTOR_DEF | ( | Class | ) | virtual ~Class() |
#define NAWA_DEFAULT_DESTRUCTOR_OVERRIDE_DEF | ( | Class | ) | ~Class() override |
#define NAWA_DEFAULT_DESTRUCTOR_IMPL | ( | Class | ) | Class::~Class() = default; |
#define NAWA_DEFAULT_DESTRUCTOR_IMPL_WITH_NS | ( | Namespace, | |
Class | |||
) | Namespace::Class::~Class() = default; |
#define NAWA_DEFAULT_CONSTRUCTOR_IMPL | ( | Class | ) | Class::Class() { data = make_unique<Data>(); } |
#define NAWA_DEFAULT_CONSTRUCTOR_IMPL_WITH_NS | ( | Namespace, | |
Class | |||
) | Namespace::Class::Class() { data = make_unique<Data>(); } |
#define NAWA_COPY_CONSTRUCTOR_DEF | ( | Class | ) | Class(Class const& other) |
#define NAWA_COPY_CONSTRUCTOR_IMPL | ( | Class | ) | Class::Class(const Class& other) { data = make_unique<Data>(*other.data); } |
#define NAWA_COPY_CONSTRUCTOR_IMPL_WITH_NS | ( | Namespace, | |
Class | |||
) | Namespace::Class::Class(const Namespace::Class& other) { data = make_unique<Data>(*other.data); } |
#define NAWA_COPY_CONSTRUCTOR_DERIVED_IMPL | ( | Class, | |
Parent | |||
) | Class::Class(const Class& other) : Parent(other) { data = make_unique<Data>(*other.data); } |
#define NAWA_COPY_CONSTRUCTOR_DERIVED_IMPL_WITH_NS | ( | Namespace, | |
Class, | |||
Parent | |||
) | Namespace::Class::Class(const Namespace::Class& other) : Parent(other) { data = make_unique<Data>(*other.data); } |
#define NAWA_COPY_ASSIGNMENT_OPERATOR_DEF | ( | Class | ) | Class& operator=(const Class& other) |
#define NAWA_COPY_ASSIGNMENT_OPERATOR_IMPL | ( | Class | ) |
#define NAWA_COPY_ASSIGNMENT_OPERATOR_IMPL_WITH_NS | ( | Namespace, | |
Class | |||
) |
#define NAWA_COPY_ASSIGNMENT_OPERATOR_DERIVED_IMPL | ( | Class, | |
Parent | |||
) |
#define NAWA_COPY_ASSIGNMENT_OPERATOR_DERIVED_IMPL_WITH_NS | ( | Namespace, | |
Class, | |||
Parent | |||
) |
#define NAWA_MOVE_CONSTRUCTOR_DEF | ( | Class | ) | Class(Class&& other) noexcept |
#define NAWA_MOVE_CONSTRUCTOR_IMPL | ( | Class | ) | Class::Class(Class&& other) noexcept : data(std::move(other.data)) {} |
#define NAWA_MOVE_CONSTRUCTOR_IMPL_WITH_NS | ( | Namespace, | |
Class | |||
) | Namespace::Class::Class(Namespace::Class&& other) noexcept : data(std::move(other.data)) {} |
#define NAWA_MOVE_CONSTRUCTOR_DERIVED_IMPL | ( | Class, | |
Parent | |||
) | Class::Class(Class&& other) noexcept : Parent(std::move(other)), data(std::move(other.data)) {} |
#define NAWA_MOVE_CONSTRUCTOR_DERIVED_IMPL_WITH_NS | ( | Namespace, | |
Class, | |||
Parent | |||
) | Namespace::Class::Class(Namespace::Class&& other) noexcept : Parent(std::move(other)), data(std::move(other.data)) {} |
#define NAWA_MOVE_ASSIGNMENT_OPERATOR_DEF | ( | Class | ) | Class& operator=(Class&& other) noexcept |
#define NAWA_MOVE_ASSIGNMENT_OPERATOR_IMPL | ( | Class | ) |
#define NAWA_MOVE_ASSIGNMENT_OPERATOR_IMPL_WITH_NS | ( | Namespace, | |
Class | |||
) |
#define NAWA_MOVE_ASSIGNMENT_OPERATOR_DERIVED_IMPL | ( | Class, | |
Parent | |||
) |
#define NAWA_MOVE_ASSIGNMENT_OPERATOR_DERIVED_IMPL_WITH_NS | ( | Namespace, | |
Class, | |||
Parent | |||
) |
#define NAWA_PRIMITIVE_DATA_ACCESSORS_DEF | ( | Class, | |
Member, | |||
Type | |||
) |
#define NAWA_COMPLEX_DATA_ACCESSORS_DEF | ( | Class, | |
Member, | |||
Type | |||
) |
#define NAWA_PRIMITIVE_DATA_ACCESSORS_IMPL | ( | Class, | |
Member, | |||
Type | |||
) |
#define NAWA_COMPLEX_DATA_ACCESSORS_IMPL | ( | Class, | |
Member, | |||
Type | |||
) |