KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
io_utils.h File Reference
#include <fstream>
#include <iomanip>
#include <map>
#include <sstream>
#include "commonflags.h"
Include dependency graph for io_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  utils
 
namespace  global
 
namespace  global::OFS
 

Macros

#define COLOR_R   std::string("\033[31m")
 
#define COLOR_G   std::string("\033[32m")
 
#define COLOR_B   std::string("\033[34m")
 
#define COLOR_Y   std::string("\033[33m")
 
#define COLOR_E   std::string("\033[0m")
 
#define FMT(X)   " " << std::setiosflags(std::ios::scientific) << std::setprecision(X) << std::setw(FMT_WIDTH_SIZE(X))
 
#define DELIM_SEP   '/'
 

Enumerations

enum  global::OFS::_enum {
  global::OFS::ENER , global::OFS::SAMP , global::OFS::TRAJ , global::OFS::ESAMP ,
  global::OFS::ETRAJ , global::OFS::CORR
}
 

Functions

constexpr int FMT_WIDTH_SIZE (int X)
 
int utils::removeFile (std::string &filename)
 
void utils::clearFile (std::string &filename)
 
void utils::closeOFS (std::ofstream &ofs)
 
bool utils::isFileExists (const std::string &name)
 
std::string utils::ParseFilePath (const std::string &s)
 
std::string utils::ParseFileName (const std::string &s)
 
std::string utils::ParseFileExtension (const std::string &s)
 
int utils::copyfile_from_to (const std::string &from, const std::string &to)
 
int global::parse_ostream (const std::string &str)
 
bool global::ofs_is_open (const global::OFS::_enum &test)
 
int global::del_ostream ()
 

Variables

int * global::p_argc
 
char *** global::p_argv
 
const std::map< std::string, _enumglobal::OFS::_dict
 
std::map< _enum, bool > global::OFS::_isopen
 

Macro Definition Documentation

◆ COLOR_B

#define COLOR_B   std::string("\033[34m")

Definition at line 12 of file io_utils.h.

◆ COLOR_E

#define COLOR_E   std::string("\033[0m")

Definition at line 14 of file io_utils.h.

◆ COLOR_G

#define COLOR_G   std::string("\033[32m")

Definition at line 11 of file io_utils.h.

◆ COLOR_R

#define COLOR_R   std::string("\033[31m")

Definition at line 10 of file io_utils.h.

◆ COLOR_Y

#define COLOR_Y   std::string("\033[33m")

Definition at line 13 of file io_utils.h.

◆ DELIM_SEP

#define DELIM_SEP   '/'

◆ FMT

#define FMT ( X)    " " << std::setiosflags(std::ios::scientific) << std::setprecision(X) << std::setw(FMT_WIDTH_SIZE(X))

Definition at line 17 of file io_utils.h.

Function Documentation

◆ FMT_WIDTH_SIZE()

constexpr int FMT_WIDTH_SIZE ( int X)
constexpr

Definition at line 16 of file io_utils.h.