Show EOL distros:
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Author: Daniel Stonier (d.stonier@gmail.com)
- License: BSD
- External website: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
- Source: svn https://embedded-control-library.googlecode.com/svn/trunk/ecl_core
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Author: Daniel Stonier (d.stonier@gmail.com)
- License: BSD
- External website: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
- Source: svn https://embedded-control-library.googlecode.com/svn/tags/ecl_core/fuerte
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: groovy-devel)
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: hydro-devel)
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.61-indigo-kinetic)
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: devel)
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.61-indigo-kinetic)
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.62-melodic)
Package Summary
The formatters here simply format various input types to a specified text format. They can be used with most streaming types (including both ecl and stl streams).
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.62-noetic)
Overview
Typically c/c++ libraries bundle streaming and formatting within the same tool (printf, iostream, ...). This tends to make them cumbersome for simple tasks. The formatter classes in this package externalise the formatting task from the io manipulation (which is usually just (u)char manipulation), This increases the efficiency of low level operations whilst also maintaining type safety. They typically do this by making use of the lower level functionality provided by ecl_converters.
The formatter classes can be used standalone, with stl streams or with ecl_streams.
Compiling & Linking
Include the following at the top of any translation unit:
1 #include <ecl/formatters.hpp>
2
3 // The formatter template family
4 using ecl::Format;
5
6 // Common formatter parameters
7 using ecl::NoAlign;
8 using ecl::LeftAlign;
9 using ecl::CentreAlign;
10 using ecl::RightAlign;
11
12 // Integral formatter parameters
13 using ecl::Bin;
14 using ecl::Dec;
15 using ecl::Hex;
16
17 // Float formatter parameters
18 using ecl::Fixed;
19 using ecl::Sci;
If outside of ros, you will also need to link to ecl_formatters.
Tutorials
Available Formatters
Each standard formatter is a template specialisation of the form Format<inputType> where the available input types are:
- integral types (char, short, int, long, long long and unsigned equivalents)
- float types (float, double)
- string
arrays and stencils in ecl_containers