KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
macros.h File Reference

This file contains miscellaneous commonly used macros and functions. More...

#include <wx/string.h>

Go to the source code of this file.

Macros

#define KI_HAS_ATTRIBUTE(x)   0
 
#define KI_HAS_CPP_ATTRIBUTE(x)   0
 
#define KI_FALLTHROUGH   ( ( void ) 0 )
 The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from one to the next.
 
#define TO_STR2(x)   #x
 Stringifies the given parameter by placing in quotes.
 
#define TO_STR(x)   TO_STR2(x)
 
#define UNIMPLEMENTED_FOR(type)    wxFAIL_MSG( wxString::Format( wxT( "%s: unimplemented for %s" ), __FUNCTION__, type ) )
 

Detailed Description

This file contains miscellaneous commonly used macros and functions.

Definition in file macros.h.

Macro Definition Documentation

◆ KI_FALLTHROUGH

#define KI_FALLTHROUGH   ( ( void ) 0 )

The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from one to the next.

It must be followed by a ";".

Sample code: switch( a ) { case 1: // Some code KI_FALLTHROUGH;

case 2: // More code break; }

Definition at line 83 of file macros.h.

◆ KI_HAS_ATTRIBUTE

#define KI_HAS_ATTRIBUTE (   x)    0

Definition at line 39 of file macros.h.

◆ KI_HAS_CPP_ATTRIBUTE

#define KI_HAS_CPP_ATTRIBUTE (   x)    0

Definition at line 46 of file macros.h.

◆ TO_STR

#define TO_STR (   x)    TO_STR2(x)

Definition at line 94 of file macros.h.

◆ TO_STR2

#define TO_STR2 (   x)    #x

Stringifies the given parameter by placing in quotes.

Parameters
cstringSTRING (no spaces)
Returns
"STRING"

Definition at line 93 of file macros.h.

◆ UNIMPLEMENTED_FOR

#define UNIMPLEMENTED_FOR (   type)     wxFAIL_MSG( wxString::Format( wxT( "%s: unimplemented for %s" ), __FUNCTION__, type ) )

Definition at line 96 of file macros.h.