libpniio
Data Structures
Internal classes used by the formatters
Collaboration diagram for Internal classes used by the formatters:

Data Structures

struct  pni::io::complex_generator< OITER, T >
 generator for complex numbers More...
 
struct  pni::io::complex_generator< OITER, T >::get_real
 get real part More...
 
struct  pni::io::complex_generator< OITER, T >::get_real::result< Sig >
 result type of the lazy function More...
 
struct  pni::io::complex_generator< OITER, T >::get_imag
 get imaginary part More...
 
struct  pni::io::float_policy< T >
 policy for real numbers More...
 
struct  pni::io::imag_policy< T >
 real policy for imaginary part More...
 
class  pni::io::formatter< pni::core::string >
 formatter for strings More...
 
class  pni::io::formatter< pni::core::value_ref >
 formatter for value_ref type erasure More...
 
class  pni::io::container_formatter< CTYPE >
 formatter for containers More...
 
class  pni::io::formatter< std::vector< T > >
 vector formatter More...
 
class  pni::io::formatter< pni::core::array >
 formatter for the array type erasure More...
 
class  pni::io::formatter< pni::core::mdarray< OTYPES...> >
 formatter for mdarray instances More...
 
class  pni::io::formatter< std::vector< pni::core::string > >
 formatter for a string vector More...
 
struct  pni::io::get_generator< ITERT, T >
 get generator for type More...
 
struct  pni::io::get_generator< ITERT, pni::core::value >
 get generator for value More...
 
struct  pni::io::get_generator< ITERT, pni::core::value_ref >
 get generator for value_ref More...
 
struct  boost::spirit::traits::is_container< pni::core::mdarray< OTYPES...> const >
 mdarrya container trait More...
 
struct  boost::spirit::traits::container_iterator< pni::core::mdarray< OTYPES...> const >
 mdarray iterator trait More...
 
struct  boost::spirit::traits::begin_container< pni::core::mdarray< OTYPES...> const >
 begin trait for mdarray More...
 
struct  boost::spirit::traits::end_container< pni::core::mdarray< OTYPES...> const >
 end trait for mdarray More...
 
struct  boost::spirit::traits::is_container< pni::core::array const >
 container trait for array More...
 
struct  boost::spirit::traits::container_iterator< pni::core::array const >
 iterator trait for array More...
 
struct  boost::spirit::traits::begin_container< pni::core::array const >
 begin trait for array More...
 
struct  boost::spirit::traits::end_container< pni::core::array const >
 end trait for array More...
 
struct  pni::io::value_generator< OITER, VTYPE >
 generator for scalar type erasures More...
 
struct  pni::io::value_generator< OITER, VTYPE >::lazy_to_string
 convert value type to a string More...
 

Detailed Description

The classes, functions, and data structures described in this section are only of interest for developers of libpniio. The formatter framework provided by libpniio is based on boost::spirit::karma.

Container traits

In order to make boost::spirit::karma recognizing pni::core::mdarray and pni::core::array as containers, specializiations for the container traits must be provided in boost::spirit:traits for those types. Specializations are provided for the following traits

Custom policies

Custom formatting policies are used for

A custom policiy for floating point numbers was required due to the fact that C++, by default, does not write floating point numbers with their full numerical resolution. This can cause truncation effects where zeros are writting simply because the number is too small. The custom policy avoids this problem.

Custom generators

For some of the types provided by libpnicore custom generators are provided. Obviously, custom generators are required for the scalar type erasures pni::core::value and pni::core::value_ref. Both types are handled by the pni::io::value_generator template.