|
| #define | HASSERT(x) do { assert(x); } while(0) |
| | Checks that the value of expression x is true, else terminates the current process.
|
| |
| #define | DIE(MSG) do { fprintf(stderr, "Crashed in file " __FILE__ " line %d: " MSG "\n", __LINE__); g_death_file = __FILE__; g_death_lineno = __LINE__; abort(); } while(0) |
| | Unconditionally terminates the current process with a message.
|
| |
| #define | DASSERT(x) HASSERT(x) |
| | Debug assertion facility.
|
| |
| #define | DISALLOW_COPY_AND_ASSIGN(TypeName) |
| | Removes default copy-constructor and assignment added by C++.
|
| |
| #define | OVERRIDE override |
| | Function attribute for virtual functions declaring that this funciton is overriding a funciton that should be virtual in the base class.
|
| |
| #define | ARRAYSIZE(a) (sizeof(a) / sizeof(a[0])) |
| | Returns the number of elements in a statically defined array (of static size)
|
| |
| #define | INHERIT_CONSTRUCTOR(CURRENT_CLASS, BASE_CLASS) |
| | Adds a constructor to the current class that proxies every argument to the base constructor.
|
| |
| #define | INHERIT_CONSTEXPR_CONSTRUCTOR(CURRENT_CLASS, BASE_CLASS) |
| | Adds a constexpr constructor to the current class that proxies every argument to the base constructor.
|
| |
| #define | C_STATIC_ASSERT(expr, name) typedef unsigned char __attribute__((unused)) __static_assert_##name[expr ? 0 : -1] |
| | Static (aka compile-time) assertion for C implementation files.
|
| |
| #define | ICACHE_FLASH_ATTR |
| | Declares (on the ESP8266) that the current function is not executed too often and should be placed in the SPI flash.
|
| |
| #define | ICACHE_RAM_ATTR |
| | Declares (on the ESP8266) that the current function is executed often and should be placed in the instruction RAM.
|
| |
| #define | GET_PARENT_PTR(ParentClass, variable) |
| | Retrieve a parent pointer from a member class variable.
|
| |
| #define | FAKELLP(x) static_cast<unsigned>((x) >> 32), static_cast<unsigned>((x) & 0xffffffffu) |
| | Helper macro for printing a node ID on printf that does not support llx.
|
| |
| #define | MUST_USE_RESULT __attribute__((__warn_unused_result__)) |
| | Macro to signal a function that the result must be used.
|
| |
- Copyright
- Copyright (c) 2013, Balazs Racz All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Useful macros shared across the entire codebase.
- Author
- Balazs Racz
- Date
- 19 July 2013
Definition in file macros.h.