Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
FloatFormat Class Reference

#include <elm/io/Output.h>

Public Types

enum  style_t { SHORTEST = 0, DECIMAL = 1, SCIENTIFIC = 2 }
 

Public Member Functions

 FloatFormat (void)
 
 FloatFormat (float val)
 
 FloatFormat (double val)
 
FloatFormat operator() (float val)
 
FloatFormat operator() (double val)
 
FloatFormatwidth (int w)
 
FloatFormatwidth (int w, int d)
 
FloatFormatstyle (style_t s)
 
FloatFormatshortest (void)
 
FloatFormatdecimal (void)
 
FloatFormatscientific (void)
 
FloatFormatalign (alignment_t a)
 
FloatFormatleft (void)
 
FloatFormatcenter (void)
 
FloatFormatright (void)
 
FloatFormatupper (void)
 
FloatFormatlower (void)
 
FloatFormatpad (char p)
 

Public Attributes

double _val
 
unsigned char _width
 
unsigned char _decw
 
unsigned char _style
 
unsigned char _align: 2
 
unsigned char _upper: 1
 
unsigned char _pad
 

Detailed Description

Format description for float or double data to display in the Output class.

Member Enumeration Documentation

◆ style_t

enum style_t
Enumerator
SHORTEST 
DECIMAL 
SCIENTIFIC 

Constructor & Destructor Documentation

◆ FloatFormat() [1/3]

FloatFormat ( void  )
inline

◆ FloatFormat() [2/3]

FloatFormat ( float  val)
inline

◆ FloatFormat() [3/3]

FloatFormat ( double  val)
inline

Member Function Documentation

◆ align()

FloatFormat& align ( alignment_t  a)
inline

References FloatFormat::_align.

◆ center()

FloatFormat& center ( void  )
inline

◆ decimal()

FloatFormat& decimal ( void  )
inline

◆ left()

FloatFormat& left ( void  )
inline

◆ lower()

FloatFormat& lower ( void  )
inline

References FloatFormat::_upper.

◆ operator()() [1/2]

FloatFormat operator() ( double  val)
inline

References FloatFormat::_val.

◆ operator()() [2/2]

FloatFormat operator() ( float  val)
inline

References FloatFormat::_val.

◆ pad()

FloatFormat& pad ( char  p)
inline

References FloatFormat::_pad, and elm::io::p().

◆ right()

FloatFormat& right ( void  )
inline

◆ scientific()

FloatFormat& scientific ( void  )
inline

◆ shortest()

FloatFormat& shortest ( void  )
inline

◆ style()

FloatFormat& style ( style_t  s)
inline

References FloatFormat::_style.

◆ upper()

FloatFormat& upper ( void  )
inline

References FloatFormat::_upper.

◆ width() [1/2]

FloatFormat& width ( int  w)
inline

References FloatFormat::_width.

◆ width() [2/2]

FloatFormat& width ( int  w,
int  d 
)
inline

Member Data Documentation

◆ _align

◆ _decw

unsigned char _decw

Referenced by FloatFormat::width().

◆ _pad

unsigned char _pad

Referenced by FloatFormat::pad().

◆ _style

◆ _upper

unsigned char _upper

◆ _val

double _val

Referenced by FloatFormat::operator()().

◆ _width

unsigned char _width

Referenced by FloatFormat::width().


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