ae2f::Core
Loading...
Searching...
No Matches
Cast.h File Reference
#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Macros

#define ae2f_Macro_Cast_h
 asdf
 
#define ae2f_Macro_Cast_Console_Clear_Cheat   "\033[2J\033[H"
 ANSI Code for clearing the console. Clearing all display, moving the cursor on the top.
 
#define ae2f_Macro_Cast_Merge(...)
 simply merge all text inside the round bracket, counting them as a single text block.
 
#define ae2f_add_when_cxx(...)
 Appears when the current language is C++.
 
#define ae2f_add_when_c(...)
 Appears when the current language is C.
 
#define ae2f_record_make(type, ...)
 Initialiser for trivial structures / classes.
 
#define ae2f_static_cast(t, v)
 
#define ae2f_dynamic_cast(t, v)
 
#define ae2f_reinterpret_cast(t, v)
 
#define ae2f_const_cast(t, v)
 
#define ae2f_union_cast(tThen, tNow, v)
 Makes a union that reads a memory in two methods.
tThen -> tNow
 
#define ae2f_struct   ae2f_add_when_c(struct)
 In C, keyword 'struct' must be written in front of the structure's name in order to use as a type name.
In C++ that keyword is not required.
 
#define ae2f_extern   ae2f_add_when_c(extern) ae2f_add_when_cxx(extern "C")
 Suggests the existence of external variable or function, in naming of C. [non-mangling].
 
#define ae2f_class   ae2f_add_when_c(struct) ae2f_add_when_cxx(class)
 Class

 
#define ae2f_var   ae2f_add_when_cxx(extern "C")
 Makes the global variable in naming of C. [non-mangling].
 
#define ae2f_fdef(rtn_t, name, ...)
 Function definitions.
 

Macro Definition Documentation

◆ ae2f_add_when_c

#define ae2f_add_when_c ( ...)
Value:
__VA_ARGS__

Appears when the current language is C.

◆ ae2f_add_when_cxx

#define ae2f_add_when_cxx ( ...)

Appears when the current language is C++.

◆ ae2f_class

#define ae2f_class   ae2f_add_when_c(struct) ae2f_add_when_cxx(class)

Class

◆ ae2f_const_cast

#define ae2f_const_cast ( t,
v )
Value:
ae2f_add_when_c(((t)(v))) ae2f_add_when_cxx(const_cast<t>(v))
#define ae2f_add_when_c(...)
Appears when the current language is C.
Definition Cast.h:39
#define ae2f_add_when_cxx(...)
Appears when the current language is C++.
Definition Cast.h:35

const_cast

◆ ae2f_dynamic_cast

#define ae2f_dynamic_cast ( t,
v )
Value:
ae2f_add_when_c(((t)(v))) ae2f_add_when_cxx(dynamic_cast<t>(v))

dynamic_cast

◆ ae2f_extern

#define ae2f_extern   ae2f_add_when_c(extern) ae2f_add_when_cxx(extern "C")

Suggests the existence of external variable or function, in naming of C. [non-mangling].

◆ ae2f_fdef

#define ae2f_fdef ( rtn_t,
name,
... )
Value:
rtn_t (*name)(__VA_ARGS__)

Function definitions.

◆ ae2f_Macro_Cast_Console_Clear_Cheat

#define ae2f_Macro_Cast_Console_Clear_Cheat   "\033[2J\033[H"

ANSI Code for clearing the console. Clearing all display, moving the cursor on the top.

◆ ae2f_Macro_Cast_h

#define ae2f_Macro_Cast_h

asdf

◆ ae2f_Macro_Cast_Merge

#define ae2f_Macro_Cast_Merge ( ...)
Value:
__VA_ARGS__

simply merge all text inside the round bracket, counting them as a single text block.

◆ ae2f_record_make

#define ae2f_record_make ( type,
... )
Value:
(ae2f_add_when_c((type) { __VA_ARGS__ }) ae2f_add_when_cxx(type{ __VA_ARGS__ }))

Initialiser for trivial structures / classes.

◆ ae2f_reinterpret_cast

#define ae2f_reinterpret_cast ( t,
v )
Value:
ae2f_add_when_c(((t)(v))) ae2f_add_when_cxx(reinterpret_cast<t>(v))

reinterpret_cast

◆ ae2f_static_cast

#define ae2f_static_cast ( t,
v )
Value:
ae2f_add_when_c(((t)(v))) ae2f_add_when_cxx(static_cast<t>(v))

static_cast

◆ ae2f_struct

#define ae2f_struct   ae2f_add_when_c(struct)

In C, keyword 'struct' must be written in front of the structure's name in order to use as a type name.
In C++ that keyword is not required.

This keyword resolves the difference of the rules of two.

◆ ae2f_union_cast

#define ae2f_union_cast ( tThen,
tNow,
v )
Value:
ae2f_add_when_c((union { tThen a; tNow b; }) { v }) ae2f_add_when_cxx(ae2f_union_caster<tThen, tNow>{ v }) .b
C++ union definition for ae2f_union_cast.
Definition CasterUnion.hpp:11

Makes a union that reads a memory in two methods.
tThen -> tNow

Template Parameters
tThenThe existing data's type as input.
tNowWanted output datatype for casting.
Parameters
vInput value

◆ ae2f_var

#define ae2f_var   ae2f_add_when_cxx(extern "C")

Makes the global variable in naming of C. [non-mangling].