MRPT  2.0.4
Classes | Modules | Functions
[mrpt-system]

Detailed Description

An OS abstraction layer and other miscellaneous functionality: filesystem, date and time, memory handling and much more.

Library `mrpt-system`

[New in MRPT 2.0.0]

This C++ library is part of MRPT and can be installed in Debian-based systems with:

    sudo apt install libmrpt-system-dev

See: Using MRPT from your CMake project

Refer to the list of submodules for details.

Name-based argument passing

See the structure mrpt::system::TParameters.

Collaboration diagram for [mrpt-system]:

Classes

class  mrpt::system::CConsoleRedirector
 By creating an object of this class, all the output to std::cout (and std::cerr) will be redirected to a text file, and optionally also shown on the console. More...
 
class  mrpt::system::CControlledRateTimer
 A class for calling sleep() in a loop, such that the amount of sleep time will be computed to make the loop run at the desired rate (in Hz). More...
 
class  mrpt::system::CDirectoryExplorer
 This class allows the enumeration of the files/directories that exist into a given path. More...
 
class  mrpt::system::CFileSystemWatcher
 This class subscribes to notifications of file system changes, thus it can be used to efficiently stay informed about changes in a directory tree. More...
 
class  mrpt::system::CObservable
 Inherit from this class for those objects capable of being observed by a CObserver class. More...
 
class  mrpt::system::CObserver
 Inherit from this class to get notified about events from any CObservable object after subscribing to it. More...
 
class  mrpt::system::COutputLogger
 Versatile class for consistent logging and management of output messages. More...
 
class  mrpt::system::CRateTimer
 A class for calling sleep() in a loop, such that the amount of sleep time will be computed to make the loop run at the desired rate (in Hz). More...
 
class  mrpt::system::CTicTac
 A high-performance stopwatch, with typical resolution of nanoseconds. More...
 
class  mrpt::system::CTimeLogger
 A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats. More...
 
struct  mrpt::system::CTimeLoggerEntry
 A safe way to call enter() and leave() of a mrpt::system::CTimeLogger upon construction and destruction of this auxiliary object, making sure that leave() will be called upon exceptions, etc. More...
 
struct  mrpt::system::CTimeLoggerSaveAtDtor
 A helper class to save CSV stats upon self destruction, for example, at the end of a program run. More...
 
class  mrpt::system::mrptEvent
 The basic event type for the observer-observable pattern in MRPT. More...
 
class  mrpt::system::mrptEventOnDestroy
 An event sent by any CObservable object (automatically) just before being destroyed and telling its observers to unsubscribe. More...
 
struct  mrpt::system::TParameters< T >
 For usage when passing a dynamic number of (numeric) arguments to a function, by name. More...
 

Modules

 Time and date functions.
 Header: #include <mrpt/system/datetime.h>.
 
 Directories, files, and file names
 Header: #include <mrpt/system/filesystem.h>.
 
 OS and compiler abstraction
 Header: #include <mrpt/system/os.h>.
 
 CRC functions
 Header: #include <mrpt/system/crc.h>.
 
 MD5 functions
 Header: #include <mrpt/system/md5.h>.
 
 Memory utilities
 Header: #include <mrpt/system/memory.h>.
 
 Scheduler helpers (in #include <mrpt/system/scheduler.h>)
 
 String management and utilities
 Header: #include <mrpt/system/string_utils.h>.
 

Functions

void mrpt::system::thread_name (const std::string &name, std::thread &theThread)
 Sets the name of the given thread; useful for debuggers. More...
 
void mrpt::system::thread_name (const std::string &name)
 Sets the name of the current thread; useful for debuggers. More...
 
std::string mrpt::system::thread_name (std::thread &theThread)
 Gets the name of the given thread; useful for debuggers. More...
 
std::string mrpt::system::thread_name ()
 Gets the name of the current thread; useful for debuggers. More...
 

Function Documentation

◆ thread_name() [1/4]

void mrpt::system::thread_name ( const std::string &  name,
std::thread &  theThread 
)

Sets the name of the given thread; useful for debuggers.

Note
New in MRPT 2.0.4

Definition at line 63 of file thread_name.cpp.

Referenced by mrpt::gui::WxSubsystem::createOneInstanceMainThread(), mrpt::apps::ICP_SLAM_App_Live::impl_initialize(), mrpt::hwdrivers::CCameraSensor::initialize(), mrpt::apps::RawlogGrabberApp::runImpl(), TEST(), and testerThread().

Here is the caller graph for this function:

◆ thread_name() [2/4]

void mrpt::system::thread_name ( const std::string &  name)

Sets the name of the current thread; useful for debuggers.

Note
New in MRPT 2.0.4

Definition at line 52 of file thread_name.cpp.

◆ thread_name() [3/4]

std::string mrpt::system::thread_name ( std::thread &  theThread)

Gets the name of the given thread; useful for debuggers.

Note
New in MRPT 2.0.4

Definition at line 106 of file thread_name.cpp.

◆ thread_name() [4/4]

std::string mrpt::system::thread_name ( )

Gets the name of the current thread; useful for debuggers.

Note
New in MRPT 2.0.4

Definition at line 87 of file thread_name.cpp.




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020