Main MRPT website > C++ reference
MRPT logo
Namespaces | Enumerations | Functions
OS and compiler abstraction

Detailed Description

Collaboration diagram for OS and compiler abstraction:

Namespaces

 mrpt::system::os
 This namespace provides a OS-independent interface to low-level functions.
 
 mrpt::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...
 
enum  mrpt::mrpt::system::TConsoleColor { mrpt::mrpt::system::CONCOL_NORMAL = 0, mrpt::mrpt::system::CONCOL_BLUE = 1, mrpt::mrpt::system::CONCOL_GREEN = 2, mrpt::mrpt::system::CONCOL_RED = 4 }
 For use in setConsoleColor. More...
 

Functions

int BASE_IMPEXP mrpt::system::os::sprintf (char *buf, size_t bufSize, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(3
 An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
int BASE_IMPEXP int BASE_IMPEXP mrpt::system::os::vsprintf (char *buf, size_t bufSize, const char *format, va_list args) MRPT_NO_THROWS
 An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
int BASE_IMPEXP mrpt::system::os::vsnprintf (char *buf, size_t bufSize, const char *format, va_list args) MRPT_NO_THROWS
 An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
FILE BASE_IMPEXPmrpt::system::os::fopen (const char *fileName, const char *mode) MRPT_NO_THROWS
 An OS-independent version of fopen. More...
 
FILE BASE_IMPEXPmrpt::system::os::fopen (const std::string &fileName, const char *mode) MRPT_NO_THROWS
 An OS-independent version of fopen (std::string version) More...
 
int BASE_IMPEXP mrpt::system::os::fprintf (FILE *fil, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(2
 An OS-independent version of fprintf. More...
 
int BASE_IMPEXP void BASE_IMPEXP mrpt::system::os::fclose (FILE *f)
 An OS-independent version of fscanf. More...
 
char BASE_IMPEXPmrpt::system::os::strcat (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS
 An OS-independent version of strcat. More...
 
char BASE_IMPEXPmrpt::system::os::strcpy (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS
 An OS-independent version of strcpy. More...
 
int BASE_IMPEXP mrpt::system::os::_strcmp (const char *str1, const char *str2) MRPT_NO_THROWS
 An OS-independent version of strcmp. More...
 
int BASE_IMPEXP mrpt::system::os::_strcmpi (const char *str1, const char *str2) MRPT_NO_THROWS
 An OS-independent version of strcmpi. More...
 
int BASE_IMPEXP mrpt::system::os::_strncmp (const char *str, const char *subStr, size_t count) MRPT_NO_THROWS
 An OS-independent version of strncmp. More...
 
int BASE_IMPEXP mrpt::system::os::_strnicmp (const char *str, const char *subStr, size_t count) MRPT_NO_THROWS
 An OS-independent version of strnicmp. More...
 
int64_t BASE_IMPEXP mrpt::system::os::_strtoll (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoll. More...
 
uint64_t BASE_IMPEXP mrpt::system::os::_strtoull (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoull. More...
 
time_t BASE_IMPEXP 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 BASE_IMPEXP mrpt::system::os::memcpy (void *dest, size_t destSize, const void *src, size_t copyCount) MRPT_NO_THROWS
 An OS and compiler independent version of "memcpy". More...
 
int BASE_IMPEXP mrpt::system::os::getch () MRPT_NO_THROWS
 An OS-independent version of getch, which waits until a key is pushed. More...
 
bool BASE_IMPEXP mrpt::system::os::kbhit () MRPT_NO_THROWS
 An OS-independent version of kbhit, which returns true if a key has been pushed. More...
 
void BASE_IMPEXP mrpt::system::pause (const std::string &msg=std::string("Press any key to continue...")) MRPT_NO_THROWS
 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 BASE_IMPEXP mrpt::system::clearConsole ()
 Clears the console window. More...
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< float > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 A useful function for debuging, which saves a std::vector into a text file (compat. More...
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< double > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< int > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< size_t > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
template<class Derived >
bool mrpt::system::vectorToTextFile (const Eigen::MatrixBase< Derived > &vec, const std::string &fileName)
 
bool BASE_IMPEXP mrpt::system::vectorFromTextFile (std::vector< double > &vec, const std::string &fileName, const bool byRows=false)
 Load a std::vector from a text file (compat. More...
 
bool BASE_IMPEXP mrpt::system::vectorToBinaryFile (const vector_byte &vec, const std::string &fileName)
 Saves a vector directly as a binary dump to a file: More...
 
bool BASE_IMPEXP mrpt::system::loadBinaryFile (vector_byte &out_data, const std::string &fileName)
 Loads a entire file as a vector of bytes. More...
 
std::string BASE_IMPEXP mrpt::system::MRPT_getCompilationDate ()
 Returns the MRPT compilation date. More...
 
std::string BASE_IMPEXP mrpt::system::MRPT_getVersion ()
 Returns a string describing the MRPT version including the SVN number. More...
 
const std::string BASE_IMPEXPmrpt::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...
 
void BASE_IMPEXP mrpt::system::registerFatalExceptionHandlers ()
 Call this to register handlers for fatal erros (memory access,etc) that show useful debug information (It is called automatically normally, no need for the user to explicitly call this method.). More...
 
std::string BASE_IMPEXP mrpt::system::stack_trace (bool calling_from_exception=false)
 Dumps the current program stack with detailed information of source files and lines. More...
 
void BASE_IMPEXP mrpt::system::breakpoint (const std::string &exception_msg)
 Only when built in debug (with _DEBUG), this function will be called just before raising any MRPT exception, so the user can conveniently put a breakpoint here to explore the call stack, etc. More...
 
void BASE_IMPEXP mrpt::system::setConsoleColor (TConsoleColor color, bool changeStdErr=false)
 Changes the text color in the console for the text written from now on. More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::sprintf (char *buf, size_t bufSize, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(3
 An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
int BASE_IMPEXP int BASE_IMPEXP mrpt::mrpt::system::os::vsprintf (char *buf, size_t bufSize, const char *format, va_list args) MRPT_NO_THROWS
 An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::vsnprintf (char *buf, size_t bufSize, const char *format, va_list args) MRPT_NO_THROWS
 An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers) More...
 
FILE BASE_IMPEXPmrpt::mrpt::system::os::fopen (const char *fileName, const char *mode) MRPT_NO_THROWS
 An OS-independent version of fopen. More...
 
FILE BASE_IMPEXPmrpt::mrpt::system::os::fopen (const std::string &fileName, const char *mode) MRPT_NO_THROWS
 An OS-independent version of fopen (std::string version) More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::fprintf (FILE *fil, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(2
 An OS-independent version of fprintf. More...
 
int BASE_IMPEXP void BASE_IMPEXP mrpt::mrpt::system::os::fclose (FILE *f)
 An OS-independent version of fscanf. More...
 
char BASE_IMPEXPmrpt::mrpt::system::os::strcat (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS
 An OS-independent version of strcat. More...
 
char BASE_IMPEXPmrpt::mrpt::system::os::strcpy (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS
 An OS-independent version of strcpy. More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::_strcmp (const char *str1, const char *str2) MRPT_NO_THROWS
 An OS-independent version of strcmp. More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::_strcmpi (const char *str1, const char *str2) MRPT_NO_THROWS
 An OS-independent version of strcmpi. More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::_strncmp (const char *str, const char *subStr, size_t count) MRPT_NO_THROWS
 An OS-independent version of strncmp. More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::_strnicmp (const char *str, const char *subStr, size_t count) MRPT_NO_THROWS
 An OS-independent version of strnicmp. More...
 
int64_t BASE_IMPEXP mrpt::mrpt::system::os::_strtoll (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoll. More...
 
uint64_t BASE_IMPEXP mrpt::mrpt::system::os::_strtoull (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoull. More...
 
time_t BASE_IMPEXP mrpt::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 BASE_IMPEXP mrpt::mrpt::system::os::memcpy (void *dest, size_t destSize, const void *src, size_t copyCount) MRPT_NO_THROWS
 An OS and compiler independent version of "memcpy". More...
 
int BASE_IMPEXP mrpt::mrpt::system::os::getch () MRPT_NO_THROWS
 An OS-independent version of getch, which waits until a key is pushed. More...
 
bool BASE_IMPEXP mrpt::mrpt::system::os::kbhit () MRPT_NO_THROWS
 An OS-independent version of kbhit, which returns true if a key has been pushed. More...
 
void BASE_IMPEXP mrpt::mrpt::system::pause (const std::string &msg=std::string("Press any key to continue...")) MRPT_NO_THROWS
 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 BASE_IMPEXP mrpt::mrpt::system::clearConsole ()
 Clears the console window. More...
 
bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile (const std::vector< float > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 A useful function for debuging, which saves a std::vector into a text file (compat. More...
 
bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile (const std::vector< double > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile (const std::vector< int > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile (const std::vector< size_t > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
template<class Derived >
bool mrpt::mrpt::system::vectorToTextFile (const Eigen::MatrixBase< Derived > &vec, const std::string &fileName)
 
bool BASE_IMPEXP mrpt::mrpt::system::vectorFromTextFile (std::vector< double > &vec, const std::string &fileName, const bool byRows=false)
 Load a std::vector from a text file (compat. More...
 
bool BASE_IMPEXP mrpt::mrpt::system::vectorToBinaryFile (const vector_byte &vec, const std::string &fileName)
 Saves a vector directly as a binary dump to a file: More...
 
bool BASE_IMPEXP mrpt::mrpt::system::loadBinaryFile (vector_byte &out_data, const std::string &fileName)
 Loads a entire file as a vector of bytes. More...
 
std::string BASE_IMPEXP mrpt::mrpt::system::MRPT_getCompilationDate ()
 Returns the MRPT compilation date. More...
 
std::string BASE_IMPEXP mrpt::mrpt::system::MRPT_getVersion ()
 Returns a string describing the MRPT version including the SVN number. More...
 
const std::string BASE_IMPEXPmrpt::mrpt::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...
 
void BASE_IMPEXP mrpt::mrpt::system::registerFatalExceptionHandlers ()
 Call this to register handlers for fatal erros (memory access,etc) that show useful debug information (It is called automatically normally, no need for the user to explicitly call this method.). More...
 
std::string BASE_IMPEXP mrpt::mrpt::system::stack_trace (bool calling_from_exception=false)
 Dumps the current program stack with detailed information of source files and lines. More...
 
void BASE_IMPEXP mrpt::mrpt::system::breakpoint (const std::string &exception_msg)
 Only when built in debug (with _DEBUG), this function will be called just before raising any MRPT exception, so the user can conveniently put a breakpoint here to explore the call stack, etc. More...
 
void BASE_IMPEXP mrpt::mrpt::system::setConsoleColor (TConsoleColor color, bool changeStdErr=false)
 Changes the text color in the console for the text written from now on. More...
 

Enumeration Type Documentation

◆ TConsoleColor [1/2]

For use in setConsoleColor.

Enumerator
CONCOL_NORMAL 
CONCOL_BLUE 
CONCOL_GREEN 
CONCOL_RED 

Definition at line 222 of file os.h.

◆ TConsoleColor [2/2]

For use in setConsoleColor.

Enumerator
CONCOL_NORMAL 
CONCOL_BLUE 
CONCOL_GREEN 
CONCOL_RED 

Definition at line 222 of file CColouredPointsMap.h.

Function Documentation

◆ _strcmp() [1/2]

int BASE_IMPEXP mrpt::system::os::_strcmp ( const char *  str1,
const char *  str2 
)

An OS-independent version of strcmp.

Returns
It will return 0 when both strings are equal, casi sensitive.

◆ _strcmp() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::_strcmp ( const char *  str1,
const char *  str2 
)

An OS-independent version of strcmp.

Returns
It will return 0 when both strings are equal, casi sensitive.

◆ _strcmpi() [1/2]

int BASE_IMPEXP mrpt::system::os::_strcmpi ( const char *  str1,
const char *  str2 
)

An OS-independent version of strcmpi.

Returns
It will return 0 when both strings are equal, casi insensitive.

Referenced by mrpt::utils::CMHPropertiesValuesList::getElemental(), and mrpt::utils::CMHPropertiesValuesList::setElemental().

◆ _strcmpi() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::_strcmpi ( const char *  str1,
const char *  str2 
)

An OS-independent version of strcmpi.

Returns
It will return 0 when both strings are equal, casi insensitive.

◆ _strncmp() [1/2]

int BASE_IMPEXP mrpt::system::os::_strncmp ( const char *  str,
const char *  subStr,
size_t  count 
)

An OS-independent version of strncmp.

Returns
It will return 0 when both strings are equal, casi sensitive.

◆ _strncmp() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::_strncmp ( const char *  str,
const char *  subStr,
size_t  count 
)

An OS-independent version of strncmp.

Returns
It will return 0 when both strings are equal, casi sensitive.

◆ _strnicmp() [1/2]

int BASE_IMPEXP mrpt::system::os::_strnicmp ( const char *  str,
const char *  subStr,
size_t  count 
)

An OS-independent version of strnicmp.

Returns
It will return 0 when both strings are equal, casi insensitive.

◆ _strnicmp() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::_strnicmp ( const char *  str,
const char *  subStr,
size_t  count 
)

An OS-independent version of strnicmp.

Returns
It will return 0 when both strings are equal, casi insensitive.

◆ _strtoll() [1/2]

int64_t BASE_IMPEXP mrpt::mrpt::system::os::_strtoll ( const char *  nptr,
char **  endptr,
int  base 
)

An OS-independent version of strtoll.

◆ _strtoll() [2/2]

int64_t BASE_IMPEXP mrpt::system::os::_strtoll ( const char *  nptr,
char **  endptr,
int  base 
)

An OS-independent version of strtoll.

◆ _strtoull() [1/2]

uint64_t BASE_IMPEXP mrpt::mrpt::system::os::_strtoull ( const char *  nptr,
char **  endptr,
int  base 
)

An OS-independent version of strtoull.

◆ _strtoull() [2/2]

uint64_t BASE_IMPEXP mrpt::system::os::_strtoull ( const char *  nptr,
char **  endptr,
int  base 
)

An OS-independent version of strtoull.

◆ breakpoint() [1/2]

void BASE_IMPEXP mrpt::system::breakpoint ( const std::string &  exception_msg)

Only when built in debug (with _DEBUG), this function will be called just before raising any MRPT exception, so the user can conveniently put a breakpoint here to explore the call stack, etc.

◆ breakpoint() [2/2]

void BASE_IMPEXP mrpt::mrpt::system::breakpoint ( const std::string &  exception_msg)

Only when built in debug (with _DEBUG), this function will be called just before raising any MRPT exception, so the user can conveniently put a breakpoint here to explore the call stack, etc.

◆ clearConsole() [1/2]

void BASE_IMPEXP mrpt::system::clearConsole ( )

Clears the console window.

◆ clearConsole() [2/2]

void BASE_IMPEXP mrpt::mrpt::system::clearConsole ( )

Clears the console window.

◆ fclose() [1/2]

int BASE_IMPEXP void BASE_IMPEXP mrpt::system::os::fclose ( FILE *  f)

An OS-independent version of fscanf.

Returns
The number of fields correctly assignedAn OS-independent version of fclose.
Exceptions
std::exceptionOn trying to close a NULL file descriptor.

Referenced by mrpt::math::saveEigenSparseTripletsToFile(), and mrpt::utils::CDynamicGrid< TRandomFieldCell >::saveToTextFile().

◆ fclose() [2/2]

int BASE_IMPEXP void BASE_IMPEXP mrpt::mrpt::system::os::fclose ( FILE *  f)

An OS-independent version of fscanf.

Returns
The number of fields correctly assignedAn OS-independent version of fclose.
Exceptions
std::exceptionOn trying to close a NULL file descriptor.

◆ fopen() [1/4]

FILE BASE_IMPEXP* mrpt::mrpt::system::os::fopen ( const char *  fileName,
const char *  mode 
)

An OS-independent version of fopen.

Returns
It will always return NULL on any error.

◆ fopen() [2/4]

FILE BASE_IMPEXP* mrpt::system::os::fopen ( const char *  fileName,
const char *  mode 
)

An OS-independent version of fopen.

Returns
It will always return NULL on any error.

Referenced by mrpt::math::saveEigenSparseTripletsToFile(), and mrpt::utils::CDynamicGrid< TRandomFieldCell >::saveToTextFile().

◆ fopen() [3/4]

FILE BASE_IMPEXP* mrpt::mrpt::system::os::fopen ( const std::string &  fileName,
const char *  mode 
)

An OS-independent version of fopen (std::string version)

Returns
It will always return NULL on any error.

◆ fopen() [4/4]

FILE BASE_IMPEXP* mrpt::system::os::fopen ( const std::string &  fileName,
const char *  mode 
)

An OS-independent version of fopen (std::string version)

Returns
It will always return NULL on any error.

◆ fprintf() [1/2]

int BASE_IMPEXP mrpt::mrpt::system::os::fprintf ( FILE *  fil,
const char *  format,
  ... 
)

An OS-independent version of fprintf.

◆ fprintf() [2/2]

int BASE_IMPEXP mrpt::system::os::fprintf ( FILE *  fil,
const char *  format,
  ... 
)

◆ getch() [1/2]

int BASE_IMPEXP mrpt::system::os::getch ( )

An OS-independent version of getch, which waits until a key is pushed.

Returns
The pushed key code

◆ getch() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::getch ( )

An OS-independent version of getch, which waits until a key is pushed.

Returns
The pushed key code

◆ getMRPTLicense() [1/2]

const std::string BASE_IMPEXP& mrpt::mrpt::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)

◆ getMRPTLicense() [2/2]

const std::string BASE_IMPEXP& mrpt::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)

◆ kbhit() [1/2]

bool BASE_IMPEXP mrpt::system::os::kbhit ( )

An OS-independent version of kbhit, which returns true if a key has been pushed.

◆ kbhit() [2/2]

bool BASE_IMPEXP mrpt::mrpt::system::os::kbhit ( )

An OS-independent version of kbhit, which returns true if a key has been pushed.

◆ loadBinaryFile() [1/2]

bool BASE_IMPEXP mrpt::mrpt::system::loadBinaryFile ( vector_byte out_data,
const std::string &  fileName 
)

Loads a entire file as a vector of bytes.

Returns
Returns false on any error, true on everything OK.
See also
vectorToBinaryFile

◆ loadBinaryFile() [2/2]

bool BASE_IMPEXP mrpt::system::loadBinaryFile ( vector_byte out_data,
const std::string &  fileName 
)

Loads a entire file as a vector of bytes.

Returns
Returns false on any error, true on everything OK.
See also
vectorToBinaryFile

◆ memcpy() [1/2]

void BASE_IMPEXP mrpt::system::os::memcpy ( void *  dest,
size_t  destSize,
const void *  src,
size_t  copyCount 
)

◆ memcpy() [2/2]

void BASE_IMPEXP mrpt::mrpt::system::os::memcpy ( void *  dest,
size_t  destSize,
const void *  src,
size_t  copyCount 
)

An OS and compiler independent version of "memcpy".

◆ MRPT_getCompilationDate() [1/2]

std::string BASE_IMPEXP mrpt::mrpt::system::MRPT_getCompilationDate ( )

Returns the MRPT compilation date.

◆ MRPT_getCompilationDate() [2/2]

std::string BASE_IMPEXP mrpt::system::MRPT_getCompilationDate ( )

Returns the MRPT compilation date.

◆ MRPT_getVersion() [1/2]

std::string BASE_IMPEXP mrpt::mrpt::system::MRPT_getVersion ( )

Returns a string describing the MRPT version including the SVN number.

◆ MRPT_getVersion() [2/2]

std::string BASE_IMPEXP mrpt::system::MRPT_getVersion ( )

Returns a string describing the MRPT version including the SVN number.

◆ pause() [1/2]

void BASE_IMPEXP mrpt::system::pause ( const std::string &  msg = std::string("Press any key to continue..."))

Shows the message "Press any key to continue" (or other custom message) to the current standard output and returns when a key is pressed.

◆ pause() [2/2]

void BASE_IMPEXP mrpt::mrpt::system::pause ( const std::string &  msg = std::string("Press any key to continue..."))

Shows the message "Press any key to continue" (or other custom message) to the current standard output and returns when a key is pressed.

Referenced by mrpt::srba::RbaEngine< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::optimize_edges().

◆ registerFatalExceptionHandlers() [1/2]

void BASE_IMPEXP mrpt::system::registerFatalExceptionHandlers ( )

Call this to register handlers for fatal erros (memory access,etc) that show useful debug information (It is called automatically normally, no need for the user to explicitly call this method.).

◆ registerFatalExceptionHandlers() [2/2]

void BASE_IMPEXP mrpt::mrpt::system::registerFatalExceptionHandlers ( )

Call this to register handlers for fatal erros (memory access,etc) that show useful debug information (It is called automatically normally, no need for the user to explicitly call this method.).

◆ setConsoleColor() [1/2]

void BASE_IMPEXP mrpt::system::setConsoleColor ( TConsoleColor  color,
bool  changeStdErr = false 
)

Changes the text color in the console for the text written from now on.

The parameter "color" can be any value in TConsoleColor.

By default the color of "cout" is changed, unless changeStdErr=true, in which case "cerr" is changed.

◆ setConsoleColor() [2/2]

void BASE_IMPEXP mrpt::mrpt::system::setConsoleColor ( TConsoleColor  color,
bool  changeStdErr = false 
)

Changes the text color in the console for the text written from now on.

The parameter "color" can be any value in TConsoleColor.

By default the color of "cout" is changed, unless changeStdErr=true, in which case "cerr" is changed.

◆ sprintf() [1/2]

int BASE_IMPEXP mrpt::system::os::sprintf ( char *  buf,
size_t  bufSize,
const char *  format,
  ... 
)

An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers)

See also
utils::format

◆ sprintf() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::sprintf ( char *  buf,
size_t  bufSize,
const char *  format,
  ... 
)

An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers)

See also
utils::format

Referenced by mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints().

◆ stack_trace() [1/2]

std::string BASE_IMPEXP mrpt::system::stack_trace ( bool  calling_from_exception = false)

Dumps the current program stack with detailed information of source files and lines.

This function requires MRPT linked against wxWidgets. Otherwise, an empty string is returned. File names and lines won't be available in release builds.

◆ stack_trace() [2/2]

std::string BASE_IMPEXP mrpt::mrpt::system::stack_trace ( bool  calling_from_exception = false)

Dumps the current program stack with detailed information of source files and lines.

This function requires MRPT linked against wxWidgets. Otherwise, an empty string is returned. File names and lines won't be available in release builds.

◆ strcat() [1/2]

char BASE_IMPEXP* mrpt::mrpt::system::os::strcat ( char *  dest,
size_t  destSize,
const char *  source 
)

An OS-independent version of strcat.

Returns
It will always return the "dest" pointer.

◆ strcat() [2/2]

char BASE_IMPEXP* mrpt::system::os::strcat ( char *  dest,
size_t  destSize,
const char *  source 
)

An OS-independent version of strcat.

Returns
It will always return the "dest" pointer.

◆ strcpy() [1/2]

char BASE_IMPEXP* mrpt::system::os::strcpy ( char *  dest,
size_t  destSize,
const char *  source 
)

An OS-independent version of strcpy.

Returns
It will always return the "dest" pointer.

◆ strcpy() [2/2]

char BASE_IMPEXP* mrpt::mrpt::system::os::strcpy ( char *  dest,
size_t  destSize,
const char *  source 
)

An OS-independent version of strcpy.

Returns
It will always return the "dest" pointer.

◆ timegm() [1/2]

time_t BASE_IMPEXP 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.

◆ timegm() [2/2]

time_t BASE_IMPEXP mrpt::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.

◆ vectorFromTextFile() [1/2]

bool BASE_IMPEXP mrpt::mrpt::system::vectorFromTextFile ( std::vector< double > &  vec,
const std::string &  fileName,
const bool  byRows = false 
)

Load a std::vector from a text file (compat.

with MATLAB)

Returns
Returns false on any error, true on everything OK.
See also
loadBinaryFile

◆ vectorFromTextFile() [2/2]

bool BASE_IMPEXP mrpt::system::vectorFromTextFile ( std::vector< double > &  vec,
const std::string &  fileName,
const bool  byRows = false 
)

Load a std::vector from a text file (compat.

with MATLAB)

Returns
Returns false on any error, true on everything OK.
See also
loadBinaryFile

◆ vectorToBinaryFile() [1/2]

bool BASE_IMPEXP mrpt::system::vectorToBinaryFile ( const vector_byte vec,
const std::string &  fileName 
)

Saves a vector directly as a binary dump to a file:

Returns
Returns false on any error, true on everything OK.
See also
loadBinaryFile

◆ vectorToBinaryFile() [2/2]

bool BASE_IMPEXP mrpt::mrpt::system::vectorToBinaryFile ( const vector_byte vec,
const std::string &  fileName 
)

Saves a vector directly as a binary dump to a file:

Returns
Returns false on any error, true on everything OK.
See also
loadBinaryFile

◆ vectorToTextFile() [1/10]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< float > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

A useful function for debuging, which saves a std::vector into a text file (compat.

with MATLAB)

Returns
Returns false on any error, true on everything OK.

◆ vectorToTextFile() [2/10]

bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile ( const std::vector< float > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

A useful function for debuging, which saves a std::vector into a text file (compat.

with MATLAB)

Returns
Returns false on any error, true on everything OK.

Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration().

◆ vectorToTextFile() [3/10]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< double > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [4/10]

bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile ( const std::vector< double > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [5/10]

bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile ( const std::vector< int > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [6/10]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< int > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [7/10]

bool BASE_IMPEXP mrpt::mrpt::system::vectorToTextFile ( const std::vector< size_t > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [8/10]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< size_t > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [9/10]

template<class Derived >
bool mrpt::system::vectorToTextFile ( const Eigen::MatrixBase< Derived > &  vec,
const std::string &  fileName 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 170 of file os.h.

◆ vectorToTextFile() [10/10]

template<class Derived >
bool mrpt::mrpt::system::vectorToTextFile ( const Eigen::MatrixBase< Derived > &  vec,
const std::string &  fileName 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 170 of file CColouredPointsMap.h.

◆ vsnprintf() [1/2]

int BASE_IMPEXP mrpt::system::os::vsnprintf ( char *  buf,
size_t  bufSize,
const char *  format,
va_list  args 
)

An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers)

◆ vsnprintf() [2/2]

int BASE_IMPEXP mrpt::mrpt::system::os::vsnprintf ( char *  buf,
size_t  bufSize,
const char *  format,
va_list  args 
)

An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers)

◆ vsprintf() [1/2]

int BASE_IMPEXP int BASE_IMPEXP mrpt::system::os::vsprintf ( char *  buf,
size_t  bufSize,
const char *  format,
va_list  args 
)

An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers)

◆ vsprintf() [2/2]

int BASE_IMPEXP int BASE_IMPEXP mrpt::mrpt::system::os::vsprintf ( char *  buf,
size_t  bufSize,
const char *  format,
va_list  args 
)

An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers)




Page generated by Doxygen 1.8.14 for MRPT 1.1.0 SVN: at lun oct 28 00:54:49 CET 2019 Hosted on:
SourceForge.net Logo