Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
vl::Say Class Reference

A simple String formatting class. More...

#include <Say.hpp>

+ Inheritance diagram for vl::Say:

Public Member Functions

 Say (const String &fstr)
 
Sayoperator<< (const SayArg &p)
 
template<typename T >
Sayoperator<< (T p)
 
 operator String ()
 
String str () const
 

Public Attributes

String format_string
 

Protected Member Functions

String parse (const Say &pset) const
 
String euronotation (const String &str, int base) const
 
String format (unsigned long long n, int base, int field, int decimals, int align, int fill, int plus, int finalizer, int eur) const
 
String format (signed long long nn, int base, int field, int decimals, int align, int fill, int plus, int finalizer, int eur) const
 
String format (double num, int base, int field, int decimals, int align, int fill, int plus, int finalizer, int eur) const
 
String pipeline (const String &str, int base, int field, int decimals, int finalizer, int align, int eur, int fill, int negative, int plus) const
 

Detailed Description

A simple String formatting class.

Remarks
Things that we cannot do:
  • Exponential rounding
  • Explicit parameter reference
  • Dynamic field and decimal length

Things we can do:

Definition at line 124 of file Say.hpp.

Constructor & Destructor Documentation

◆ Say()

vl::Say::Say ( const String fstr)
inline

Definition at line 129 of file Say.hpp.

Member Function Documentation

◆ euronotation()

String Say::euronotation ( const String str,
int  base 
) const
protected

Definition at line 494 of file Say.cpp.

References vl::String::contains(), vl::String::insert(), and vl::String::length().

◆ format() [1/3]

String Say::format ( unsigned long long  n,
int  base,
int  field,
int  decimals,
int  align,
int  fill,
int  plus,
int  finalizer,
int  eur 
) const
protected

Definition at line 532 of file Say.cpp.

References vl::String::insert(), and vl::SayArg::str.

Referenced by vlSDL::SDLWindow::initSDLWindow().

◆ format() [2/3]

String Say::format ( signed long long  nn,
int  base,
int  field,
int  decimals,
int  align,
int  fill,
int  plus,
int  finalizer,
int  eur 
) const
protected

Definition at line 583 of file Say.cpp.

References vl::String::insert(), and vl::SayArg::str.

◆ format() [3/3]

String Say::format ( double  num,
int  base,
int  field,
int  decimals,
int  align,
int  fill,
int  plus,
int  finalizer,
int  eur 
) const
protected

Definition at line 646 of file Say.cpp.

References vl::exp(), vl::floor(), vl::sign(), and vl::SayArg::str.

◆ operator String()

vl::Say::operator String ( )
inline

Definition at line 147 of file Say.hpp.

◆ operator<<() [1/2]

Say& vl::Say::operator<< ( const SayArg p)
inline

Definition at line 134 of file Say.hpp.

◆ operator<<() [2/2]

template<typename T >
Say& vl::Say::operator<< ( p)
inline

Definition at line 141 of file Say.hpp.

◆ parse()

String Say::parse ( const Say pset) const
protected

◆ pipeline()

String Say::pipeline ( const String str,
int  base,
int  field,
int  decimals,
int  finalizer,
int  align,
int  eur,
int  fill,
int  negative,
int  plus 
) const
protected

◆ str()

String vl::Say::str ( ) const
inline

Definition at line 152 of file Say.hpp.

Member Data Documentation

◆ format_string

String vl::Say::format_string

Definition at line 127 of file Say.hpp.

Referenced by parse().


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