ifw-core  4.1.0-pre1
Namespaces | Macros | Functions
tools.hpp File Reference
#include <limits.h>
#include <stdarg.h>
#include <string>
#include <map>
#include <list>
#include <fstream>
#include <variant>
#include <core/utils/base/base.hpp>

Go to the source code of this file.

Namespaces

 ifw
 
 core
 
 core::utils
 
 core::utils::base
 
 core::utils::base::testutils
 

Macros

#define IFW_LOCATION
 

Functions

std::string ifw::Write (const char *format,...)
 Create formatted string, return formatted string (C formatting convention). More...
 
std::string core::utils::base::ResolvePath (const std::string &filename)
 Resolve the filename if it contains env. variables, "~" and relative paths. More...
 
std::string core::utils::base::GenUniqueId (const std::string &prefix="")
 Generate a unique UUID based ID. A prefix may be prepended, if requested. More...
 
template<class TYPE >
void core::utils::base::CleanVector (const std::vector< TYPE > &vect, const TYPE &pattern, std::vector< TYPE > &clean_vect)
 Remove elements from list, which are equal to "pattern". More...
 
template<class TYPE >
void core::utils::base::CheckRange (const std::string &par, TYPE value, TYPE lower_limit, TYPE upper_limit)
 Check if a value is within a given range. More...
 
template<class TYPE >
void core::utils::base::CheckRange (const std::string &par, const TYPE &value, std::vector< TYPE > &valid_values)
 Check if a value is defined in a set. More...
 
template<class TYPE >
int32_t core::utils::base::ElInVector (const std::vector< TYPE > &vect, const TYPE &value)
 Check for specific element in the list. Return index if found, otherwise -1. More...
 
template<class TYPE >
std::string core::utils::base::DumpVector (const std::vector< TYPE > &vector, const std::string &separator="\n")
 Dump contents of a list into a string buffer. More...
 
template<class MAP_TYPE >
bool core::utils::base::ElInMap (const std::string &key, const MAP_TYPE &map)
 Check if a given key is contained in an STL map. More...
 
std::string core::utils::base::testutils::GetResDir (const std::string &module_path, const std::string &test_res_dir)
 Derives the "resource" directory from the current working point. More...
 
void core::utils::base::testutils::SetRootEnvVars (const std::string &module_path, const std::string &test_res_dir, const std::vector< std::string > &cfgpath_dirs)
 Set the root environment variables: CFGPATH, INTROOT, DATAROOT. More...
 
void IFW_DEBUG (const char *format,...)
 Print out a temporary debug log. These kind of logs should be removed from the code. More...
 

Macro Definition Documentation

◆ IFW_LOCATION

#define IFW_LOCATION
Value:
{\
std::string(__FILE__), \
std::string(__FUNCTION__), \
std::to_string(__LINE__)}

Function Documentation

◆ IFW_DEBUG()

void IFW_DEBUG ( const char *  format,
  ... 
)

Print out a temporary debug log. These kind of logs should be removed from the code.