File access, with functionalities to open and close, write/read.
More...
#include <File.hpp>
|
enum | RealFormat { GENERAL =0,
FIXED =1,
ENGINEER =2
} |
| Print mode for double/float.
|
|
|
FILE * | file {nullptr} |
| Raw file pointer.
|
|
int | rc {0} |
| Returned value of last i/o function.
|
|
File access, with functionalities to open and close, write/read.
Definition at line 79 of file File.hpp.
void SUNphi::File::open |
( |
const char * |
path, |
|
|
const char * |
mode, |
|
|
const bool |
crashIfFail = true |
|
) |
| |
|
inline |
Open a file, crashing if impossible.
- Parameters
-
path | Path to open |
mode | Mode used to open |
crashIfFail | Crash or not if failing |
Definition at line 90 of file File.hpp.
template<typename T >
File& SUNphi::File::operator* |
( |
T && |
t | ) |
|
|
inline |
Prints after putting a space.
- Parameters
-
Definition at line 235 of file File.hpp.
File& SUNphi::File::operator<< |
( |
const char & |
c | ) |
|
|
inline |
Prints a char.
- Parameters
-
Definition at line 152 of file File.hpp.
File& SUNphi::File::operator<< |
( |
const int32_t & |
i | ) |
|
|
inline |
Prints an integer.
- Parameters
-
Definition at line 163 of file File.hpp.
File& SUNphi::File::operator<< |
( |
const uint32_t & |
i | ) |
|
|
inline |
Prints an unsigned integer.
- Parameters
-
i | Unsigned integer to write |
Definition at line 173 of file File.hpp.
File& SUNphi::File::operator<< |
( |
const int64_t & |
l | ) |
|
|
inline |
Prints a long integer.
- Parameters
-
Definition at line 183 of file File.hpp.
File& SUNphi::File::operator<< |
( |
const uint64_t & |
l | ) |
|
|
inline |
Prints a long unsigned integer.
- Parameters
-
l | Long unsigned integer to write |
Definition at line 193 of file File.hpp.
File& SUNphi::File::operator<< |
( |
const double & |
d | ) |
|
|
inline |
Prints a double.
String to print real numbers
The first component is signed or not The second component is the format
Definition at line 203 of file File.hpp.
template<typename T >
File& SUNphi::File::operator<< |
( |
const T * |
p | ) |
|
|
inline |
Prints a pointer.
- Parameters
-
Definition at line 224 of file File.hpp.
template<int MAX_LENGTH = 256>
File& SUNphi::File::printVariadicMessage |
( |
const char * |
format, |
|
|
va_list |
ap |
|
) |
| |
|
inline |
Print a C-style variadic message.
Message to be printed
Resulting length if the space had been enough
Check if it was truncated
- Parameters
-
format | Format to print |
ap | Variadic part |
Definition at line 260 of file File.hpp.
The documentation for this class was generated from the following file: