[Documentation] [TitleIndex] [WordIndex

  Show EOL distros: 

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

ecl_core: ecl_command_line | ecl_concepts | ecl_containers | ecl_converters | ecl_core_apps | ecl_devices | ecl_eigen | ecl_exceptions | ecl_formatters | ecl_geometry | ecl_ipc | ecl_linear_algebra | ecl_math | ecl_mpl | ecl_sigslots | ecl_statistics | ecl_streams | ecl_threads | ecl_time | ecl_type_traits | ecl_utilities

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).

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:


2024-11-02 14:23