Evo C++ Library v0.5.1
Public Member Functions | Public Attributes | List of all members
FmtPtr Struct Reference

#include <evo/impl/str.h>

Detailed Description

Explicitly format a pointer.

Example
#include <evo/string.h>
using namespace evo;
int main() {
int num = 1;
// Format string as:
String str;
str << FmtPtr(&num);
return 0;
}

Public Member Functions

 FmtPtr (const void *ptr, FmtBasePrefix prefix=fbpCURRENT, int width=-1, char ch=0)
 Constructor for formatting a pointer. More...
 
 FmtPtr (const void *ptr, int base, FmtBasePrefix prefix=fbpCURRENT, int width=-1, char ch=0)
 Constructor for formatting a pointer. More...
 

Public Attributes

FmtSetInt fmt
 Formatting attributes. More...
 
const void * ptr
 Pointer to format. More...
 

Constructor & Destructor Documentation

◆ FmtPtr() [1/2]

FmtPtr ( const void *  ptr,
FmtBasePrefix  prefix = fbpCURRENT,
int  width = -1,
char  ch = 0 
)
inline

Constructor for formatting a pointer.

Parameters
ptrPointer to format
prefixFormatting prefix to use (see FmtBasePrefix), fbpCURRENT for unspecified (default: fPREFIX0)
widthWidth to pad to, -1 for unspecified (default: 0)
chPadding character to use, 0 for unspecified (default: '0')

◆ FmtPtr() [2/2]

FmtPtr ( const void *  ptr,
int  base,
FmtBasePrefix  prefix = fbpCURRENT,
int  width = -1,
char  ch = 0 
)
inline

Constructor for formatting a pointer.

Parameters
ptrPointer to format
baseFormatting base to use (see FmtBase), fbCURRENT for unspecified (default: fDEC)
prefixFormatting prefix to use (see FmtBasePrefix), fbpCURRENT for unspecified (default: fPREFIX0)
widthWidth to pad to, -1 for unspecified (default: 0)
chPadding character to use, 0 for unspecified (default: '0')

Member Data Documentation

◆ fmt

FmtSetInt fmt

Formatting attributes.

◆ ptr

const void* ptr

Pointer to format.


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