1 #ifndef COLIBRICOMMON_H
2 #define COLIBRICOMMON_H
23 const unsigned long long B32 = pow(2,32);
24 const uint32_t
bitmask[] = { 1, 1<<1,1<<2,1<<3,1<<4,1<<5,1<<6,1<<7,1<<8,1<<9,1<<10,1<<11,1<<12,1<<13,1<<14,1<<15,1<<16,1<<17,1<<18,1<<19,1<<20,1<<21,1<<22,1<<23,1<<24,1<<25,1<<26,1<<27,1<<28,1<<29,1<<30 };
26 std::string
trim(
const std::string &t,
const std::string &ws);
28 bool strip_extension(std::string& filename,
const std::string extension);
30 double listsum(
const std::vector<double> & l);
32 std::vector<std::string> &
split(
const std::string &s,
char delim, std::vector<std::string> &elems);
33 std::vector<std::string>
split(
const std::string &s,
char delim);
36 virtual const char* what()
const throw()
38 return "Colibri internal error";
44 virtual const char* what()
const throw()
46 return "Colibri KeyError";
std::string trim(const std::string &t, const std::string &ws)
Definition: common.cpp:8
const unsigned long long B32
Definition: common.h:23
std::string get_extension(const std::string &filename)
Definition: common.cpp:19
bool strip_extension(std::string &filename, const std::string extension)
Definition: common.cpp:25
void orderedinsert(std::list< double > &l, double value)
Definition: common.cpp:56
double listproduct(const std::vector< double > &l)
Definition: common.cpp:38
const uint32_t bitmask[]
Definition: common.h:24
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
Definition: common.cpp:67
double listsum(const std::vector< double > &l)
Definition: common.cpp:48