Public Member Functions | List of all members
ecl::Format< float > Class Reference

Formatter for float types. More...

#include <floats.hpp>

Inheritance diagram for ecl::Format< float >:
Inheritance graph
[legend]

Public Member Functions

 Format (int w=-1, int p=4, Alignment a=NoAlign, FloatBase b=Fixed)
 
virtual ~Format ()
 
- Public Member Functions inherited from ecl::interfaces::FormatFloat< float >
FormatFloat< float > & align (const ecl::Alignment a)
 Sets the alignment format parameter. More...
 
FormatFloat< float > & base (const ecl::FloatBase b)
 Sets the base notation to use. More...
 
 FormatFloat (const int w=-1, const unsigned int p=4, const ecl::Alignment a=NoAlign, const ecl::FloatBase b=Fixed)
 
FormatFloat< float > & operator() (const float n)
 
FormatFloat< float > & operator() (const float n, const unsigned int p, const int w)
 
FormatFloat< float > & operator() (const float n, const unsigned int p, const int w, const ecl::Alignment align, const ecl::FloatBase b)
 
FormatFloat< float > & operator() (const unsigned int p, const int w, const ecl::Alignment align, const ecl::FloatBase b)
 
FormatFloat< float > & operator() (unsigned int p, const int w)
 
int precision ()
 Returns the current precision setting. More...
 
FormatFloat< float > & precision (const unsigned int p)
 Sets the precision format parameter. More...
 
int width ()
 Returns the current precision setting. More...
 
FormatFloat< float > & width (const int w)
 Sets the width format parameter. More...
 
virtual ~FormatFloat ()
 

Additional Inherited Members

- Protected Member Functions inherited from ecl::interfaces::FormatFloat< float >
void formatFixed (OutputStream &ostream) const
 
void formatSci (OutputStream &ostream) const
 
void pad (int n, OutputStream &ostream) const
 
void postPad (int n, OutputStream &ostream) const
 
void prePad (int n, OutputStream &ostream) const
 
- Protected Attributes inherited from ecl::interfaces::FormatFloat< float >
ecl::Alignmentalignment_
 
ecl::FloatBasebase_
 
int * precision_
 
ecl::Alignment prm_alignment
 
ecl::FloatBase prm_base
 
int prm_precision
 
int prm_width
 
bool ready_to_format
 
ecl::Alignment tmp_alignment
 
ecl::FloatBase tmp_base
 
int tmp_precision
 
int tmp_width
 
float value_
 
int * width_
 

Detailed Description

Formatter for float types.

It is a specialisation of the Format<T> template family. Its entire functionality is inherited from FormatFloat (this class simply provides a convenient handle in the Format<T> family).

Definition at line 502 of file floats.hpp.

Constructor & Destructor Documentation

◆ Format()

ecl::Format< float >::Format ( int  w = -1,
int  p = 4,
Alignment  a = NoAlign,
FloatBase  b = Fixed 
)
inline

Default constructor. Initialises the format tags for width, precision, alignment and base.

Parameters
w: width (default - no width constraints)
p: the number of decimal places of precision (default - 4)
a: the textual alignment (default - no alignment constraints)
b: the base format for the floating point representation (default - fixed)

Definition at line 514 of file floats.hpp.

◆ ~Format()

virtual ecl::Format< float >::~Format ( )
inlinevirtual

Definition at line 517 of file floats.hpp.


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


ecl_formatters
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:27