Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
service.h File Reference
#include <string>
#include <vector>
Include dependency graph for service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  split_mode { SPM_RELAX, SPM_KEEP_EMPTY, SPM_STRICT }
 

Functions

void trimTrailingWhiteSpace (std::string &str)
 
void trimTrailingWhiteSpace (char *str)
 
void trimWhiteSpace (string &str)
 
void FPRead (istringstream &iss, const string &s, double &value)
 
void FPRead (istringstream &iss, const string &s, sys_float &value)
 
void IntRead (istringstream &iss, const string &s, long long &value)
 
void IntRead (istringstream &iss, const string &s, long &value)
 
void IntRead (istringstream &iss, const string &s, int &value)
 
void IntRead (istringstream &iss, const string &s, unsigned long long &value)
 
void IntRead (istringstream &iss, const string &s, unsigned long &value)
 
void IntRead (istringstream &iss, const string &s, unsigned int &value)
 
void Split (const std::string &str, const std::string &sep, std::vector< std::string > &lst, split_mode mode)
 
bool FindAndReplace (std::string &str, const std::string &substr, const std::string &newstr)
 
bool FindAndErase (std::string &str, const std::string &substr)
 
void service (double tau, double a, double beta)
 
void wr_block (const void *ptr, size_t len, FILE *fdes)
 
void wr_block (const void *ptr, size_t len, const char *fnam)
 
void rd_block (void *ptr, size_t len, FILE *fdes)
 
void rd_block (void *ptr, size_t len, const char *fnam)
 

Variables

const double pos_pow10 []
 
const int max_pow10
 
const double neg_pow10 []
 
const int min_pow10
 

Enumeration Type Documentation

enum split_mode

split_mode defines how the routine Split generates substrings SPM_RELAX: multiple adjacent separators will be coalesced into one this way you can never get an empty substring SPM_KEEP_EMPTY: multiple adjacent separators will result in empty substrings to be added to the list SPM_STRICT: empty substrings are illegal

Enumerator
SPM_RELAX 
SPM_KEEP_EMPTY 
SPM_STRICT 

Function Documentation

bool FindAndErase ( std::string &  str,
const std::string &  substr 
)
inline

References FindAndReplace().

Here is the call graph for this function:

bool FindAndReplace ( std::string &  str,
const std::string &  substr,
const std::string &  newstr 
)
inline
void FPRead ( istringstream &  iss,
const string &  s,
double &  value 
)

References DEBUG_ENTRY, getChar(), max_pow10, min_pow10, pos_pow10, sign(), and UNLIKELY.

Referenced by FPRead(), and getTokenOptionalImpl().

Here is the call graph for this function:

void FPRead ( istringstream &  iss,
const string &  s,
sys_float value 
)
inline

References FPRead().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
long long &  value 
)

References DEBUG_ENTRY, getChar(), and sign().

Referenced by getTokenOptionalImpl(), and IntRead().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
long &  value 
)
inline

References IntRead().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
int &  value 
)
inline

References IntRead().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
unsigned long long &  value 
)

References DEBUG_ENTRY, and getChar().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
unsigned long &  value 
)
inline

References IntRead().

Here is the call graph for this function:

void IntRead ( istringstream &  iss,
const string &  s,
unsigned int &  value 
)
inline

References IntRead().

Here is the call graph for this function:

void rd_block ( void *  ptr,
size_t  len,
FILE *  fdes 
)
inline

rd_block: read <len> bytes of data into buffer <ptr> from open binary FILE <fdes>

References cdEXIT, and EXIT_FAILURE.

Referenced by phymir_state< X, Y, NP, NSTR >::p_process_output(), process_output(), and rd_block().

void rd_block ( void *  ptr,
size_t  len,
const char *  fnam 
)
inline

rd_block: read <len> bytes of data into buffer <*ptr> from unformatted file <fnam>

References AS_LOCAL_ONLY, open_data(), and rd_block().

Here is the call graph for this function:

void service ( double  tau,
double  a,
double  beta 
)
void Split ( const std::string &  str,
const std::string &  sep,
std::vector< std::string > &  lst,
split_mode  mode 
)

Split: split a string into substrings using "sep" as separator

void trimTrailingWhiteSpace ( std::string &  str)
void trimTrailingWhiteSpace ( char *  str)
void trimWhiteSpace ( string &  str)

Referenced by cdMain().

void wr_block ( const void *  ptr,
size_t  len,
FILE *  fdes 
)
inline

wr_block: write <len> bytes of data from buffer <ptr> into open binary FILE <fdes>

References cdEXIT, and EXIT_FAILURE.

Referenced by phymir_state< X, Y, NP, NSTR >::p_execute_job_parallel(), saveFITSfile(), and wr_block().

void wr_block ( const void *  ptr,
size_t  len,
const char *  fnam 
)
inline

wr_block: write <len> bytes of data from buffer <*ptr> into unformatted file <fnam>

References open_data(), and wr_block().

Here is the call graph for this function:

Variable Documentation

const int max_pow10

Referenced by exp10i(), FFmtRead(), and FPRead().

const int min_pow10

Referenced by exp10i(), FFmtRead(), and FPRead().

const double neg_pow10[]

Referenced by exp10i().

const double pos_pow10[]

Referenced by exp10i(), FFmtRead(), and FPRead().