OpenMining  0.01
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Classes | Typedefs | Functions
utils Namespace Reference

Classes

class  Width
 
class  Height
 
class  CentrePoint
 
class  Rectangle
 

Typedefs

typedef Width< uint32_t > Width_t
 
typedef Height< uint32_t > Height_t
 
typedef CentrePoint< uint32_t,
uint32_t > 
CentrePoint_t
 
typedef CentrePoint< uint32_t,
uint32_t > 
CenterPoint_t
 
typedef Rectangle< uint32_t,
uint32_t > 
Rectangle_t
 

Functions

template<class T >
bool between (const T &val, const T &minval, const T &maxval)
 
template<class Tcmdline_keys , class Trequired_keys >
void check_argv (const Tcmdline_keys &cmdline_keys, const char *funcname, const Trequired_keys &required_keys)
 
template<class Tcontainer , class Tkey >
bool contains (Tcontainer &container, Tkey &key)
 
QString valueForKey (const QStringList &args, const char *key)
 
QString valueForKey (const QStringList &args, const char *key, const char *caller)
 
bool copy_mapped_value (const QStringList &args, const std::string &key, QString &dest)
 
bool copy_mapped_value (const QStringList &args, const char *key, string &dest)
 
bool copy_mapped_value (const QStringList &args, const std::string &key, std::string &dest)
 
bool copy_mapped_value (const QStringList &args, const char *key, int32_t &dest)
 
bool copy_mapped_value (const QStringList &args, const char *key, uint32_t &dest)
 
bool copy_mapped_value (const QStringList &args, const char *key, float &dest)
 
bool copy_mapped_value (const QStringList &args, const char *key, std::string &dest)
 
template<class T >
void Exit (T &msg, int32_t error_code)
 
template<class T >
void Exit (T &msg1, T &msg2, int32_t error_code)
 
int find_or_exit (const QStringList &args, const char *key, const char *funcname)
 
template<class Tcontainer , class Tkey >
Tcontainer::mapped_type & find_or_return_default (Tcontainer &container, const Tkey &key, Tcontainer &default_return_value)
 
QString get_mapped_value (const QStringList &args, const char *key, const char *caller)
 
template<class Tobject , class Tfilename >
bool load (Tobject &object, Tfilename filename)
 
template<class Tobject , class Tfilename >
bool load (Tobject *object, Tfilename &filename)
 
template<class Tobject >
bool load (Tobject *object, const char *filename)
 
template<class T >
percent (T numerator, T denominator)
 
template<class Tx , class Ty >
std::ostream & operator<< (std::ostream &os, const Rectangle< Tx, Ty > &rectangle)
 
template<class T >
bool same_size (const T &container1, const T &container2, const T &container3)
 
template<class T >
void save (T &object, const std::string &filename)
 
template<class T >
void save (T *object, const std::string &filename)
 
template<class T >
bool saveIfUpdated (T &object, const char *filename)
 
template<class T >
bool saveIfUpdated (T *object, const char *filename)
 
template<class Tnewval , class Toldval >
bool update_progress (Tnewval &newval, Toldval &oldval)
 
template<class T >
bool update_progress (const T &newval, T &oldval, const char *fn)
 
std::string timestamp (void)
 
bool contains_key (const QStringList &args, const char *key)
 
void csl_2_vec (QSqlQuery &query, int index, const char *separator, std::vector< int > &vec, int &val)
 
void exit_if_no_cachefile_specified (const QStringList &args, const string &key, string &dest, const string &functionName)
 
void usage ()
 
void exit_if_no_cachefile_specified (const QStringList &args, const std::string &key, std::string &dest, const std::string &functionName)
 

Typedef Documentation

typedef CentrePoint<uint32_t, uint32_t> utils::CenterPoint_t
typedef CentrePoint<uint32_t, uint32_t> utils::CentrePoint_t
typedef Height<uint32_t> utils::Height_t
typedef Rectangle<uint32_t, uint32_t> utils::Rectangle_t
typedef Width<uint32_t> utils::Width_t

Function Documentation

template<class T >
bool utils::between ( const T &  val,
const T &  minval,
const T &  maxval 
)

returns true if val >= minval and <= maxval

Parameters
val
minval
maxval
Returns
true if val >= minval and <= maxval, false otherwise
template<class Tcmdline_keys , class Trequired_keys >
void utils::check_argv ( const Tcmdline_keys &  cmdline_keys,
const char *  funcname,
const Trequired_keys &  required_keys 
)

Here is the call graph for this function:

template<class Tcontainer , class Tkey >
bool utils::contains ( Tcontainer &  container,
Tkey &  key 
)

Here is the caller graph for this function:

bool utils::contains_key ( const QStringList &  args,
const char *  key 
)

Here is the caller graph for this function:

bool utils::copy_mapped_value ( const QStringList &  args,
const char *  key,
std::string &  dest 
)
bool utils::copy_mapped_value ( const QStringList &  args,
const std::string &  key,
QString &  dest 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool utils::copy_mapped_value ( const QStringList &  args,
const char *  key,
string &  dest 
)

Here is the call graph for this function:

bool utils::copy_mapped_value ( const QStringList &  args,
const std::string &  key,
std::string &  dest 
)

Here is the call graph for this function:

bool utils::copy_mapped_value ( const QStringList &  args,
const char *  key,
int32_t &  dest 
)

Here is the call graph for this function:

bool utils::copy_mapped_value ( const QStringList &  args,
const char *  key,
uint32_t &  dest 
)

Here is the call graph for this function:

bool utils::copy_mapped_value ( const QStringList &  args,
const char *  key,
float &  dest 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void utils::csl_2_vec ( QSqlQuery &  query,
int  index,
const char *  separator,
std::vector< int > &  vec,
int &  val 
)

Here is the caller graph for this function:

template<class T >
void utils::Exit ( T &  msg,
int32_t  error_code 
)

Here is the caller graph for this function:

template<class T >
void utils::Exit ( T &  msg1,
T &  msg2,
int32_t  error_code 
)
void utils::exit_if_no_cachefile_specified ( const QStringList &  args,
const std::string &  key,
std::string &  dest,
const std::string &  functionName 
)
void utils::exit_if_no_cachefile_specified ( const QStringList &  args,
const string &  key,
string &  dest,
const string &  functionName 
)

Here is the call graph for this function:

int utils::find_or_exit ( const QStringList &  args,
const char *  key,
const char *  funcname 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Tcontainer , class Tkey >
Tcontainer::mapped_type& utils::find_or_return_default ( Tcontainer &  container,
const Tkey &  key,
Tcontainer &  default_return_value 
)

Here is the call graph for this function:

QString utils::get_mapped_value ( const QStringList &  args,
const char *  key,
const char *  caller 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Tobject , class Tfilename >
bool utils::load ( Tobject &  object,
Tfilename  filename 
)

Here is the caller graph for this function:

template<class Tobject , class Tfilename >
bool utils::load ( Tobject *  object,
Tfilename &  filename 
)

Here is the call graph for this function:

template<class Tobject >
bool utils::load ( Tobject *  object,
const char *  filename 
)

Here is the call graph for this function:

template<class Tx , class Ty >
std::ostream& utils::operator<< ( std::ostream &  os,
const Rectangle< Tx, Ty > &  rectangle 
)
template<class T >
T utils::percent ( numerator,
denominator 
)

Here is the caller graph for this function:

template<class T >
bool utils::same_size ( const T &  container1,
const T &  container2,
const T &  container3 
)

Here is the caller graph for this function:

template<class T >
void utils::save ( T &  object,
const std::string &  filename 
)

Here is the caller graph for this function:

template<class T >
void utils::save ( T *  object,
const std::string &  filename 
)

Here is the call graph for this function:

template<class T >
bool utils::saveIfUpdated ( T &  object,
const char *  filename 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
bool utils::saveIfUpdated ( T *  object,
const char *  filename 
)

Here is the call graph for this function:

std::string utils::timestamp ( void  )

Here is the caller graph for this function:

template<class Tnewval , class Toldval >
bool utils::update_progress ( Tnewval &  newval,
Toldval &  oldval 
)

Here is the caller graph for this function:

template<class T >
bool utils::update_progress ( const T &  newval,
T &  oldval,
const char *  fn 
)

Here is the call graph for this function:

void utils::usage ( )

Here is the caller graph for this function:

QString utils::valueForKey ( const QStringList &  args,
const char *  key 
)

Here is the caller graph for this function:

QString utils::valueForKey ( const QStringList &  args,
const char *  key,
const char *  caller 
)

Here is the caller graph for this function: