libpniio
Public Types | Static Public Member Functions

real policy for imaginary part More...

#include <float_policy.hpp>

Inheritance diagram for pni::io::imag_policy< T >:
Inheritance graph
[legend]
Collaboration diagram for pni::io::imag_policy< T >:
Collaboration graph
[legend]

Public Types

typedef
boost::spirit::karma::real_policies
< T > 
base_type
 policy to parse the base type More...
 

Static Public Member Functions

static int floatfield (T)
 use scientific format by default More...
 
static int precision (T)
 always use maximum precision of required More...
 
template<typename OITER >
static bool integer_part (OITER &sink, T n, bool sign, bool)
 add sign and I in front of the output More...
 

Detailed Description

template<typename T>
struct pni::io::imag_policy< T >

This is a special policy for real numbers representing the imaginary part of a complex number. It shares all the properties of the default float_policy but adds the sign in front of the integer part and separates the sign by an 'I' from the residual floating point number.

Template Parameters
Tfloating point type

Member Typedef Documentation

template<typename T >
typedef boost::spirit::karma::real_policies<T> pni::io::imag_policy< T >::base_type

Member Function Documentation

template<typename T >
static int pni::io::imag_policy< T >::floatfield ( )
inlinestatic
template<typename T >
template<typename OITER >
static bool pni::io::imag_policy< T >::integer_part ( OITER &  sink,
n,
bool  sign,
bool   
)
inlinestatic

Adds the leading sign and the I to the output.

Template Parameters
OITERoutput iterator type
Parameters
sinkoutput iterator
nnumber
signtrue if a sign is set
Returns
true if writting the output was successful, false otherwise
template<typename T >
static int pni::io::imag_policy< T >::precision ( )
inlinestatic

The documentation for this struct was generated from the following file: