HIPO4 C++ Library 4.4.1
Columnar I/O library for CLAS12 physics data
Loading...
Searching...
No Matches
hipo::utils Class Reference

#include <utils.h>

Public Member Functions

 utils ()
 
 ~utils ()
 

Static Public Member Functions

static void tokenize (const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
 
static std::string substring (const std::string &str, const char *start_delim, const char *end_delim, int order)
 returns a substring from a string that is enclosed between start_delim and end_delim.
 
static int findposition (const std::string &str, const char *delim, int order)
 finds postion of the dalim in the string, while skipping "order" times.
 
static std::string & ltrim (std::string &str, const std::string &chars="\t\n\v\f\r ")
 
static std::string & rtrim (std::string &str, const std::string &chars="\t\n\v\f\r ")
 
static std::string & trim (std::string &str, const std::string &chars="\t\n\v\f\r ")
 
static void printLogo ()
 
static std::string getHeader ()
 
static std::string getFileHeader ()
 
static std::string getFileTrailer (const char *code)
 
static std::string getSConstruct ()
 
static void writeInt (char *buffer, int position, int value)
 
static void writeLong (char *buffer, int position, long value)
 
static void writeByte (char *buffer, int position, uint8_t value)
 

Constructor & Destructor Documentation

◆ utils()

hipo::utils::utils ( )

◆ ~utils()

hipo::utils::~utils ( )

Member Function Documentation

◆ tokenize()

void hipo::utils::tokenize ( const std::string &  str,
std::vector< std::string > &  tokens,
const std::string &  delimiters = " " 
)
static

◆ substring()

std::string hipo::utils::substring ( const std::string &  str,
const char *  start_delim,
const char *  end_delim,
int  order 
)
static

returns a substring from a string that is enclosed between start_delim and end_delim.

order variable decides which enclosed string to return as and order of occurance. 0 - first one. 1 - second one.

◆ findposition()

int hipo::utils::findposition ( const std::string &  str,
const char *  delim,
int  order 
)
static

finds postion of the dalim in the string, while skipping "order" times.

◆ ltrim()

static std::string & hipo::utils::ltrim ( std::string &  str,
const std::string &  chars = "\t\n\v\f\r " 
)
inlinestatic

◆ rtrim()

static std::string & hipo::utils::rtrim ( std::string &  str,
const std::string &  chars = "\t\n\v\f\r " 
)
inlinestatic

◆ trim()

static std::string & hipo::utils::trim ( std::string &  str,
const std::string &  chars = "\t\n\v\f\r " 
)
inlinestatic

◆ printLogo()

void hipo::utils::printLogo ( )
static

◆ getHeader()

std::string hipo::utils::getHeader ( )
static

◆ getFileHeader()

std::string hipo::utils::getFileHeader ( )
static

◆ getFileTrailer()

std::string hipo::utils::getFileTrailer ( const char *  code)
static

◆ getSConstruct()

std::string hipo::utils::getSConstruct ( )
static

◆ writeInt()

void hipo::utils::writeInt ( char *  buffer,
int  position,
int  value 
)
static

◆ writeLong()

void hipo::utils::writeLong ( char *  buffer,
int  position,
long  value 
)
static

◆ writeByte()

void hipo::utils::writeByte ( char *  buffer,
int  position,
uint8_t  value 
)
static

The documentation for this class was generated from the following files: