Public Member Functions | Public Attributes | List of all members
float_spec_handler Struct Reference

#include <format.h>

Public Member Functions

 float_spec_handler (char t)
 
void on_general ()
 
void on_exp ()
 
void on_fixed ()
 
void on_hex ()
 
void on_error ()
 

Public Attributes

char type
 
bool upper
 

Detailed Description

Definition at line 2658 of file format.h.

Constructor & Destructor Documentation

float_spec_handler::float_spec_handler ( char  t)
inlineexplicit

Definition at line 2662 of file format.h.

Member Function Documentation

void float_spec_handler::on_error ( )
inline

Definition at line 2691 of file format.h.

2691  {
2692  FMT_THROW(format_error("invalid type specifier"));
2693  }
#define FMT_THROW(x)
Definition: format.h:115
void float_spec_handler::on_exp ( )
inline

Definition at line 2671 of file format.h.

2671  {
2672  if (type == 'E')
2673  upper = true;
2674  }
void float_spec_handler::on_fixed ( )
inline

Definition at line 2676 of file format.h.

2676  {
2677  if (type == 'F') {
2678  upper = true;
2679 #if FMT_MSC_VER
2680  // MSVC's printf doesn't support 'F'.
2681  type = 'f';
2682 #endif
2683  }
2684  }
void float_spec_handler::on_general ( )
inline

Definition at line 2664 of file format.h.

2664  {
2665  if (type == 'G')
2666  upper = true;
2667  else
2668  type = 'g';
2669  }
void float_spec_handler::on_hex ( )
inline

Definition at line 2686 of file format.h.

2686  {
2687  if (type == 'A')
2688  upper = true;
2689  }

Member Data Documentation

char float_spec_handler::type

Definition at line 2659 of file format.h.

bool float_spec_handler::upper

Definition at line 2660 of file format.h.


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