Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
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

◆ split_mode

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

◆ FindAndErase()

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

References FindAndReplace().

Here is the call graph for this function:

◆ FindAndReplace()

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

◆ FPRead() [1/2]

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

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

Referenced by FPRead(), getTokenOptionalImpl(), and getTokenOptionalImpl().

Here is the call graph for this function:

◆ FPRead() [2/2]

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

References FPRead().

Here is the call graph for this function:

◆ IntRead() [1/6]

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

References IntRead().

Here is the call graph for this function:

◆ IntRead() [2/6]

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

References IntRead().

Here is the call graph for this function:

◆ IntRead() [3/6]

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

◆ IntRead() [4/6]

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

References IntRead().

Here is the call graph for this function:

◆ IntRead() [5/6]

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

References IntRead().

Here is the call graph for this function:

◆ IntRead() [6/6]

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

References DEBUG_ENTRY, and getChar().

Here is the call graph for this function:

◆ rd_block() [1/2]

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:

◆ rd_block() [2/2]

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().

◆ service()

void service ( double tau,
double a,
double beta )

◆ Split()

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

◆ trimTrailingWhiteSpace() [1/2]

void trimTrailingWhiteSpace ( char * str)

◆ trimTrailingWhiteSpace() [2/2]

void trimTrailingWhiteSpace ( std::string & str)

◆ trimWhiteSpace()

void trimWhiteSpace ( string & str)

Referenced by cdMain().

◆ wr_block() [1/2]

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:

◆ wr_block() [2/2]

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().

Variable Documentation

◆ max_pow10

const int max_pow10
extern

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

◆ min_pow10

const int min_pow10
extern

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

◆ neg_pow10

const double neg_pow10[]
extern

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

◆ pos_pow10

const double pos_pow10[]
extern

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