WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
wpi::format_object_base Class Referenceabstract

This is a helper class used for handling formatted output. More...

#include <Format.h>

Inheritance diagram for wpi::format_object_base:
wpi::format_object< Ts >

Public Member Functions

 format_object_base (const char *fmt)
 
unsigned print (char *Buffer, unsigned BufferSize) const
 Format the object into the specified buffer. More...
 

Protected Member Functions

 format_object_base (const format_object_base &)=default
 
virtual void home ()
 
virtual int snprint (char *Buffer, unsigned BufferSize) const =0
 Call snprintf() for this object, on the given buffer and size.
 

Protected Attributes

const char * Fmt
 

Detailed Description

This is a helper class used for handling formatted output.

It is the abstract base class of a templated derived class.

Member Function Documentation

unsigned wpi::format_object_base::print ( char *  Buffer,
unsigned  BufferSize 
) const
inline

Format the object into the specified buffer.

On success, this returns the length of the formatted string. If the buffer is too small, this returns a length to retry with, which will be larger than BufferSize.


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