MRPT logo

os.h File Reference

#include <mrpt/config.h>
#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <vector>
#include <mrpt/utils/utils_impexp.h>
#include <mrpt/utils/types.h>
Include dependency graph for os.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mrpt
 

This is the global namespace for all Mobile Robot Porgramming Toolkit (MRPT) libraries.


namespace  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.


namespace  mrpt::system::os
 

This namespace provides a OS-independent interface to low-level functions.


Defines

#define _IAMINUTILSDEFS_H
#define MRPT_printf_format_check(_FMT_, _VARARGS_)
#define MRPT_scanf_format_check(_FMT_, _VARARGS_)
#define MRPT_NO_THROWS   throw()
 Used after member declarations.
#define INVALID_TIMESTAMP   (0)
 Represents an invalid timestamp, where applicable.

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 MRPTDLLIMPEXP 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).
int MRPTDLLIMPEXP int MRPTDLLIMPEXP 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).
int MRPTDLLIMPEXP 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).
FILE MRPTDLLIMPEXP * mrpt::system::os::fopen (const char *fileName, const char *mode) MRPT_NO_THROWS
 An OS-independent version of fopen.
FILE MRPTDLLIMPEXP * mrpt::system::os::fopen (const std::string &fileName, const char *mode) MRPT_NO_THROWS
 An OS-independent version of fopen (std::string version).
int MRPTDLLIMPEXP mrpt::system::os::fprintf (FILE *fil, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(2
 An OS-independent version of fprintf.
int MRPTDLLIMPEXP int MRPTDLLIMPEXP mrpt::system::os::fscanf (FILE *fil, const char *format,...) MRPT_NO_THROWS MRPT_scanf_format_check(2
 An OS-independent version of fscanf.
int MRPTDLLIMPEXP int
MRPTDLLIMPEXP void
MRPTDLLIMPEXP 
mrpt::system::os::fclose (FILE *f)
 An OS-independent version of fclose.
char MRPTDLLIMPEXP * mrpt::system::os::strcat (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS
 An OS-independent version of strcat.
char MRPTDLLIMPEXP * mrpt::system::os::strcpy (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS
 An OS-independent version of strcpy.
int MRPTDLLIMPEXP mrpt::system::os::_strcmp (const char *str1, const char *str2) MRPT_NO_THROWS
 An OS-independent version of strcmp.
int MRPTDLLIMPEXP mrpt::system::os::_strcmpi (const char *str1, const char *str2) MRPT_NO_THROWS
 An OS-independent version of strcmpi.
int64_t MRPTDLLIMPEXP mrpt::system::os::_strtoll (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoll.
uint64_t MRPTDLLIMPEXP mrpt::system::os::_strtoull (const char *nptr, char **endptr, int base)
 An OS-independent version of strtoull.
time_t MRPTDLLIMPEXP 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.
void MRPTDLLIMPEXP 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".
int MRPTDLLIMPEXP mrpt::system::os::getch () MRPT_NO_THROWS
 An OS-independent version of getch, which waits until a key is pushed.
bool MRPTDLLIMPEXP mrpt::system::os::kbhit () MRPT_NO_THROWS
 An OS-independent version of kbhit, which returns true if a key has been pushed.
bool MRPTDLLIMPEXP mrpt::system::isNaN (float f) MRPT_NO_THROWS
 Returns true if the number is NaN.
bool MRPTDLLIMPEXP mrpt::system::isNaN (double f) MRPT_NO_THROWS
 Returns true if the number is NaN.
bool MRPTDLLIMPEXP mrpt::system::isFinite (float f) MRPT_NO_THROWS
 Returns true if the number is non infinity.
bool MRPTDLLIMPEXP mrpt::system::isFinite (double f) MRPT_NO_THROWS
 Returns true if the number is non infinity.
void MRPTDLLIMPEXP 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.
void MRPTDLLIMPEXP mrpt::system::clearConsole ()
 Clears the console window.
bool MRPTDLLIMPEXP 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.
bool MRPTDLLIMPEXP mrpt::system::vectorToTextFile (const std::vector< double > &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.
bool MRPTDLLIMPEXP mrpt::system::vectorToTextFile (const std::vector< int > &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.
bool MRPTDLLIMPEXP mrpt::system::vectorToTextFile (const std::vector< size_t > &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.
bool MRPTDLLIMPEXP mrpt::system::vectorToBinaryFile (const vector_byte &vec, const std::string &fileName)
 Saves a vector directly as a binary dump to a file:.
bool MRPTDLLIMPEXP mrpt::system::loadBinaryFile (vector_byte &out_data, const std::string &fileName)
 Loads a entire file as a vector of bytes.
std::string MRPTDLLIMPEXP mrpt::system::MRPT_getCompilationDate ()
 Returns the MRPT compilation date.
std::string MRPTDLLIMPEXP mrpt::system::MRPT_getVersion ()
 Returns a string describing the MRPT version including the SVN number.
void MRPTDLLIMPEXP 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.
std::string MRPTDLLIMPEXP mrpt::system::stack_trace (bool calling_from_exception=false)
 Dumps the current program stack with detailed information of source files and lines.
void MRPTDLLIMPEXP mrpt::system::setConsoleColor (TConsoleColor color, bool changeStdErr=false)
 Changes the text color in the console for the text written from now on.

Define Documentation

#define _IAMINUTILSDEFS_H

Definition at line 40 of file os.h.

#define INVALID_TIMESTAMP   (0)

Represents an invalid timestamp, where applicable.

Definition at line 66 of file os.h.

#define MRPT_NO_THROWS   throw()

Used after member declarations.

Definition at line 62 of file os.h.

#define MRPT_printf_format_check ( _FMT_,
_VARARGS_   ) 

Definition at line 50 of file os.h.

#define MRPT_scanf_format_check ( _FMT_,
_VARARGS_   ) 

Definition at line 57 of file os.h.




Page generated by Doxygen 1.6.2 for MRPT 0.8.1 SVN:exported at Mon Feb 15 22:01:07 UTC 2010