Coder Social home page Coder Social logo

wahello / etl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etlcpp/etl

0.0 1.0 0.0 21.27 MB

Embedded Template Library

Home Page: https://www.etlcpp.com

License: MIT License

C++ 97.85% C 1.34% Batchfile 0.01% CMake 0.43% Python 0.03% Meson 0.08% Shell 0.25%

etl's Introduction

Embedded Template Library (ETL)

GitHub release (latest by date) Standard License

CI CI CI Build status Codacy Badge

Motivation

C++ is a great language to use for embedded applications and templates are a powerful aspect. The standard library can offer a great deal of well tested functionality, but there are some parts of the standard library that do not fit well with deterministic behaviour and limited resource requirements. These limitations usually preclude the use of dynamically allocated memory and containers with open ended sizes.

What is needed is a template library where the user can declare the size, or maximum size of any object upfront. Most embedded compilers do not currently support the standard beyond C++ 03, therefore excluding the programmer from using the enhanced features of the later library.

This is what the ETL attempts to achieve.

Summary

The ETL is not designed to completely replace the STL, but complement it. Its design objective covers three areas.

  • Create a set of containers where the size or maximum size is determined at compile time. These containers are direct equivalents of those supplied in the STL.
  • Be compatible with C++ 03 but implement as many of the C++ 11 additions as possible.
  • Add other useful components that are not present in the standard library.

The embedded template library has been designed for lower resource embedded applications. It contains a set of containers, algorithms and utilities, some of which emulate parts of the STL. There is no dynamic memory allocation. The library makes no use of the heap. All of the containers have a fixed capacity allowing all memory allocation to be determined at compile time. The library is intended for any compiler that supports C++ 03.

Main features:

  • Cross platform. This library is not specific to any processor type.
  • No dynamic memory allocation
  • No RTTI required
  • Very little use of virtual functions. They are used only when they are absolutely necessary for the required functionality
  • A set of fixed capacity containers. (array, bitset, deque, forward_list, list, queue, stack, vector, map, set, etc.)
  • As the storage for all of the container types is allocated as a contiguous block, they are extremely cache friendly
  • Templated compile time constants
  • Templated design pattern base classes (Visitor, Observer)
  • Reverse engineered C++ 0x11 features (type traits, algorithms, containers etc.)
  • Type-safe enumerations
  • Type-safe typedefs
  • 8, 16, 32 & 64 bit CRC calculations
  • Checksums & hash functions
  • Variants (a type that can store many types in a type-safe interface)
  • Choice of asserts, exceptions, error handler or no checks on errors
  • Unit tested (currently over 6480 tests), using VS2019, GCC 8.1.0, , GCC 9.3.0, Clang 9.0.0 & 10.0.0
  • Many utilities for template support.
  • Easy to read and documented source.
  • Free email support

Any help porting the library to work under different platforms and compilers would be gratefully received. I am especially interested in people who are using Keil, IAR, Green Hills, TI Code Composer etc, bare metal or RTOS, and DSPs.

See (https://www.etlcpp.com) for up-to-date information.

Arduino library:

The content of this repo is available as a library in the Arduino IDE (search for the "Embedded Template Library" in the IDE library manager). The Arduino library repository is available at https://github.com/ETLCPP/etl-arduino, see there for more details.

etl's People

Contributors

aboseley avatar annius avatar apmorton avatar areksredzki avatar ashleyroll avatar bku-sue avatar bolry avatar cajun-rat avatar chiraffollo avatar finger42 avatar gatorque avatar hplightcorner avatar jerabaul29 avatar jovere avatar jpan127 avatar jtlenzz avatar jwellbelove avatar kiciek avatar mampfes avatar mchodzikiewicz avatar mhx avatar mipsters avatar part22 avatar phillipjohnston avatar raitraak-rrk avatar rolan-reznik avatar scott-eddy avatar skorokhod avatar twam avatar vdaxtr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.