cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
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 Split (const std::string &str, const std::string &sep, std::vector< std::string > &lst, split_mode mode)
 
bool FindAndReplace (string &str, const string &substr, const string &newstr)
 
bool FindAndErase (string &str, const 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)
 

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 

Definition at line 21 of file service.h.

Function Documentation

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

Definition at line 39 of file service.h.

References FindAndReplace().

Here is the call graph for this function:

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

Definition at line 29 of file service.h.

Referenced by FindAndErase(), t_cpu_i::getMD5sums(), and t_cpu_i::t_cpu_i().

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>

Definition at line 70 of file service.h.

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>

Definition at line 82 of file service.h.

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)

Definition at line 165 of file service.cpp.

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>

Definition at line 48 of file service.h.

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>

Definition at line 60 of file service.h.

References open_data(), and wr_block().

Here is the call graph for this function: