23 void FPRead(istringstream& iss,
const string& s,
double& value);
34 void IntRead(istringstream& iss,
const string& s,
long long& value);
37 inline void IntRead(istringstream& iss,
const string& s,
long& value)
45 inline void IntRead(istringstream& iss,
const string& s,
int& value)
53 void IntRead(istringstream& iss,
const string& s,
unsigned long long& value);
56 inline void IntRead(istringstream& iss,
const string& s,
unsigned long& value)
60 value = (
unsigned long)x;
64 inline void IntRead(istringstream& iss,
const string& s,
unsigned int& value)
68 value = (
unsigned int)x;
80 void Split(
const std::string& str,
81 const std::string& sep,
82 std::vector<std::string>& lst,
86 const std::string& substr,
87 const std::string& newstr)
89 std::string::size_type ptr = str.find( substr );
90 if( ptr != std::string::npos )
91 str.replace( ptr, substr.length(), newstr );
92 return ptr != std::string::npos;
96 const std::string& substr)
101 void service(
double tau,
double a,
double beta);
108 if( fwrite(ptr,len,
size_t(1),fdes) != 1 ) {
109 printf(
"wr_block: error writing to file\n" );
130 if( fread(ptr,len,
size_t(1),fdes) != 1 ) {
131 printf(
"rd_block: error reading from file\n" );
split_mode
Definition: service.h:77
void Split(const std::string &str, const std::string &sep, std::vector< std::string > &lst, split_mode mode)
bool FindAndErase(std::string &str, const std::string &substr)
Definition: service.h:95
FILE * open_data(const string &fname, const string &mode, access_scheme scheme, string *rpath)
Definition: cpu.cpp:722
void trimWhiteSpace(string &str)
Definition: service.cpp:159
const int min_pow10
Definition: service.cpp:390
void IntRead(istringstream &iss, const string &s, long long &value)
Definition: service.cpp:649
void trimTrailingWhiteSpace(std::string &str)
const double neg_pow10[]
Definition: service.cpp:356
void service(double tau, double a, double beta)
#define EXIT_FAILURE
Definition: cddefines.h:175
float sys_float
Definition: cddefines.h:130
void rd_block(void *ptr, size_t len, FILE *fdes)
Definition: service.h:126
#define cdEXIT(FAIL)
Definition: cddefines.h:480
void wr_block(const void *ptr, size_t len, FILE *fdes)
Definition: service.h:104
bool FindAndReplace(std::string &str, const std::string &substr, const std::string &newstr)
Definition: service.h:85
const int max_pow10
Definition: service.cpp:354
void FPRead(istringstream &iss, const string &s, double &value)
Definition: service.cpp:548
const double pos_pow10[]
Definition: service.cpp:320