EtcPal  HEAD (unstable)
ETC Platform Abstraction Layer (EtcPal)
View other versions:
C++ Wrappers

Overview

C++ Wrappers for EtcPal modules.

EtcPal is primarily a C-language library, but C++ language wrappers for certain modules are provided for convenience when writing C++ code that uses EtcPal. To include a C++ wrapper for a given module, where you would normally include "etcpal/[module].h", instead include "etcpal/cpp/[module].h".

Some C++ wrapper modules contain types that directly wrap a type defined in a core EtcPal module. These types follow a C++ namespace convention which matches the C-style namespacing of the items they are wrapping. For example, the struct EtcPalIpAddr has a C++ wrapper class called etcpal::IpAddr. It takes up the same space in memory as an EtcPalIpAddr and can be compared to and converted implicitly from EtcPalIpAddr. Explicit conversions can be made in the opposite direction using etcpal::IpAddr::get().

Modules

 error (Error Handling)
 C++ utilities for the error (Error Handling) module.
 
 event_group (Event Groups)
 C++ utilities for the event_group (Event Groups) module.
 
 hash (Hashing Utilities)
 C++ utilities for hashing.
 
 inet (Internet Addressing)
 C++ utilities for the inet (Internet Addressing) module.
 
 log (Logging)
 C++ utilities for the log (Logging) module.
 
 mutex (Mutexes)
 C++ utilities for the mutex (Mutexes) module.
 
 opaque_id (Strongly typed handles)
 Provides the OpaqueId type, a type-safe identifier or handle value.
 
 queue (RTOS queues)
 C++ utilities for the queue (RTOS queues) module.
 
 recursive_mutex (Recursive Mutexes)
 C++ utilities for the recursive_mutex (Recursive Mutexes) module.
 
 rwlock (Read-Write Locks)
 C++ utilities for the rwlock (Read-Write Locks) module.
 
 sem (Counting Semaphores)
 C++ utilities for the sem (Counting Semaphores) module.
 
 signal (Signal Objects)
 C++ utilities for the signal (Signals) module.
 
 static_queue (RTOS queues)
 Static C++ utilities for the queue (RTOS queues) module.
 
 thread (Threading)
 C++ utilities for the thread (Threading) module.
 
 timer (Timers)
 C++ utilities for the timer (Timers) module.
 
 uuid (UUIDs)
 C++ utilities for the uuid (UUIDs) module.
 

Macros

#define ETCPAL_CONSTEXPR_14
 Stand-in for "constexpr" on entities that can only be defined "constexpr" in C++14 or later.
 
#define ETCPAL_CONSTEXPR_14_OR_INLINE   inline
 Defined to "constexpr" in C++14 or later, "inline" earlier.
 
#define ETCPAL_NO_EXCEPTIONS
 Explicitly removes all "throw" statements from EtcPal C++ headers. More...
 

Macro Definition Documentation

◆ ETCPAL_NO_EXCEPTIONS

#define ETCPAL_NO_EXCEPTIONS

Explicitly removes all "throw" statements from EtcPal C++ headers.

The EtcPal headers also attempt to organically detect whether exceptions are enabled using various standard defines. This definition is available to explicitly disable exceptions if that method does not work.