DDS  ver. 3.4
Classes | Namespaces | Macros | Functions
SysHelper.h File Reference
#include <fcntl.h>
#include <limits.h>
#include <netdb.h>
#include <pwd.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <typeinfo>
#include <boost/asio.hpp>
#include "ErrorCode.h"
#include "MiscUtils.h"
#include "def.h"

Go to the source code of this file.

Classes

class  MiscCommon::CMutex
 A Mutex wrapper. Based on pthread calls. More...
 
class  MiscCommon::smart_mutex
 A smart CMutex helper. More...
 

Namespaces

 MiscCommon
 Miscellaneous functions and helpers are located here.
 

Macros

#define HOST_NAME_MAX   64
 

Functions

void MiscCommon::get_cuser_name (std::string *_RetVal)
 The function returns current user name. More...
 
void MiscCommon::get_homedir (uid_t _uid, std::string *_RetVal)
 The function returns home directory path of the given user. More...
 
void MiscCommon::get_homedir (const char *_UName, std::string *_RetVal)
 The function returns home directory path of the given user. More...
 
void MiscCommon::get_cuser_homedir (std::string *_RetVal)
 The function returns home directory path of the current user. More...
 
template<class _T >
void MiscCommon::smart_path (_T *_Path)
 The function extends any environment variable found in the give path to its value. More...
 
template<class _T >
_T MiscCommon::smart_path (const _T &_Path)
 
void MiscCommon::get_hostname (std::string *_RetVal)
 The function is used to access the host name (with FCDN) of the current processor. More...
 
unsigned long MiscCommon::gettid ()
 A system helper, which helps to get a Thread ID of the current thread. More...
 
char * MiscCommon::__cxa_demangle (const char *mangled, char *buf, size_t *len, int *status)
 demangling C++ symbols. More...
 
std::string MiscCommon::demangle (const std::type_info &ti)
 
void MiscCommon::get_env (const std::string &_EnvVarName, std::string *_RetVal)
 
off_t MiscCommon::file_size (const std::string &_FileName)
 The function file_size() retrieves file size of a given file. More...
 
bool MiscCommon::file_exists (const std::string &_FileName)
 
size_t MiscCommon::getNCores ()
 the function returns a number of available CPU cores More...
 

Macro Definition Documentation

◆ HOST_NAME_MAX

#define HOST_NAME_MAX   64