OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
OTClassHelper.h File Reference

This file contains defines that may be used simplyfy class creation. More...

Go to the source code of this file.

Macros

#define OT_DECL_NOCOPY(___class)   ___class(const ___class&) = delete; ___class& operator = (const ___class&) = delete;
 Removes the default copy constructor and assignment operator.
 
#define OT_DECL_NOMOVE(___class)   ___class(___class&&) = delete; ___class& operator = (___class&&) = delete;
 Removes the default move constructor and move operator.
 
#define OT_DECL_NODEFAULT(___class)   ___class(void) = delete;
 Removes the default copy constructor and assignment operator.
 
#define OT_DECL_STATICONLY(___class)   OT_DECL_NODEFAULT(___class) OT_DECL_NOCOPY(___class) OT_DECL_NOMOVE(___class)
 OT_DECL_NODEFAULT OT_DECL_NOCOPY OT_DECL_NOMOVE
 
#define OT_UNUSED(___unusedVariable)   (void)(___unusedVariable);
 Avoid "warning C4101: unreferenced local variable".
 

Detailed Description

This file contains defines that may be used simplyfy class creation.

Author
Alexander Kuester (alexk95)
Date
November 2023

Macro Definition Documentation

◆ OT_DECL_NOCOPY

#define OT_DECL_NOCOPY ( ___class)    ___class(const ___class&) = delete; ___class& operator = (const ___class&) = delete;

Removes the default copy constructor and assignment operator.

◆ OT_DECL_NODEFAULT

#define OT_DECL_NODEFAULT ( ___class)    ___class(void) = delete;

Removes the default copy constructor and assignment operator.

◆ OT_DECL_NOMOVE

#define OT_DECL_NOMOVE ( ___class)    ___class(___class&&) = delete; ___class& operator = (___class&&) = delete;

Removes the default move constructor and move operator.

◆ OT_DECL_STATICONLY

#define OT_DECL_STATICONLY ( ___class)    OT_DECL_NODEFAULT(___class) OT_DECL_NOCOPY(___class) OT_DECL_NOMOVE(___class)

◆ OT_UNUSED

#define OT_UNUSED ( ___unusedVariable)    (void)(___unusedVariable);

Avoid "warning C4101: unreferenced local variable".