Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
PrintfFormatter< NUM, len > Class Template Reference

#include "lib/time/digxel.hpp"

Description

template<typename NUM, size_t len>
class lib::time::digxel::PrintfFormatter< NUM, len >

Default / base implementation for Digxel formatting.

This formatter holds an inline buffer of limited size, receiving and caching the textual representation

Definition at line 89 of file digxel.hpp.

Public Member Functions

 PrintfFormatter (Literal fmt)
 
void clear ()
 
bool empty ()
 
size_t maxlen () const
 
CBuf show (NUM val)
 

Private Types

enum  { bufsiz = len+1 }
 

Private Attributes

char printbuffer_ [bufsiz]
 
Literal formatSpec_
 

Constructor & Destructor Documentation

◆ PrintfFormatter()

template<typename NUM , size_t len>
PrintfFormatter ( Literal  fmt)
inline

Definition at line 97 of file digxel.hpp.

References PrintfFormatter< NUM, len >::clear().

+ Here is the call graph for this function:

Member Enumeration Documentation

◆ anonymous enum

template<typename NUM , size_t len>
anonymous enum
private
Enumerator
bufsiz 

Definition at line 91 of file digxel.hpp.

Member Function Documentation

◆ clear()

template<typename NUM , size_t len>
void clear ( )
inline

Definition at line 104 of file digxel.hpp.

References PrintfFormatter< NUM, len >::printbuffer_.

Referenced by PrintfFormatter< NUM, len >::PrintfFormatter().

+ Here is the caller graph for this function:

◆ empty()

template<typename NUM , size_t len>
bool empty ( )
inline

Definition at line 105 of file digxel.hpp.

References PrintfFormatter< NUM, len >::printbuffer_.

Referenced by PrintfFormatter< NUM, len >::show().

+ Here is the caller graph for this function:

◆ maxlen()

template<typename NUM , size_t len>
size_t maxlen ( ) const
inline

Definition at line 108 of file digxel.hpp.

◆ show()

template<typename NUM , size_t len>
CBuf show ( NUM  val)
inline

Definition at line 114 of file digxel.hpp.

References PrintfFormatter< NUM, len >::bufsiz, cStr(), PrintfFormatter< NUM, len >::empty(), PrintfFormatter< NUM, len >::formatSpec_, and PrintfFormatter< NUM, len >::printbuffer_.

+ Here is the call graph for this function:

Member Data Documentation

◆ printbuffer_

template<typename NUM , size_t len>
char printbuffer_[bufsiz]
private

◆ formatSpec_

template<typename NUM , size_t len>
Literal formatSpec_
private

Definition at line 94 of file digxel.hpp.

Referenced by PrintfFormatter< NUM, len >::show().

+ Inheritance diagram for PrintfFormatter< NUM, len >:
+ Collaboration diagram for PrintfFormatter< NUM, len >:

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