Main MRPT website > C++ reference for MRPT 1.9.9
Namespaces | Enumerations | Functions
os.h File Reference
#include <mrpt/config.h>
#include <cstdlib>
#include <cstdarg>
#include <cstdint>
#include <mrpt/utils/mrpt_macros.h>

Go to the source code of this file.

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::system
 This namespace provides a OS-independent interface to many useful functions: filenames manipulation, time and date, string parsing, file I/O, threading, memory allocation, etc.
 
 mrpt::system::os
 This namespace provides a OS-independent interface to low-level functions.
 

Enumerations

enum  mrpt::system::TConsoleColor { mrpt::system::CONCOL_NORMAL = 0, mrpt::system::CONCOL_BLUE = 1, mrpt::system::CONCOL_GREEN = 2, mrpt::system::CONCOL_RED = 4 }
 For use in setConsoleColor. More...
 

Functions

int mrpt::system::os::sprintf (char *buf, size_t bufSize, const char *format,...) noexcept MRPT_printf_format_check(3
 An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
int int mrpt::system::os::vsprintf (char *buf, size_t bufSize, const char *format, va_list args) noexcept
 An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
int mrpt::system::os::vsnprintf (char *buf, size_t bufSize, const char *format, va_list args) noexcept
 An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
FILE * mrpt::system::os::fopen (const char *fileName, const char *mode) noexcept
 An OS-independent version of fopen. More...
 
FILE * mrpt::system::os::fopen (const std::string &fileName, const char *mode) noexcept
 An OS-independent version of fopen (std::string version) More...
 
int mrpt::system::os::fprintf (FILE *fil, const char *format,...) noexcept MRPT_printf_format_check(2
 An OS-independent version of fprintf. More...
 
int void mrpt::system::os::fclose (FILE *f)
 An OS-independent version of fclose. More...
 
char * mrpt::system::os::strcat (char *dest, size_t destSize, const char *source) noexcept
 An OS-independent version of strcat. More...
 
char * mrpt::system::os::strcpy (char *dest, size_t destSize, const char *source) noexcept
 An OS-independent version of strcpy. More...
 
int mrpt::system::os::_strcmp (const char *str1, const char *str2) noexcept
 An OS-independent version of strcmp. More...
 
int mrpt::system::os::_strcmpi (const char *str1, const char *str2) noexcept
 An OS-independent version of strcmpi. More...
 
int mrpt::system::os::_strncmp (const char *str, const char *subStr, size_t count) noexcept
 An OS-independent version of strncmp. More...
 
int mrpt::system::os::_strnicmp (const char *str, const char *subStr, size_t count) noexcept
 An OS-independent version of strnicmp. More...
 
int64_t mrpt::system::os::_strtoll (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoll. More...
 
uint64_t mrpt::system::os::_strtoull (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoull. More...
 
time_t mrpt::system::os::timegm (struct tm *tm)
 An OS-independent version of timegm (which is not present in all compilers): converts a time structure into an UTM time_t. More...
 
void mrpt::system::os::memcpy (void *dest, size_t destSize, const void *src, size_t copyCount) noexcept
 An OS and compiler independent version of "memcpy". More...
 
int mrpt::system::os::getch () noexcept
 An OS-independent version of getch, which waits until a key is pushed. More...
 
bool mrpt::system::os::kbhit () noexcept
 An OS-independent version of kbhit, which returns true if a key has been pushed. More...
 
void mrpt::system::pause (const std::string &msg=std::string("Press any key to continue...")) noexcept
 Shows the message "Press any key to continue" (or other custom message) to the current standard output and returns when a key is pressed. More...
 
void mrpt::system::clearConsole ()
 Clears the console window. More...
 
std::string mrpt::system::MRPT_getCompilationDate ()
 Returns the MRPT source code timestamp, according to the Reproducible-Builds specifications: https://reproducible-builds.org/specs/source-date-epoch/. More...
 
std::string mrpt::system::MRPT_getVersion ()
 Returns a string describing the MRPT version. More...
 
const std::stringmrpt::system::getMRPTLicense ()
 Returns a const ref to a text with the same text that appears at the beginning of each MRPT file (useful for displaying the License text in GUIs) More...
 
std::string mrpt::system::find_mrpt_shared_dir ()
 Finds the "[MRPT]/share/mrpt/" directory, if available in the system. More...
 
void mrpt::system::setConsoleColor (TConsoleColor color, bool changeStdErr=false)
 Changes the text color in the console for the text written from now on. More...
 
int mrpt::system::executeCommand (const std::string &command, std::string *output=NULL, const std::string &mode="r")
 Execute Generic Shell Command. More...
 
bool mrpt::system::launchProcess (const std::string &command)
 Executes the given command (which may contain a program + arguments), and waits until it finishes. More...
 



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019