Arduino Core for STM32  1.0
Print.h File Reference

This file contains class with methods, that are used for to print formatted output. More...

#include <stdint.h>
#include <stddef.h>
#include <stdarg.h>
#include <cstring>
#include <type_traits>
#include <stdexcept>
#include "Printable.h"
#include "WString.h"
Include dependency graph for Print.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Print
 The stream class is derived from this class. This class contains methods, that are used for to print formatted output. More...
 

Macros

#define DEC   10
 Decimal base macro. More...
 
#define HEX   16
 Hexagonal base macro. More...
 
#define OCT   8
 Octal base macro. More...
 
#define BIN   2
 Binary base macro. More...
 
#define endl   "\r\n"
 End line (New line) macro. More...
 
#define __INTEGER_ONLY__(t, ret_type)   template<typename t> typename std::enable_if_t<std::is_integral<t>::value, ret_type>
 Macro, that allows method or function to use integer only template in parameter. More...
 
#define __INTEGER_ONLY__R(t)   __INTEGER_ONLY__(t, t)
 Macro, that allows method or function to use integer only template in parameter and as return type. More...
 
#define __SIGNED_INTEGER_ONLY__(t, ret_type)   template<typename t> typename std::enable_if_t<std::is_integral<t>::value && std::is_signed<t>::value && !std::is_same<t, bool>::value, ret_type>
 Macro, that allows method or function to use signed integers only template in parameter. More...
 
#define __UNSIGNED_INTEGER_ONLY__(t, ret_type)   template<typename t> typename std::enable_if_t<std::is_integral<t>::value && (!std::is_signed<t>::value || std::is_same<t, bool>::value), ret_type>
 Macro, that allows method or function to use unsigned integers only template in parameter. More...
 
#define __FLOATING_ONLY__(t, ret_type)   template<typename t> typename std::enable_if_t<std::is_floating_point<t>::value, ret_type>
 Macro, that allows method or function to use floating point only template in parameter. More...
 
#define __FLOATING_ONLY__R(t)   __FLOATING_ONLY__(t, t)
 Macro, that allows method or function to use floating point only template in parameter and as return type. More...
 

Detailed Description

This file contains class with methods, that are used for to print formatted output.

License

Print.h - Base class that provides print() and println()
Copyright (c) 2008 David A. Mellis. All right reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Credits

This library is modified copy for STM32 of arduino Print library.
Modified by: Matej Fitoš

Date
Jan 29, 2021
See also
Print
Printable
Printable.h
Stream
Stream.h
ftoa.h

Macro Definition Documentation

◆ DEC

#define DEC   10

Decimal base macro.

◆ HEX

#define HEX   16

Hexagonal base macro.

◆ OCT

#define OCT   8

Octal base macro.

◆ BIN

#define BIN   2

Binary base macro.

◆ endl

#define endl   "\r\n"

End line (New line) macro.

◆ __INTEGER_ONLY__

#define __INTEGER_ONLY__ (   t,
  ret_type 
)    template<typename t> typename std::enable_if_t<std::is_integral<t>::value, ret_type>

Macro, that allows method or function to use integer only template in parameter.

Parameters
tTemplate name.
ret_typeMethod or function return type.
Note
Method or function with this macro have to be fully defined in .h file.

◆ __INTEGER_ONLY__R

#define __INTEGER_ONLY__R (   t)    __INTEGER_ONLY__(t, t)

Macro, that allows method or function to use integer only template in parameter and as return type.

Parameters
tTemplate name.
Note
Method or function with this macro have to be fully defined in .h file.

◆ __SIGNED_INTEGER_ONLY__

#define __SIGNED_INTEGER_ONLY__ (   t,
  ret_type 
)    template<typename t> typename std::enable_if_t<std::is_integral<t>::value && std::is_signed<t>::value && !std::is_same<t, bool>::value, ret_type>

Macro, that allows method or function to use signed integers only template in parameter.

Parameters
tTemplate name.
ret_typeMethod or function return type.
Note
Method or function with this macro have to be fully defined in .h file.

◆ __UNSIGNED_INTEGER_ONLY__

#define __UNSIGNED_INTEGER_ONLY__ (   t,
  ret_type 
)    template<typename t> typename std::enable_if_t<std::is_integral<t>::value && (!std::is_signed<t>::value || std::is_same<t, bool>::value), ret_type>

Macro, that allows method or function to use unsigned integers only template in parameter.

Parameters
tTemplate name.
ret_typeMethod or function return type.
Note
Method or function with this macro have to be fully defined in .h file.

◆ __FLOATING_ONLY__

#define __FLOATING_ONLY__ (   t,
  ret_type 
)    template<typename t> typename std::enable_if_t<std::is_floating_point<t>::value, ret_type>

Macro, that allows method or function to use floating point only template in parameter.

Parameters
tTemplate name.
ret_typeMethod or function return type.
Note
Method or function with this macro have to be fully defined in .h file.

◆ __FLOATING_ONLY__R

#define __FLOATING_ONLY__R (   t)    __FLOATING_ONLY__(t, t)

Macro, that allows method or function to use floating point only template in parameter and as return type.

Parameters
tTemplate name.
Note
Method or function with this macro have to be fully defined in .h file.