mn_defines.hpp File Reference
#include "mn_config.hpp"

Go to the source code of this file.

Macros

#define MN_TEMPLATE_FULL_DECL()   template< >
 
#define MN_TEMPLATE_FULL_DECL_ONE(d1, t1)   template <d1 t1>
 
#define MN_TEMPLATE_FULL_DECL_TWO(d1, t1, d2, t2)   template <d1 t1, d2 t2>
 
#define MN_TEMPLATE_FULL_DECL_THREE(d1, t1, d2, t2, d3, t3)   template <d1 t1, d2 t2, d3 t3>
 
#define MN_TEMPLATE_DECL_ONE(t1)   MN_TEMPLATE_FULL_DECL_ONE(typename,t1)
 
#define MN_TEMPLATE_DECL_TWO(t1, t2)   MN_TEMPLATE_FULL_DECL_TWO(typename,t1,typename,t2)
 
#define MN_TEMPLATE_DECL_THREE(t1, t2, t3)   MN_TEMPLATE_FULL_DECL_THREE(typename,t1,typename,t2,typename,t3)
 
#define MN_TEMPLATE_TYPE_ONE(type, a1)   type<a1>
 
#define MN_TEMPLATE_TYPE_TWO(type, a1, a2)   type<a1,a2>
 
#define MN_TEMPLATE_TYPE_THREE(type, a1, a2, a3)   type<a1,a2,a3>
 
#define MN_TEMPLATE_USING_ONE(name, basic_name, d1, t1)   template <d1 t1> using name = basic_name<t1>;
 
#define MN_TEMPLATE_USING_TWO(name, basic_name, d1, t1, d2, t2)   template <d1 t1, d2 t2> using name = basic_name<t1, t2>;
 
#define MN_TEMPLATE_USING_THREE(name, basic_name, d1, t1, d2, t2, d3, t3)   template <d1 t1, d2 t2, d3 t3> using name = basic_name<t1, t2, t3>;
 
#define MN_TEMPLATE_USING(name, basic_name)   using name = basic_name;
 
#define MN_UNUSED_VARIABLE(var)   do { (void)(var); } while (false)
 
#define MN_ZERO_SET(var, size)   memset(var, 0, size)
 
#define MN_SAFE_DELETE(var)   if((var)) { delete var; var = NULL; }
 
#define MN_SAFE_FREE(var)   if((var)) { free(var); var = NULL; }
 
#define MN_EXTERNC_BEGINN
 
#define MN_EXTERNC_END
 
#define MN_DEPRECATED   __attribute__ ((deprecated))
 

Detailed Description

This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).

Author
Copyright (c) 2018 Amber-Sophia Schroeck
License
The Mini Thread Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3, or (at your option) any later version.

The Mini Thread Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Mini Thread Library; if not, see https://www.gnu.org/licenses/.

Macro Definition Documentation

◆ MN_DEPRECATED

#define MN_DEPRECATED   __attribute__ ((deprecated))

◆ MN_EXTERNC_BEGINN

#define MN_EXTERNC_BEGINN

◆ MN_EXTERNC_END

#define MN_EXTERNC_END

◆ MN_SAFE_DELETE

#define MN_SAFE_DELETE (   var)    if((var)) { delete var; var = NULL; }

◆ MN_SAFE_FREE

#define MN_SAFE_FREE (   var)    if((var)) { free(var); var = NULL; }

◆ MN_TEMPLATE_DECL_ONE

#define MN_TEMPLATE_DECL_ONE (   t1)    MN_TEMPLATE_FULL_DECL_ONE(typename,t1)

◆ MN_TEMPLATE_DECL_THREE

#define MN_TEMPLATE_DECL_THREE (   t1,
  t2,
  t3 
)    MN_TEMPLATE_FULL_DECL_THREE(typename,t1,typename,t2,typename,t3)

◆ MN_TEMPLATE_DECL_TWO

#define MN_TEMPLATE_DECL_TWO (   t1,
  t2 
)    MN_TEMPLATE_FULL_DECL_TWO(typename,t1,typename,t2)

◆ MN_TEMPLATE_FULL_DECL

#define MN_TEMPLATE_FULL_DECL ( )    template< >

◆ MN_TEMPLATE_FULL_DECL_ONE

#define MN_TEMPLATE_FULL_DECL_ONE (   d1,
  t1 
)    template <d1 t1>

◆ MN_TEMPLATE_FULL_DECL_THREE

#define MN_TEMPLATE_FULL_DECL_THREE (   d1,
  t1,
  d2,
  t2,
  d3,
  t3 
)    template <d1 t1, d2 t2, d3 t3>

◆ MN_TEMPLATE_FULL_DECL_TWO

#define MN_TEMPLATE_FULL_DECL_TWO (   d1,
  t1,
  d2,
  t2 
)    template <d1 t1, d2 t2>

◆ MN_TEMPLATE_TYPE_ONE

#define MN_TEMPLATE_TYPE_ONE (   type,
  a1 
)    type<a1>

◆ MN_TEMPLATE_TYPE_THREE

#define MN_TEMPLATE_TYPE_THREE (   type,
  a1,
  a2,
  a3 
)    type<a1,a2,a3>

◆ MN_TEMPLATE_TYPE_TWO

#define MN_TEMPLATE_TYPE_TWO (   type,
  a1,
  a2 
)    type<a1,a2>

◆ MN_TEMPLATE_USING

#define MN_TEMPLATE_USING (   name,
  basic_name 
)    using name = basic_name;

◆ MN_TEMPLATE_USING_ONE

#define MN_TEMPLATE_USING_ONE (   name,
  basic_name,
  d1,
  t1 
)    template <d1 t1> using name = basic_name<t1>;

◆ MN_TEMPLATE_USING_THREE

#define MN_TEMPLATE_USING_THREE (   name,
  basic_name,
  d1,
  t1,
  d2,
  t2,
  d3,
  t3 
)    template <d1 t1, d2 t2, d3 t3> using name = basic_name<t1, t2, t3>;

◆ MN_TEMPLATE_USING_TWO

#define MN_TEMPLATE_USING_TWO (   name,
  basic_name,
  d1,
  t1,
  d2,
  t2 
)    template <d1 t1, d2 t2> using name = basic_name<t1, t2>;

◆ MN_UNUSED_VARIABLE

#define MN_UNUSED_VARIABLE (   var)    do { (void)(var); } while (false)

◆ MN_ZERO_SET

#define MN_ZERO_SET (   var,
  size 
)    memset(var, 0, size)