HRCore V1.1.0
A High Resolution Calculation Library
Loading...
Searching...
No Matches
I/O Functions

This section described I/O functions of HRCore. More...

Classes

class  HRCore::Utils::Expression< T, U >
 A class to get and evaluate expression. More...
 

Functions

std::ostream & HRCore::Value::operator<< (std::ostream &os, Integer &rhs)
 Reload of operator<< to support std::cout and other std::ostream with Integer. More...
 
std::istream & HRCore::Value::operator>> (std::istream &is, Integer &rhs)
 Reload of operator>> to support std::cin and other std::istream with Integer. More...
 
std::istream & HRCore::Value::operator>> (std::istream &is, Float &rhs)
 Reload of operator>> to support std::cin and other std::istream with Float. More...
 
std::ostream & HRCore::Value::operator<< (std::ostream &os, Float &rhs)
 Reload of operator<< to support std::cout and other std::ostream with Integer. More...
 
template<typename T , typename U >
std::istream & HRCore::Utils::operator>> (std::istream &is, Expression< T, U > &rhs)
 Convert a stream into an expression. More...
 
template<typename T , typename U >
std::ostream & HRCore::Utils::operator<< (std::ostream &os, Expression< T, U > &rhs)
 Output the value of an expression. More...
 

Detailed Description

This section described I/O functions of HRCore.

Function Documentation

◆ operator<<() [1/3]

template<typename T , typename U >
std::ostream & HRCore::Utils::operator<< ( std::ostream &  os,
Expression< T, U > &  rhs 
)

Output the value of an expression.

Definition at line 618 of file Utils.hpp.

◆ operator<<() [2/3]

std::ostream & HRCore::Value::operator<< ( std::ostream &  os,
Float rhs 
)

Reload of operator<< to support std::cout and other std::ostream with Integer.

Note
Only decimal mode is supported.

Definition at line 232 of file Utils.hpp.

◆ operator<<() [3/3]

std::ostream & HRCore::Value::operator<< ( std::ostream &  os,
Integer rhs 
)

Reload of operator<< to support std::cout and other std::ostream with Integer.

Example:

auto a = Integer::make<LinkedList<8>>();
cout << a;
Note
When std::hex flag is not set, Dec number is output by default.

Definition at line 56 of file Utils.hpp.

◆ operator>>() [1/3]

template<typename T , typename U >
std::istream & HRCore::Utils::operator>> ( std::istream &  is,
Expression< T, U > &  rhs 
)

Convert a stream into an expression.

The function will reads std::istream object until EOF. If something invalid read, throw Exception::ExpressionConvertFailed.

Note
"--" "++"" is not allowed!

Definition at line 534 of file Utils.hpp.

◆ operator>>() [2/3]

std::istream & HRCore::Value::operator>> ( std::istream &  is,
Float rhs 
)

Reload of operator>> to support std::cin and other std::istream with Float.

Note
Only decimal mode is supported.

Definition at line 185 of file Utils.hpp.

◆ operator>>() [3/3]

std::istream & HRCore::Value::operator>> ( std::istream &  is,
Integer rhs 
)

Reload of operator>> to support std::cin and other std::istream with Integer.

Example:

auto a = Integer::make<LinkedList<8>>();
cin >> a;

Definition at line 119 of file Utils.hpp.