g4tools  5.4.0
Public Member Functions | List of all members
tools::charp_out Class Reference
Inheritance diagram for tools::charp_out:
Inheritance graph
[legend]
Collaboration diagram for tools::charp_out:
Collaboration graph
[legend]

Public Member Functions

 charp_out (const char *a_value)
 
 charp_out (const charp_out &a_from)
 
charp_outoperator= (const charp_out &a_from)
 

Detailed Description

Definition at line 12 of file charp_out.

Constructor & Destructor Documentation

◆ charp_out() [1/2]

tools::charp_out::charp_out ( const char *  a_value)
inline

Definition at line 15 of file charp_out.

15  {
16  char s[512];
17  if(sizeof(unsigned long)==sizeof(char*)) { //majority of cases.
18  snpf(s,sizeof(s),"%lu",a_value);
19  parent::operator+=(s);
20  } else if(sizeof(unsigned long long)==sizeof(char*)) { //majority of cases.
21  snpf(s,sizeof(s),"%llu",a_value);
22  parent::operator+=(s);
23  } else {
24  parent::operator+=("charp_out_failed");
25  }
26  }

◆ charp_out() [2/2]

tools::charp_out::charp_out ( const charp_out a_from)
inline

Definition at line 28 of file charp_out.

28 :parent(a_from){}

Member Function Documentation

◆ operator=()

charp_out& tools::charp_out::operator= ( const charp_out a_from)
inline

Definition at line 29 of file charp_out.

29 {parent::operator=(a_from);return *this;}

The documentation for this class was generated from the following file:
tools::snpf
int snpf(char *a_s, size_t a_n, const char *a_fmt,...)
Definition: snpf:27