MRPT logo

utils_defs.h File Reference

#include <mrpt/config.h>
#include <mrpt/system/os.h>
#include <mrpt/utils/utils_impexp.h>
#include <stdlib.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <cstring>
#include <exception>
#include <stdexcept>
#include <limits>
#include <sstream>
#include <mrpt/otherlibs/stlplus/smart_ptr.hpp>
#include <mrpt/utils/types.h>

Go to the source code of this file.


Classes

struct  mrpt::utils::ObjectDelete
 An object for deleting pointers (intended for STL algorithms). More...
struct  mrpt::utils::ObjectClear
 An object for clearing an object (invokes its method "clear()") given a pointer or smart-pointer, intended for being used in STL algorithms. More...

Namespaces

namespace  mrpt
 The main namespace for all the Mobile Robot Programming Toolkit (MRPT) C++ libraries.
namespace  mrpt::utils
 Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
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::math
 This base provides a set of functions for maths stuff.

Defines

#define _IAMINUTILSDEFS_H
#define MRPT_DEPRECATED_PRE
#define MRPT_DEPRECATED_POST
#define __CURRENT_FUNCTION_NAME__   __PRETTY_FUNCTION__
 A macro for obtaining the name of the current function:.
#define THROW_EXCEPTION(msg)
#define THROW_EXCEPTION_CUSTOM_MSG1(msg, param1)
#define THROW_TYPED_EXCEPTION(msg, exceptionClass)
 Defines a unified way of reporting exceptions of type different from "std::exception".
#define THROW_TYPED_EXCEPTION_CUSTOM_MSG1(msg, param1, exceptionClass)
#define THROW_STACKED_EXCEPTION(e)
#define THROW_STACKED_EXCEPTION_CUSTOM_MSG1(e, msg)
#define THROW_STACKED_EXCEPTION_CUSTOM_MSG2(e, stuff, param1)
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(V)   THROW_EXCEPTION(format("Cannot parse object: unknown serialization version number: '%i'",static_cast<int>(version)))
 For use in CSerializable implementations.
#define ASSERT_(f)
#define MRPT_CHECK_NORMAL_NUMBER(val)
#define MRPT_COMPILE_TIME_ASSERT(f)
#define MRPT_UNUSED_PARAM(a)   (void)(a)
 Can be used to avoid "not used parameters" warnings from the compiler.
#define MRPT_TRY_START
#define MRPT_TRY_END
#define MRPT_TRY_END_WITH_CLEAN_UP(stuff)
#define M_PI   3.14159265358979323846264338327950288
 The PI constant.
#define M_2PI   6.283185307179586476925286766559
 The 2*PI constant.
#define M_PIf   3.14159265358979f
#define M_2PIf   6.28318530717959f

Typedefs

typedef void(* mrpt::utils::TFunctor_noRet_1inputs )(const void *)
 A generic functor type for functions accepting 1 input arguments and returning nothing.
typedef void(* mrpt::utils::TFunctor_noRet_2inputs )(const void *, const void *)
 A generic functor type for functions accepting 2 input arguments and returning nothing.
typedef void(* mrpt::utils::TFunctor_noRet_3inputs )(const void *, const void *, const void *)
 A generic functor type for functions accepting 3 input arguments and returning nothing.
typedef double(* mrpt::utils::TFunctor_retDouble_1inputs )(const void *)
 A generic functor type for functions accepting 1 input arguments and returning a double value.
typedef double(* mrpt::utils::TFunctor_retDouble_2inputs )(const void *, const void *)
 A generic functor type for functions accepting 2 input arguments and returning a double value.
typedef double(* mrpt::utils::TFunctor_retDouble_3inputs )(const void *, const void *, const void *)
 A generic functor type for functions accepting 3 input arguments and returning a double value.
typedef void(* mrpt::utils::TFunctor_retVecDbl_inpVecDbl )(const vector_double &in, vector_double &out)
 A generic functor type for functions accepting 1 vector and returning 1 vector.
typedef void(* mrpt::utils::TFunctor_retVecFlt_inpVecFlt )(const vector_float &in, vector_float &out)
 A generic functor type for functions accepting 1 vector and returning 1 vector.
typedef void(* mrpt::utils::TFunctor_retVecInt_inpVecInt )(const vector_int &in, vector_int &out)
 A generic functor type for functions accepting 1 vector and returning 1 vector.
typedef void(* mrpt::utils::TFunctor_retVecDbl_inp2VecDbl )(const vector_double &x, const vector_double &y, vector_double &out)
 A generic functor type for functions accepting 2 vectors and returning 1 vector.
typedef void(* mrpt::utils::TFunctor_retVecFlt_inp2VecFlt )(const vector_float &x, const vector_float &y, vector_float &out)
 A generic functor type for functions accepting 2 vectors and returning 1 vector.
typedef void(* mrpt::utils::TFunctor_retVecInt_inp2VecInt )(const vector_int &x, const vector_int &y, vector_int &out)
 A generic functor type for functions accepting 2 vectors and returning 1 vector.
typedef double(* mrpt::utils::TFunctor_retDbl_inp1VecDbl )(const vector_double &in1)
 A generic functor type for functions accepting 1 vector and returning 1 double.
typedef double(* mrpt::utils::TFunctor_retDbl_inp2VecDbl )(const vector_double &in1, const vector_double &in2)
 A generic functor type for functions accepting 2 vectors and returning 1 double.
typedef double(* mrpt::utils::TFunctor_retDbl_inp3VecDbl )(const vector_double &in1, const vector_double &in2, const vector_double &in3)
 A generic functor type for functions accepting 3 vectors and returning 1 double.
typedef unsigned long mrpt::utils::POINTER_TYPE
 For performing type casting from a pointer to its numeric value.

Functions

std::string MRPTDLLIMPEXP mrpt::format (const char *fmt,...) MRPT_printf_format_check(1
 A std::string version of C sprintf.
std::string MRPTDLLIMPEXP mrpt::system::extractFileName (const std::string &filePath)
 Extract just the name (without extension) of a filename from a complete path plus name plus extension.
bool MRPTDLLIMPEXP mrpt::math::isNan (float v)
 Returns true if value is Not-a-number (NAN).
bool MRPTDLLIMPEXP mrpt::math::isNan (double v)
 Returns true if value is Not-a-number (NAN).
bool MRPTDLLIMPEXP mrpt::math::isFinite (float v)
 Returns true if value is finite.
bool MRPTDLLIMPEXP mrpt::math::isFinite (double v)
 Returns true if value is finite.
template<typename T >
const T min3 (const T &A, const T &B, const T &C)
template<typename T >
const T max3 (const T &A, const T &B, const T &C)
double mrpt::utils::DEG2RAD (const double &x)
 Degrees to radians.
float mrpt::utils::DEG2RAD (const float &x)
 Degrees to radians.
float mrpt::utils::DEG2RAD (const int &x)
 Degrees to radians.
double mrpt::utils::RAD2DEG (const double &x)
 Radians to degrees.
float mrpt::utils::RAD2DEG (const float &x)
 Radians to degrees.
template<typename T >
int mrpt::utils::sign (T x)
 Returns the sign of X as "1" or "-1".
template<typename T >
int mrpt::utils::round (T x)
 Returns the closer integer (int) to x.
template<typename T >
long mrpt::utils::round_long (T x)
 Returns the closer integer (long) to x.
template<typename T >
int mrpt::utils::fix (T x)
 Rounds toward zero.
template<class T >
mrpt::utils::square (const T &x)
 Inline function for the square of a number.
template<class R , class P >
R * mrpt::utils::getAs (stlplus::smart_ptr_clone< P > &o)
 Utility to get a cast'ed pointer from a smart pointer.
template<class R , class P >
const R * mrpt::utils::getAs (const stlplus::smart_ptr_clone< P > &o)
 Utility to get a cast'ed pointer from a smart pointer.
template<class T >
void mrpt::utils::reverseBytes (const T &v_in, T &v_out)
 Reverse the order of the bytes of a given type (useful for transforming btw little/big endian).


Define Documentation

#define __CURRENT_FUNCTION_NAME__   __PRETTY_FUNCTION__

A macro for obtaining the name of the current function:.

Definition at line 183 of file utils_defs.h.

#define _IAMINUTILSDEFS_H

Definition at line 74 of file utils_defs.h.

#define ASSERT_ (  ) 

Definition at line 340 of file utils_defs.h.

Referenced by mrpt::math::CMatrixTemplate< bool >::appendRow(), mrpt::math::crossProduct3D(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::eigenVectors(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::find_index_min_value(), mrpt::utils::CMHPropertiesValuesList::getAs(), mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose2DGridTemplate< double >::getByIndex(), mrpt::utils::CMRPTMessage::getContentAsStruct(), mrpt::utils::CMHPropertiesValuesList::getElemental(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getMostLikelyParticle(), mrpt::poses::CPose2DGridTemplate< double >::idx2phi(), mrpt::poses::CPose2DGridTemplate< double >::idx2x(), mrpt::poses::CPose2DGridTemplate< double >::idx2y(), mrpt::math::CMatrixTemplate< bool >::insertCol(), mrpt::math::CMatrixTemplate< bool >::insertRow(), mrpt::math::interpolate(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::maximumDiagonal(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::mean(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::meanAndStd(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::meanAndStdAll(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_Ab(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_Atb(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTranspose(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeNonSymmetric(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeScalar(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplySubMatrix(), mrpt::math::CMatrixTemplate< bool >::operator()(), mrpt::math::operator*(), mrpt::utils::copiable_NULL_ptr< const CActionCollection >::operator*(), mrpt::utils::non_copiable_ptr< CMultiMetricMap >::operator*(), mrpt::utils::safe_ptr< TRuntimeClassId >::operator*(), mrpt::math::CVectorTemplate< KFTYPE >::operator*(), mrpt::math::operator*=(), mrpt::math::operator+(), mrpt::math::CVectorTemplate< KFTYPE >::operator+(), mrpt::math::operator+=(), mrpt::math::CVectorTemplate< KFTYPE >::operator+=(), mrpt::math::operator-(), mrpt::math::CVectorTemplate< KFTYPE >::operator-(), mrpt::math::operator-=(), mrpt::utils::copiable_NULL_ptr_basic< const CActionCollection >::operator->(), mrpt::utils::non_copiable_ptr_basic< CMultiMetricMap >::operator->(), mrpt::utils::safe_ptr_basic< CMultiMetricMap >::operator->(), mrpt::math::operator/(), mrpt::math::CVectorTemplate< KFTYPE >::operator/(), mrpt::math::operator/=(), mrpt::utils::copiable_NULL_ptr< const CActionCollection >::operator[](), mrpt::utils::non_copiable_ptr< CMultiMetricMap >::operator[](), mrpt::utils::safe_ptr< TRuntimeClassId >::operator[](), mrpt::poses::CPose2DGridTemplate< double >::phi2idx(), mrpt::math::CQuaternion< T >::q_conv(), mrpt::bayes::CRejectionSamplingCapable< poses::CPose2D >::rejectionSampling(), mrpt::utils::CMRPTImage::resize(), mrpt::utils::CMemoryStream::setAllocBlockSize(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::sum(), mrpt::math::weightedHistogram(), mrpt::poses::CPose2DGridTemplate< double >::x2idx(), and mrpt::poses::CPose2DGridTemplate< double >::y2idx().

#define M_2PI   6.283185307179586476925286766559

#define M_2PIf   6.28318530717959f

Definition at line 418 of file utils_defs.h.

#define M_PI   3.14159265358979323846264338327950288

#define M_PIf   3.14159265358979f

Definition at line 417 of file utils_defs.h.

Referenced by mrpt::utils::DEG2RAD(), and mrpt::utils::RAD2DEG().

#define MRPT_CHECK_NORMAL_NUMBER ( val   ) 

Definition at line 341 of file utils_defs.h.

#define MRPT_COMPILE_TIME_ASSERT (  ) 

#define MRPT_DEPRECATED_POST

Definition at line 116 of file utils_defs.h.

#define MRPT_DEPRECATED_PRE

Definition at line 115 of file utils_defs.h.

#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION (  )     THROW_EXCEPTION(format("Cannot parse object: unknown serialization version number: '%i'",static_cast<int>(version)))

For use in CSerializable implementations.

Definition at line 281 of file utils_defs.h.

#define MRPT_TRY_END

Definition at line 398 of file utils_defs.h.

Referenced by mrpt::math::CMatrixTemplateNumeric< KFTYPE >::adjustRange(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::clearParticles(), mrpt::slam::CMetricMap::computeMatchingWith2D(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::findElementsPassingMahalanobisThreshold(), mrpt::math::generateAxisBaseFromDirection(), mrpt::slam::CActionCollection::getActionByClass(), mrpt::utils::CReferencedMemBlock::getAs(), mrpt::utils::CMHPropertiesValuesList::getAs(), mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::opengl::CSetOfObjects::getByClass(), mrpt::opengl::COpenGLViewport::getByClass(), mrpt::opengl::COpenGLScene::getByClass(), mrpt::utils::CMRPTMessage::getContentAsStruct(), mrpt::utils::CMHPropertiesValuesList::getElemental(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getMostLikelyParticle(), mrpt::slam::CSensoryFrame::getObservationByClass(), mrpt::hwdrivers::CSerialPort::getPosition(), mrpt::utils::CClientTCPSocket::getPosition(), mrpt::hwdrivers::CSerialPort::getTotalBytesCount(), mrpt::utils::CClientTCPSocket::getTotalBytesCount(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getWeights(), mrpt::slam::CMetricMap::insertObservationPtr(), mrpt::math::interpolate(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::mean(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::meanAndStd(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::meanAndStdAll(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_AAt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_Ab(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_ABt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_AtA(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_Atb(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_result_is_symmetric(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyABC(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyABCt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTranspose(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeNonSymmetric(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeScalar(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplySubMatrix(), mrpt::math::normalPDF(), mrpt::bayes::CKalmanFilterCapable::OnGetObservations(), mrpt::math::CVectorTemplate< KFTYPE >::operator+=(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator/=(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::readParticlesFromStream(), mrpt::bayes::CRejectionSamplingCapable< poses::CPose2D >::rejectionSampling(), mrpt::utils::CDynamicGrid< TCellForLambdaFunction >::resize(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::saveToTextFile(), mrpt::hwdrivers::CSerialPort::Seek(), mrpt::utils::CClientTCPSocket::Seek(), mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::sum(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::sumAll(), mrpt::math::weightedHistogram(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::writeParticlesToStream(), and mrpt::bayes::CParticleFilterData< CRBPFParticleData >::~CParticleFilterData().

#define MRPT_TRY_END_WITH_CLEAN_UP ( stuff   ) 

#define MRPT_TRY_START

Definition at line 397 of file utils_defs.h.

Referenced by mrpt::math::CMatrixTemplateNumeric< KFTYPE >::adjustRange(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::clearParticles(), mrpt::slam::CMetricMap::computeMatchingWith2D(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::eigenVectors(), mrpt::utils::CMRPTCanvas::ellipseGaussian(), mrpt::utils::CEnhancedMetaFile::ellipseGaussian(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::findElementsPassingMahalanobisThreshold(), mrpt::math::generateAxisBaseFromDirection(), mrpt::slam::CActionCollection::getActionByClass(), mrpt::utils::CReferencedMemBlock::getAs(), mrpt::utils::CMHPropertiesValuesList::getAs(), mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::opengl::CSetOfObjects::getByClass(), mrpt::opengl::COpenGLViewport::getByClass(), mrpt::opengl::COpenGLScene::getByClass(), mrpt::utils::CMRPTMessage::getContentAsStruct(), mrpt::utils::CMHPropertiesValuesList::getElemental(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getMostLikelyParticle(), mrpt::slam::CSensoryFrame::getObservationByClass(), mrpt::hwdrivers::CSerialPort::getPosition(), mrpt::utils::CClientTCPSocket::getPosition(), mrpt::hwdrivers::CSerialPort::getTotalBytesCount(), mrpt::utils::CClientTCPSocket::getTotalBytesCount(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getWeights(), mrpt::slam::CMetricMap::insertObservationPtr(), mrpt::math::interpolate(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::mean(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::meanAndStd(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::meanAndStdAll(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_AAt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_Ab(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_ABt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_AtA(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_Atb(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_result_is_symmetric(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyABC(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyABCt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTranspose(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeNonSymmetric(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeScalar(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplySubMatrix(), mrpt::math::normalPDF(), mrpt::bayes::CKalmanFilterCapable::OnGetObservations(), mrpt::math::CVectorTemplate< KFTYPE >::operator+=(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator/=(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::readParticlesFromStream(), mrpt::bayes::CRejectionSamplingCapable< poses::CPose2D >::rejectionSampling(), mrpt::utils::CDynamicGrid< TCellForLambdaFunction >::resize(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::saveToTextFile(), mrpt::hwdrivers::CSerialPort::Seek(), mrpt::utils::CClientTCPSocket::Seek(), mrpt::utils::CMHPropertiesValuesList::setElemental(), mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::sum(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::sumAll(), mrpt::math::weightedHistogram(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::writeParticlesToStream(), and mrpt::bayes::CParticleFilterData< CRBPFParticleData >::~CParticleFilterData().

#define MRPT_UNUSED_PARAM (  )     (void)(a)

Can be used to avoid "not used parameters" warnings from the compiler.

Definition at line 349 of file utils_defs.h.

Referenced by mrpt::bayes::CParticleFilterCapable::defaultEvaluator(), mrpt::hwdrivers::CSerialPort::Seek(), and mrpt::utils::CClientTCPSocket::Seek().

#define THROW_EXCEPTION ( msg   ) 

Value:

{\
                std::ostringstream auxCompStr;\
                auxCompStr << "\n\n =============== MRPT EXCEPTION =============\n";\
                auxCompStr << __CURRENT_FUNCTION_NAME__ << ", line " << __LINE__ << ":\n";\
                auxCompStr << msg << "\nCALL STACK:\n";\
                throw std::logic_error( auxCompStr.str() );\
        }\
Parameters:
msg This can be a char*, a std::string, or a literal string. Defines a unified way of reporting exceptions
See also:
MRPT_TRY_START, MRPT_TRY_END, THROW_EXCEPTION_CUSTOM_MSG1

Definition at line 192 of file utils_defs.h.

Referenced by mrpt::math::CMatrixTemplateNumeric< KFTYPE >::addAAt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::addAt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::adj(), mrpt::math::chol(), mrpt::math::CMatrixTemplate< bool >::CMatrixTemplate(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::cofact(), mrpt::slam::CMetricMap::computeMatchingWith2D(), mrpt::math::correlate_matrix(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::vision::CStereoGrabber_Bumblebee::CStereoGrabber_Bumblebee(), mrpt::vision::CStereoServerBumblebee::CStereoServerBumblebee(), mrpt::utils::CTicTac::CTicTac(), mrpt::math::CVectorTemplate< KFTYPE >::deconcatenate(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::det(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::eigenVectors(), mrpt::math::CVectorTemplate< KFTYPE >::extract_vector(), mrpt::math::CMatrixTemplate< bool >::extractCol(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::extractMatrix(), mrpt::math::CMatrixTemplate< bool >::extractRow(), mrpt::math::CVectorTemplate< KFTYPE >::find_max(), mrpt::math::CVectorTemplate< KFTYPE >::find_min(), mrpt::math::CVectorTemplate< KFTYPE >::find_min_max(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::force_symmetry(), mrpt::math::generateAxisBaseFromDirection(), mrpt::utils::CReferencedMemBlock::getAs(), mrpt::utils::CMHPropertiesValuesList::getAs(), mrpt::utils::CMHPropertiesValuesList::getElemental(), mrpt::utils::CStdOutStream::getPosition(), mrpt::hwdrivers::CSerialPort::getPosition(), mrpt::utils::CClientTCPSocket::getPosition(), mrpt::utils::CStdOutStream::getTotalBytesCount(), mrpt::hwdrivers::CSerialPort::getTotalBytesCount(), mrpt::utils::CClientTCPSocket::getTotalBytesCount(), mrpt::math::CVectorTemplate< KFTYPE >::insert_vector(), mrpt::math::CMatrixTemplate< bool >::insertCol(), mrpt::math::CMatrixTemplate< bool >::insertMatrix(), mrpt::math::CMatrixTemplate< bool >::insertMatrixTranspose(), mrpt::slam::CMetricMap::insertObservationPtr(), mrpt::math::CMatrixTemplate< bool >::insertRow(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::inv(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::inv_fast(), mrpt::math::CMatrixTemplate< bool >::joinMatrix(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::laplacian(), mrpt::math::CVectorTemplate< KFTYPE >::loadFromTextFile(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::loadFromTextFile(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_ABt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiply_result_is_symmetric(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyABC(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyABCt(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplyByMatrixAndByTransposeScalar(), mrpt::utils::non_copiable_ptr_basic< CMultiMetricMap >::non_copiable_ptr_basic(), mrpt::bayes::CKalmanFilterCapable::OnGetObservations(), mrpt::math::CMatrixTemplate< bool >::operator()(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator*=(), mrpt::math::CVectorTemplate< KFTYPE >::operator+=(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator+=(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator-=(), mrpt::math::operator/(), mrpt::math::operator/=(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator/=(), mrpt::utils::non_copiable_ptr< CMultiMetricMap >::operator=(), mrpt::utils::non_copiable_ptr_basic< CMultiMetricMap >::operator=(), mrpt::utils::CTicTac::operator=(), mrpt::vision::CStereoServerBumblebee::operator=(), mrpt::vision::CStereoGrabber_Bumblebee::operator=(), mrpt::math::CMatrixTemplate< bool >::operator=(), mrpt::utils::CStdOutStream::Read(), mrpt::math::round2up(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::saveToTextFile(), mrpt::utils::CStdOutStream::Seek(), mrpt::hwdrivers::CSerialPort::Seek(), mrpt::utils::CFileGZInputStream::Seek(), mrpt::utils::CClientTCPSocket::Seek(), mrpt::hwdrivers::CSerialPort::setSerialPortName(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::solve(), mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::svdcmp(), and mrpt::math::CMatrixTemplateNumeric< KFTYPE >::tqli().

#define THROW_EXCEPTION_CUSTOM_MSG1 ( msg,
param1   ) 

Value:

{\
                std::ostringstream auxCompStr;\
                auxCompStr << "\n\n =============== MRPT EXCEPTION =============\n";\
                auxCompStr << __CURRENT_FUNCTION_NAME__ << ", line " << __LINE__ << ":\n";\
                auxCompStr << format(msg,param1);\
                auxCompStr << "\nCALL STACK:\n";\
                throw std::logic_error( auxCompStr.str() );\
        }\
Parameters:
e The caught exception.
msg Is a char* or literal string.

Referenced by mrpt::utils::CConsoleRedirector::CConsoleRedirector(), mrpt::utils::CMHPropertiesValuesList::getElemental(), mrpt::math::CMatrixTemplateNumeric< KFTYPE >::loadFromTextFile(), mrpt::math::CMatrixTemplate< bool >::operator()(), and mrpt::math::size().

#define THROW_STACKED_EXCEPTION (  ) 

Value:

{\
                std::string str( e.what() );\
                str+= __CURRENT_FUNCTION_NAME__;\
                str+= format(", line %i:\n", __LINE__ );\
                if (str.size()>3000) { std::cerr << "TOO MANY STACKED EXCEPTIONS!: " << std::endl << str << std::endl; abort(); } \
                throw std::logic_error( str );\
        }\
See also:
MRPT_TRY_START, MRPT_TRY_END

Definition at line 247 of file utils_defs.h.

#define THROW_STACKED_EXCEPTION_CUSTOM_MSG1 ( e,
msg   ) 

Value:

{\
                std::ostringstream auxCompStr;\
                auxCompStr << e.what() ; \
                auxCompStr << msg << __CURRENT_FUNCTION_NAME__ << ", line " << __LINE__ << "(User msg above)\n";\
                throw std::logic_error( auxCompStr.str() );\
        }\

Definition at line 260 of file utils_defs.h.

#define THROW_STACKED_EXCEPTION_CUSTOM_MSG2 ( e,
stuff,
param1   ) 

Value:

{\
                std::ostringstream auxCompStr;\
                auxCompStr << e.what(); \
                auxCompStr << format( stuff, param1 ) << "\n" << __CURRENT_FUNCTION_NAME__ << ", line " << __LINE__ << ":\n";\
                throw std::logic_error( auxCompStr.str() );\
        }\

Definition at line 272 of file utils_defs.h.

#define THROW_TYPED_EXCEPTION ( msg,
exceptionClass   ) 

Value:

{\
                std::ostringstream auxCompStr;\
                auxCompStr << "\n\n =============== MRPT EXCEPTION =============\n";\
                auxCompStr << __CURRENT_FUNCTION_NAME__ << ", line " << __LINE__ << ":\n";\
                auxCompStr << msg << "\nCALL STACK:\n";\
                throw exceptionClass( auxCompStr.str() );\
        }\
Defines a unified way of reporting exceptions of type different from "std::exception".

See also:
MRPT_TRY_START, MRPT_TRY_END

Definition at line 220 of file utils_defs.h.

#define THROW_TYPED_EXCEPTION_CUSTOM_MSG1 ( msg,
param1,
exceptionClass   ) 

Value:

{\
                std::ostringstream auxCompStr;\
                auxCompStr << "\n\n =============== MRPT EXCEPTION =============\n";\
                auxCompStr << __CURRENT_FUNCTION_NAME__ << ", line " << __LINE__ << ":\n";\
                auxCompStr << format(msg,param1);\
                auxCompStr << "\nCALL STACK:\n";\
                throw exceptionClass( auxCompStr.str() );\
        }\

Definition at line 233 of file utils_defs.h.


Function Documentation

template<typename T >
const T max3 ( const T &  A,
const T &  B,
const T &  C 
) [inline]

Definition at line 448 of file utils_defs.h.

template<typename T >
const T min3 ( const T &  A,
const T &  B,
const T &  C 
) [inline]

Definition at line 447 of file utils_defs.h.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN:exported at Mon Jan 12 13:00:16 UTC 2009