Main MRPT website > C++ reference for MRPT 1.9.9
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
mrpt::utils Namespace Reference

Detailed Description

Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.

Namespaces

 detail
 
 internal
 
 metaprogramming
 A set of utility objects for metaprogramming with STL algorithms.
 
 simpleini
 

Classes

class  bimap
 A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std::map's, one for keys and another for values. More...
 
class  CCanvas
 This virtual class defines the interface of any object accepting drawing primitives on it. More...
 
class  CClassRegistry
 A singleton with the central registry for CSerializable run-time classes: users do not use this class in any direct way. More...
 
class  CConfigFile
 This class allows loading and storing values and vectors of different types from ".ini" files easily. More...
 
class  CConfigFileBase
 This class allows loading and storing values and vectors of different types from a configuration text, which can be implemented as a ".ini" file, a memory-stored string, etc... More...
 
class  CConfigFileMemory
 This class implements a config file-like interface over a memory-stored string list. More...
 
class  CConfigFilePrefixer
 A wrapper for other CConfigFileBase-based objects that prefixes a given token to every key and/or section. More...
 
class  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  CDynamicGrid
 A 2D grid of dynamic size which stores any kind of data at each cell. More...
 
class  CDynamicGrid3D
 A 3D rectangular grid of dynamic size which stores any kind of data at each voxel. More...
 
class  CEnhancedMetaFile
 This class represents a Windows Enhanced Meta File (EMF) for generating and saving graphics. More...
 
class  CExceptionEOF
 Used in mrpt::utils::CStream. More...
 
class  CExceptionExternalImageNotFound
 Used in mrpt::utils::CImage. More...
 
class  CFileGZInputStream
 Transparently opens a compressed "gz" file and reads uncompressed data from it. More...
 
class  CFileInputStream
 This CStream derived class allow using a file as a read-only, binary stream. More...
 
class  CFileOutputStream
 This CStream derived class allow using a file as a write-only, binary stream. More...
 
class  CFileStream
 This CStream derived class allow using a file as a read/write binary stream, creating it if the file didn't exist. More...
 
struct  ci_less
 A case-insensitive comparator struct for usage within STL containers, eg: map<string,string,ci_less> More...
 
class  CImage
 A class for storing images as grayscale or RGB bitmaps. More...
 
class  circular_buffer
 A circular buffer of fixed size (defined at construction-time), implemented with a std::vector as the underlying storage. More...
 
struct  CLASSINIT
 Auxiliary structure used for CObject-based RTTI. More...
 
class  CListOfClasses
 A list (actually based on a std::set) of MRPT classes, capable of keeping any class registered by the mechanism of CSerializable classes. More...
 
class  CLoadableOptions
 This is a virtual base class for sets of options than can be loaded from and/or saved to configuration plain-text files. More...
 
class  CMappedImage
 This class encapsulates a MRPT Image and allows the sampling of individual pixels with sub-pixel accuracy and with a change of coordinates (eg, meters). More...
 
class  CMemoryChunk
 A memory buffer (implements CStream) which can be itself serialized. More...
 
class  CMemoryStream
 This CStream derived class allow using a memory buffer as a CStream. More...
 
class  CMessage
 A class that contain generic messages, that can be sent and received from a "CClientTCPSocket" object. More...
 
class  CMHPropertiesValuesList
 An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable object (Multi-hypotheses version). More...
 
class  CMRPTException
 The base for MRPT-especific exceptions. More...
 
class  CObject
 The virtual base class of all MRPT classes with a unified RTTI system. More...
 
class  CObservable
 Inherit from this class for those objects capable of being observed by a CObserver class. More...
 
class  CObserver
 Inherit from this class to get notified about events from any CObservable object after subscribing to it. More...
 
struct  ContainerReadOnlyProxyAccessor
 A generic proxy accessor template that only allows read-only access to the original binded STL container object. More...
 
struct  copiable_NULL_ptr
 A wrapper class for pointers that, if copied with the "=" operator, should be set to nullptr in the new copy. More...
 
struct  copiable_NULL_ptr_basic
 A wrapper class for pointers that, if copied with the "=" operator, should be set to nullptr in the copy. More...
 
class  CProbabilityDensityFunction
 A generic template for probability density distributions (PDFs). More...
 
struct  CProfilerProxy
 
class  CPropertiesValuesList
 An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable object. More...
 
class  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  CReferencedMemBlock
 Represents a memory block (via "void*") that can be shared between several objects through copy operator (=). More...
 
class  CSerializable
 The virtual base class which provides a unified interface for all persistent objects in MRPT. More...
 
class  CSimpleDatabase
 This class impements a very simple database system. More...
 
class  CSimpleDatabaseTable
 This class implements the tables of databases. More...
 
class  CStdOutStream
 This CStdOutStream derived class allow printing to standard out, normally the console text output. More...
 
class  CStream
 This base class is used to provide a unified interface to files,memory buffers,..Please see the derived classes. More...
 
class  CStringList
 A class for storing a list of text lines. More...
 
class  CTextFileLinesParser
 A class for parsing text files, returning each non-empty and non-comment line, along its line number. More...
 
class  CThreadSafeQueue
 A thread-safe template queue for object passing between threads; for a template argument of T, the objects being passed in the queue are "T*". More...
 
class  CTicTac
 This class implements a high-performance stopwatch. More...
 
class  CTimeLogger
 A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats. More...
 
struct  CTimeLoggerEntry
 A safe way to call enter() and leave() of a mrpt::utils::CTimeLogger upon construction and destruction of this auxiliary object, making sure that leave() will be called upon exceptions, etc. More...
 
class  CTraitsTest
 
class  CTypeSelector
 This class represents a std::string derived class which is also CSerializable. More...
 
struct  ignored_copy_ptr
 A wrapper class for pointers whose copy operations from other objects of the same type are ignored, that is, doing "a=b;" has no effect neiter on "a" or "b". More...
 
struct  int_select_by_bytecount
 Usage: int_select_by_bytecount<N>type var; allows defining var as a signed integer with, at least, N bytes. More...
 
struct  int_select_by_bytecount< 1 >
 
struct  int_select_by_bytecount< 2 >
 
struct  int_select_by_bytecount< 3 >
 
struct  int_select_by_bytecount< 4 >
 
struct  int_select_by_bytecount< 8 >
 
struct  IS_CLASS_impl
 
struct  is_shared_ptr
 This is useful for checking ::Ptr types. More...
 
struct  is_shared_ptr< std::shared_ptr< T > >
 
class  list_searchable
 This class implements a STL container with features of both, a std::set and a std::list. More...
 
class  map_as_vector
 A STL-like container which looks and behaves (almost exactly) like a std::map<> but is implemented as a linear std::vector<> indexed by KEY. More...
 
struct  map_traits_map_as_vector
 Traits for using a mrpt::utils::map_as_vector<> (dense, fastest representation) More...
 
struct  map_traits_stdmap
 Traits for using a std::map<> (sparse representation) More...
 
class  mrptEvent
 The basic event type for the observer-observable pattern in MRPT. More...
 
class  mrptEventOnDestroy
 An event sent by any CObservable object (automatically) just before being destroyed and telling its observers to unsubscribe. More...
 
struct  non_copiable_ptr
 A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtime if a copy is attempted. More...
 
struct  non_copiable_ptr_basic
 A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtime if a copy is attempted. More...
 
struct  pimpl
 Pointer to IMPLementation auxiliary structure to make raw pointers movable, copiable and automatically deleted. More...
 
class  PLY_Exporter
 A virtual base class that implements the capability of exporting 3D point clouds and faces to a file in the Stanford PLY format. More...
 
class  PLY_Importer
 A virtual base class that implements the capability of importing 3D point clouds and faces from a file in the Stanford PLY format. More...
 
class  PointCloudAdapter
 An adapter to different kinds of point cloud object. More...
 
class  PointCloudAdapter< mrpt::maps::CColouredPointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CColouredPointsMap> mrpt_adapters_grp. More...
 
class  PointCloudAdapter< mrpt::maps::CPointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CPointsMap> More...
 
class  PointCloudAdapter< mrpt::maps::CSimplePointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CSimplePointsMap> More...
 
class  PointCloudAdapter< mrpt::maps::CWeightedPointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CWeightedPointsMap> mrpt_adapters_grp. More...
 
class  PointCloudAdapter< mrpt::obs::CObservation3DRangeScan >
 Specialization mrpt::utils::PointCloudAdapter<CObservation3DRangeScan> More...
 
class  PointCloudAdapter< mrpt::opengl::CPointCloud >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::opengl::CPointCloud> More...
 
class  PointCloudAdapter< mrpt::opengl::CPointCloudColoured >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::opengl::CPointCloudColoured> mrpt_adapters_grp. More...
 
class  PointCloudAdapter< pcl::PointCloud< pcl::PointXYZ > >
 Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZ>

for an XYZ point cloud (without RGB)

More...
 
class  PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGB > >
 Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGB> > for an XYZ point cloud with RGB. More...
 
class  PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >
 Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGBA> > for an XYZ point cloud with RGB. More...
 
class  poly_ptr_ptr
 Wrapper to a clone smart pointer to polymorphic classes, capable of handling copy operator, etc. More...
 
struct  safe_ptr
 A wrapper class for pointers that can be safely copied with "=" operator without problems. More...
 
struct  safe_ptr_basic
 A wrapper class for pointers that can be safely copied with "=" operator without problems. More...
 
class  TCamera
 Structure to hold the parameters of a pinhole camera model. More...
 
struct  TColor
 A RGB color - 8bit. More...
 
struct  TColorf
 A RGB color - floats in the range [0,1]. More...
 
struct  TColorManager
 Manage R, G, B color triads and ask class instance of the next unique RGB combination. More...
 
struct  TEnumType
 A helper class that can convert an enum value into its textual representation, and viceversa. More...
 
struct  TEnumTypeFiller
 Only specializations of this class are defined for each enum type of interest. More...
 
struct  TEnumTypeFiller< bayes::TKFMethod >
 
struct  TEnumTypeFiller< hwdrivers::CGPSInterface::PARSERS >
 
struct  TEnumTypeFiller< hwdrivers::CKinect::TVideoChannel >
 
struct  TEnumTypeFiller< hwdrivers::CVelodyneScanner::model_t >
 
struct  TEnumTypeFiller< hwdrivers::CVelodyneScanner::return_type_t >
 
struct  TEnumTypeFiller< maps::CHeightGridMap2D::TMapRepresentation >
 
struct  TEnumTypeFiller< maps::CRandomFieldGridMap2D::TMapRepresentation >
 
struct  TEnumTypeFiller< mrpt::bayes::CParticleFilter::TParticleFilterAlgorithm >
 
struct  TEnumTypeFiller< mrpt::bayes::CParticleFilter::TParticleResamplingAlgorithm >
 
struct  TEnumTypeFiller< mrpt::maps::CColouredPointsMap::TColouringMethod >
 
struct  TEnumTypeFiller< mrpt::maps::COccupancyGridMap2D::TLikelihoodMethod >
 
struct  TEnumTypeFiller< mrpt::nav::CAbstractNavigator::TState >
 
struct  TEnumTypeFiller< mrpt::obs::CObservation3DRangeScan::TIntensityChannelID >
 
struct  TEnumTypeFiller< mrpt::poses::TInterpolatorMethod >
 
struct  TEnumTypeFiller< mrpt::vision::TDescriptorType >
 
struct  TEnumTypeFiller< mrpt::vision::TFeatureType >
 
struct  TEnumTypeFiller< nav::CHolonomicND::TSituations >
 
struct  TEnumTypeFiller< slam::CGridMapAligner::TAlignerMethod >
 
struct  TEnumTypeFiller< slam::TDataAssociationMethod >
 
struct  TEnumTypeFiller< slam::TDataAssociationMetric >
 
struct  TEnumTypeFiller< slam::TICPAlgorithm >
 
struct  TEnumTypeFiller< slam::TICPCovarianceMethod >
 
struct  TMatchingPair
 A structure for holding correspondences between two sets of points or points-like entities in 2D or 3D. More...
 
class  TMatchingPairList
 A list of TMatchingPair. More...
 
struct  TParameters
 For usage when passing a dynamic number of (numeric) arguments to a function, by name. More...
 
struct  TPixelCoord
 A pair (x,y) of pixel coordinates (integer resolution). More...
 
struct  TPixelCoordf
 A pair (x,y) of pixel coordinates (subpixel resolution). More...
 
struct  TPropertyValueIDTriplet
 Internal triplet for each property in utils::CMHPropertiesValuesList. More...
 
struct  TRuntimeClassId
 A structure that holds runtime class type information. More...
 
struct  ts_map_entry
 
class  TStereoCamera
 Structure to hold the parameters of a pinhole stereo camera model. More...
 
struct  TTypeName
 A template to obtain the type of its argument as a string at compile time. More...
 
struct  TTypeName< mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > >
 
struct  TTypeName< mrpt::math::CArrayDouble< N > >
 
struct  TTypeName< mrpt::math::CArrayFloat< N > >
 
struct  TTypeName< mrpt::math::CArrayNumeric< T, N > >
 
struct  TTypeName< mrpt::math::CMatrixFixedNumeric< T, N, M > >
 
struct  TTypeName< mrpt::math::CMatrixTemplateNumeric< T > >
 
struct  TTypeName< mrpt::opengl::CLight >
 
struct  TTypeName< std::pair< T1, T2 > >
 
struct  uint_select_by_bytecount
 Usage: uint_select_by_bytecount<N>type var; allows defining var as a unsigned integer with, at least, N bytes. More...
 
struct  uint_select_by_bytecount< 1 >
 
struct  uint_select_by_bytecount< 2 >
 
struct  uint_select_by_bytecount< 3 >
 
struct  uint_select_by_bytecount< 4 >
 
struct  uint_select_by_bytecount< 8 >
 

Typedefs

typedef int TFileOpenModes
 File open modes are used in CFileStream Posible values are: More...
 
typedef int TImageChannels
 For use in mrpt::utils::CImage. More...
 
typedef CThreadSafeQueue< CMessageCMessageQueue
 A thread-safe class for message passing between threads. More...
 
template<typename T >
using poly_ptr = internal::generic_copier_ptr< T, internal::CopyCloner< T > >
 Smart pointer for polymorphic classes with a clone() method. More...
 
template<typename T >
using copy_ptr = internal::generic_copier_ptr< T, internal::CopyStatic< T > >
 Smart pointer for non-polymorphic classes. More...
 
typedef safe_ptr_basic< voidvoid_ptr
 
typedef non_copiable_ptr_basic< voidvoid_ptr_noncopy
 
typedef TMatchingPairTMatchingPairPtr
 
typedef TMatchingPair const * TMatchingPairConstPtr
 
typedef TParameters< double > TParametersDouble
 See the generic template mrpt::utils::TParameters. More...
 
typedef TParameters< std::stringTParametersString
 See the generic template mrpt::utils::TParameters. More...
 
typedef TPixelCoord TImageSize
 A type for image sizes. More...
 
typedef unsigned long POINTER_TYPE
 For performing type casting from a pointer to its numeric value. More...
 
typedef uint64_t TNodeID
 The type for node IDs in graphs of different types. More...
 
typedef std::pair< TNodeID, TNodeIDTPairNodeIDs
 A pair of node IDs. More...
 
template<typename... T>
using variant = mapbox::util::variant< T... >
 
typedef std::map< std::string, const TRuntimeClassId * > TClassnameToRuntimeId
 
typedef void(* TRegisterFunction) ()
 

Enumerations

enum  { fomRead = 1, fomWrite = 2, fomAppend = 4 }
 
enum  TInterpolationMethod { IMG_INTERP_NN = 0, IMG_INTERP_LINEAR = 1, IMG_INTERP_CUBIC = 2, IMG_INTERP_AREA = 3 }
 Interpolation methods for images. More...
 
enum  TConstructorFlags_CImage { UNINITIALIZED_IMAGE = 0, FAST_REF_OR_CONVERT_TO_GRAY = 1 }
 For usage in one of the CImage constructors. More...
 
enum  TColormap { cmGRAYSCALE = 0, cmJET, cmHOT }
 Different colormaps for use in mrpt::utils::colormap() More...
 

Functions

double DEG2RAD (const double x)
 Degrees to radians. More...
 
float DEG2RAD (const float x)
 Degrees to radians. More...
 
float DEG2RAD (const int x)
 Degrees to radians. More...
 
double RAD2DEG (const double x)
 Radians to degrees. More...
 
float RAD2DEG (const float x)
 Radians to degrees. More...
 
template<typename T >
int sign (T x)
 Returns the sign of X as "1" or "-1". More...
 
template<typename T >
int signWithZero (T x)
 Returns the sign of X as "0", "1" or "-1". More...
 
template<typename T >
lowestPositive (const T a, const T b)
 Returns the lowest, possitive among two numbers. More...
 
template<typename T >
abs_diff (const T a, const T b)
 Efficient and portable evaluation of the absolute difference of two unsigned integer values (but will also work for signed and floating point types) More...
 
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)
 
template<typename T >
int fix (T x)
 Rounds toward zero. More...
 
template<class R , class SMART_PTR >
RgetAs (SMART_PTR &o)
 Utility to get a cast'ed pointer from a smart pointer. More...
 
template<class R , class SMART_PTR >
const RgetAs (const SMART_PTR &o)
 Utility to get a cast'ed pointer from a smart pointer. More...
 
void reverseBytesInPlace (bool &v_in_out)
 Reverse the order of the bytes of a given type (useful for transforming btw little/big endian) More...
 
void reverseBytesInPlace (uint8_t &v_in_out)
 
void reverseBytesInPlace (int8_t &v_in_out)
 
void reverseBytesInPlace (uint16_t &v_in_out)
 
void reverseBytesInPlace (int16_t &v_in_out)
 
void reverseBytesInPlace (uint32_t &v_in_out)
 
void reverseBytesInPlace (int32_t &v_in_out)
 
void reverseBytesInPlace (uint64_t &v_in_out)
 
void reverseBytesInPlace (int64_t &v_in_out)
 
void reverseBytesInPlace (float &v_in_out)
 
void reverseBytesInPlace (double &v_in_out)
 
template<class T >
void 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) More...
 
template<typename T , typename K >
void keep_min (T &var, const K test_val)
 If the second argument is below the first one, set the first argument to this lower value. More...
 
template<typename T , typename K >
void keep_max (T &var, const K test_val)
 If the second argument is above the first one, set the first argument to this higher value. More...
 
template<typename T >
void saturate (T &var, const T sat_min, const T sat_max)
 Saturate the value of var (the variable gets modified) so it does not get out of [min,max]. More...
 
template<typename T >
saturate_val (const T &value, const T sat_min, const T sat_max)
 Like saturate() but it returns the value instead of modifying the variable. More...
 
template<class T >
void delete_safe (T *&ptr)
 Calls "delete" to free an object only if the pointer is not nullptr, then set the pointer to NULL. More...
 
template<class VECTOR_T >
void vector_strong_clear (VECTOR_T &v)
 Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory. More...
 
template<typename T >
length2length4N (T len)
 Returns the smaller number >=len such that it's a multiple of 4. More...
 
int MRPT_SAVE_NAME_PADDING ()
 Default padding sizes for macros MRPT_SAVE_CONFIG_VAR_COMMENT(), etc. More...
 
int MRPT_SAVE_VALUE_PADDING ()
 
void registerAllPendingClasses ()
 Register all pending classes - to be called just before de-serializing an object, for example. More...
 
void hsv2rgb (float h, float s, float v, float &r, float &g, float &b)
 Transform HSV color components to RGB, all of them in the range [0,1]. More...
 
void rgb2hsv (float r, float g, float b, float &h, float &s, float &v)
 Transform RGB color components to HSV, all of them in the range [0,1]. More...
 
void colormap (const TColormap &color_map, const float color_index, float &r, float &g, float &b)
 Transform a float number in the range [0,1] into RGB components. More...
 
void jet2rgb (const float color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap. More...
 
void hot2rgb (const float color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap. More...
 
uint16_t compute_CRC16 (const std::vector< uint8_t > &data, const uint16_t gen_pol=0x8005)
 Computes the CRC16 checksum of a block of data. More...
 
uint16_t compute_CRC16 (const uint8_t *data, const size_t len, const uint16_t gen_pol=0x8005)
 
uint32_t compute_CRC32 (const std::vector< uint8_t > &data, const uint32_t gen_pol=0xEDB88320L)
 Computes the CRC32 checksum of a block of data. More...
 
uint32_t compute_CRC32 (const uint8_t *data, const size_t len, const uint32_t gen_pol=0xEDB88320L)
 
std::string ObjectToString (const CSerializable *o)
 Used to pass MRPT objects into a CORBA-like object (strings). More...
 
void StringToObject (const std::string &str, CSerializable::Ptr &obj)
 Used to pass CORBA-like objects (strings) into a MRPT object. More...
 
void ObjectToOctetVector (const CSerializable *o, vector_byte &out_vector)
 Converts (serializes) an MRPT object into an array of bytes. More...
 
void OctetVectorToObject (const vector_byte &in_data, CSerializable::Ptr &obj)
 Converts back (de-serializes) a sequence of binary data into a MRPT object, without prior information about the object's class. More...
 
void ObjectToRawString (const CSerializable *o, std::string &out_str)
 Converts (serializes) an MRPT object into an array of bytes within a std::string, without codifying to avoid nullptr characters. More...
 
void RawStringToObject (const std::string &in_str, CSerializable::Ptr &obj)
 Converts back (de-serializes) a sequence of binary data within a std::string into a MRPT object, without prior information about the object's class. More...
 
CStreamoperator<< (mrpt::utils::CStream &s, const char *a)
 
CStreamoperator<< (mrpt::utils::CStream &s, const std::string &str)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_int &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_uint &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_word &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_signed_word &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_long &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_byte &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_signed_byte &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const vector_bool &a)
 
CStreamoperator<< (mrpt::utils::CStream &, const std::vector< std::string > &)
 
CStreamoperator<< (mrpt::utils::CStream &, const std::vector< size_t > &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, char *a)
 
CStreamoperator>> (mrpt::utils::CStream &in, std::string &str)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_int &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_uint &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_word &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_signed_word &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_long &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_byte &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_signed_byte &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, vector_bool &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, std::vector< std::string > &a)
 
CStreamoperator>> (mrpt::utils::CStream &s, std::vector< float > &a)
 
CStreamoperator>> (mrpt::utils::CStream &s, std::vector< double > &a)
 
CStreamoperator<< (mrpt::utils::CStream &s, const std::vector< float > &a)
 
CStreamoperator<< (mrpt::utils::CStream &s, const std::vector< double > &a)
 
CStreamoperator>> (mrpt::utils::CStream &s, std::vector< size_t > &a)
 
template<typename T , std::enable_if_t< std::is_base_of< mrpt::utils::CSerializable, T >::value > * = nullptr>
mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, typename std::shared_ptr< T > &pObj)
 
template<typename... T>
mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, typename mrpt::utils::variant< T... > &pObj)
 
template<typename... T>
mrpt::utils::CStreamoperator<< (mrpt::utils::CStream &out, const typename mrpt::utils::variant< T... > &pObj)
 
std::string md5 (const std::string &str)
 Computes the md5 of a block of data. More...
 
std::string md5 (const mrpt::vector_byte &str)
 Computes the md5 of a block of data. More...
 
std::string md5 (const unsigned char *data, const size_t len)
 Computes the md5 of a block of data. More...
 
template<typename T >
std::string sprintf_vector (const char *fmt, const std::vector< T > &V)
 Generates a string for a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element. More...
 
template<typename Derived >
std::string sprintf_vector (const char *fmt, const Eigen::MatrixBase< Derived > &V)
 
template<typename T >
void printf_vector (const char *fmt, const std::vector< T > &V)
 Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element. More...
 
template<typename T >
int round (const T value)
 Returns the closer integer (int) to x. More...
 
template<typename T >
long round_long (const T value)
 Returns the closer integer (long) to x. More...
 
template<class T >
round_10power (T val, int power10)
 Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 means round up to: 1 -> 10, 2 -> 100, 3 -> 1000, ... More...
 
template<typename ZMQ_SOCKET_TYPE >
void mrpt_send_to_zmq (ZMQ_SOCKET_TYPE zmq_socket, const mrpt::utils::CSerializable &obj, const size_t max_packet_len=0)
 Send an MRPT object to a ZMQ socket. More...
 
template<typename ZMQ_SOCKET_TYPE , typename VECTOR_MSG_T >
bool mrpt_recv_from_zmq_buf (ZMQ_SOCKET_TYPE zmq_socket, VECTOR_MSG_T &out_lst_msgs, mrpt::utils::CMemoryStream &target_buf, bool dont_wait, size_t *rx_obj_length_in_bytes)
 Users may normally call mrpt_recv_from_zmq() and mrpt_recv_from_zmq_into(). More...
 
template<typename ZMQ_SOCKET_TYPE >
mrpt::utils::CSerializable::Ptr mrpt_recv_from_zmq (ZMQ_SOCKET_TYPE zmq_socket, bool dont_wait=false, size_t *rx_obj_length_in_bytes=nullptr)
 Receives an MRPT object from a ZMQ socket, determining the type of the object on-the-fly. More...
 
template<typename ZMQ_SOCKET_TYPE >
bool mrpt_recv_from_zmq_into (ZMQ_SOCKET_TYPE zmq_socket, mrpt::utils::CSerializable &target_object, bool dont_wait=false, size_t *rx_obj_length_in_bytes=nullptr)
 Like mrpt_recv_from_zmq() but without dynamically allocating the received object, more efficient to use if the type of the received object is known in advance. More...
 
template<class T , class CONTAINER >
size_t find_in_vector (const T &value, const CONTAINER &vect)
 Returns the index of the value "T" in the container "vect" (std::vector,std::deque,etc), or string::npos if not found. More...
 
template<class T >
std::list< T >::iterator erase_return_next (std::list< T > &cont, typename std::list< T >::iterator &it)
 Calls the standard "erase" method of a STL container, but also returns an iterator to the next element in the container (or end if none) More...
 
template<class K , class V >
std::map< K, V >::iterator erase_return_next (std::map< K, V > &cont, typename std::map< K, V >::iterator &it)
 
template<class K , class V >
std::multimap< K, V >::iterator erase_return_next (std::multimap< K, V > &cont, typename std::multimap< K, V >::iterator &it)
 
template<class T >
std::set< T >::iterator erase_return_next (std::set< T > &cont, typename std::set< T >::iterator &it)
 
template<class T >
std::string getSTLContainerAsString (const T &t)
 Return a STL container in std::string form. More...
 
template<class T >
void printSTLContainer (const T &t)
 Print the given vector t. More...
 
template<class T >
void printSTLContainerOfContainers (const T &t)
 Print the given STL container of containers t. More...
 
template<class T1 , class T2 >
std::string getMapAsString (const std::map< T1, T2 > &m, const std::string &sep=" => ")
 Return contents of map in a string representation. More...
 
template<class T1 , class T2 >
void printMap (const std::map< T1, T2 > &m)
 Print the given map m. More...
 
 MRPTSTL_SERIALIZABLE_SEQ_CONTAINER (std::vector) MRPTSTL_SERIALIZABLE_SEQ_CONTAINER(std
 Template method to serialize a STL pair. More...
 
template<class T1 , class T2 >
CStreamoperator>> (mrpt::utils::CStream &in, std::pair< T1, T2 > &obj)
 Template method to deserialize a STL pair. More...
 
bool operator== (const mrpt::utils::TCamera &a, const mrpt::utils::TCamera &b)
 
bool operator!= (const mrpt::utils::TCamera &a, const mrpt::utils::TCamera &b)
 
std::ostream & operator<< (std::ostream &o, const TColor &c)
 
CStreamoperator<< (mrpt::utils::CStream &o, const TColor &c)
 
CStreamoperator>> (mrpt::utils::CStream &i, TColor &c)
 
TColor operator+ (const TColor &first, const TColor &second)
 Pairwise addition of their corresponding RGBA members. More...
 
TColor operator- (const TColor &first, const TColor &second)
 Pairwise substraction of their corresponding RGBA members. More...
 
bool operator== (const TColor &first, const TColor &second)
 
std::ostream & operator<< (std::ostream &o, const TColorf &c)
 
CStreamoperator<< (mrpt::utils::CStream &o, const TColorf &c)
 
CStreamoperator>> (mrpt::utils::CStream &i, TColorf &c)
 
bool operator< (const TMatchingPair &a, const TMatchingPair &b)
 A comparison operator, for sorting lists of TMatchingPair's, first order by this_idx, if equals, by other_idx. More...
 
bool operator== (const TMatchingPair &a, const TMatchingPair &b)
 A comparison operator. More...
 
bool operator== (const TMatchingPairList &a, const TMatchingPairList &b)
 A comparison operator. More...
 
std::ostream & operator<< (std::ostream &o, const TPixelCoordf &p)
 Prints TPixelCoordf as "(x,y)". More...
 
std::ostream & operator<< (std::ostream &o, const TPixelCoord &p)
 Prints TPixelCoord as "(x,y)". More...
 
void reduced_hash (const std::string &value, uint8_t &hash)
 hash function used by ts_hash_map. More...
 
void reduced_hash (const std::string &value, uint16_t &hash)
 hash function used by ts_hash_map. More...
 
void reduced_hash (const std::string &value, uint32_t &hash)
 hash function used by ts_hash_map. More...
 
void reduced_hash (const std::string &value, uint64_t &hash)
 hash function used by ts_hash_map. More...
 
template<typename KEY , typename VALUE , unsigned int NUM_BYTES_HASH_TABLE = 1, unsigned int NUM_HAS_TABLE_COLLISIONS_ALLOWED = 5, typename VECTOR_T = std::array< std::array<ts_map_entry<KEY, VALUE>, NUM_HAS_TABLE_COLLISIONS_ALLOWED>, 1u << (8 * NUM_BYTES_HASH_TABLE)>>class ts_hash_map{ public: typedef ts_hash_map<KEY, VALUE, NUM_BYTES_HASH_TABLE, NUM_HAS_TABLE_COLLISIONS_ALLOWED, VECTOR_T> self_t; typedef KEY key_type; typedef ts_map_entry<KEY, VALUE> value_type; typedef VECTOR_T vec_t; struct iterator; struct const_iterator { public: const_iterator() : m_vec(nullptr), m_parent(nullptr), m_idx_outer(0), m_idx_inner(0) { } const_iterator( const VECTOR_T& vec, const self_t& parent, int idx_outer, int idx_inner) : m_vec(const_cast<VECTOR_T*>(&vec)), m_parent(const_cast<self_t*>(&parent)), m_idx_outer(idx_outer), m_idx_inner(idx_inner) { } const_iterator& operator=(const const_iterator& o) { m_vec = o.m_vec; m_idx_outer = o.m_idx_outer; m_idx_inner = o.m_idx_inner; return *this; } bool operator==(const const_iterator& o) const { return m_vec == o.m_vec && m_idx_outer == o.m_idx_outer && m_idx_inner == o.m_idx_inner; } bool operator!=(const const_iterator& o) const { return !(*this == o); } const value_type& operator*() const { return (*m_vec)[m_idx_outer][m_idx_inner]; } const value_type* operator->() const { return &(*m_vec)[m_idx_outer][m_idx_inner]; } inline const_iterator operator++(int) { const_iterator aux = *this; ++(*this); return aux; } inline const_iterator& operator++() { incr(); return *this; } protected: VECTOR_T* m_vec; self_t* m_parent; int m_idx_outer>
iterator operator++ (int)
 A thread-safe (ts) container which minimally emulates a std::map<>'s [] and find() methods but which is implemented as a linear vector indexed by a hash of KEY. More...
 
iteratoroperator++ ()
 
CStreamoperator<< (mrpt::utils::CStream &s, const mrpt::math::CVectorFloat &a)
 
CStreamoperator<< (mrpt::utils::CStream &s, const mrpt::math::CVectorDouble &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, mrpt::math::CVectorDouble &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, mrpt::math::CVectorFloat &a)
 
std::atomic< int > & pending_class_registers_count ()
 
CThreadSafeQueue< TRegisterFunction > & pending_class_registers ()
 
CStreamoperator<< (mrpt::utils::CStream &out, const COctoMapVoxels::TInfoPerVoxelSet &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, COctoMapVoxels::TInfoPerVoxelSet &a)
 
CStreamoperator<< (mrpt::utils::CStream &out, const COctoMapVoxels::TGridCube &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, COctoMapVoxels::TGridCube &a)
 
CStreamoperator<< (mrpt::utils::CStream &out, const COctoMapVoxels::TVoxel &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, COctoMapVoxels::TVoxel &a)
 
Auxiliary stuff for the global profiler used in MRPT_START / MRPT_END

macros.

void global_profiler_enter (const char *func_name) noexcept
 
void global_profiler_leave (const char *func_name) noexcept
 
mrpt::utils::CTimeLoggerglobal_profiler_getref () noexcept
 
RTTI classes and functions
void registerClass (const mrpt::utils::TRuntimeClassId *pNewClass)
 Register a class into the MRPT internal list of "CSerializable" descendents. More...
 
void registerClassCustomName (const char *customName, const TRuntimeClassId *pNewClass)
 Mostly for internal use within mrpt sources, to handle exceptional cases with multiple serialization names for backward compatibility (CMultiMetricMaps, CImage,...) More...
 
std::vector< const mrpt::utils::TRuntimeClassId * > getAllRegisteredClasses ()
 Returns a list with all the classes registered in the system through mrpt::utils::registerClass. More...
 
std::vector< const TRuntimeClassId * > getAllRegisteredClassesChildrenOf (const TRuntimeClassId *parent_id)
 Like getAllRegisteredClasses(), but filters the list to only include children clases of a given base one. More...
 
const TRuntimeClassIdfindRegisteredClass (const std::string &className)
 Return info about a given class by its name, or nullptr if the class is not registered. More...
 
template<typename T >
constexpr const mrpt::utils::TRuntimeClassIdCLASS_ID_impl ()
 
Parsing of textfiles with poses
template<class POSE_T >
void readFileWithPoses (const std::string &fname, std::vector< POSE_T > *poses_vec, std::vector< mrpt::system::TTimeStamp > *timestamps=NULL, bool substract_init_offset=false)
 Parse the textfile and fill in the corresponding poses vector. More...
 
Constructors, read/write access and other operations
 ts_hash_map ()
 < Default constructor */ More...
 
void clear ()
 Clear the contents of this container. More...
 
bool empty () const
 
VALUE & operator[] (const KEY &key)
 Write/read via [i] operator, that creates an element if it didn't exist already. More...
 
const_iterator find (const KEY &key) const
 
const_iterator begin () const
 
const_iterator end () const
 

Variables

vec_t m_vec
 The actual container. More...
 
size_t m_size
 Number of elements accessed with write access so far. More...
 
std::string MRPT_GLOBAL_UNITTEST_SRC_DIR
 
volatile bool pending_class_registers_modified = false
 Set to true if pending_class_registers() has been called after registerAllPendingClasses(). More...
 

Typedef Documentation

◆ TClassnameToRuntimeId

Definition at line 51 of file internal_class_registry.cpp.

◆ TFileOpenModes

File open modes are used in CFileStream Posible values are:

  • fomRead
  • fomWrite (creates the file if it didn't exist, otherwise truncates it).
  • fomAppend (creates the file if it didn't exist)

Definition at line 26 of file CFileStream.h.

◆ TImageChannels

For use in mrpt::utils::CImage.

Definition at line 41 of file CImage.h.

◆ TImageSize

A type for image sizes.

Definition at line 52 of file TPixelCoord.h.

◆ TMatchingPairConstPtr

Definition at line 88 of file TMatchingPair.h.

◆ TMatchingPairPtr

Definition at line 87 of file TMatchingPair.h.

◆ TParametersDouble

See the generic template mrpt::utils::TParameters.

Definition at line 150 of file TParameters.h.

◆ TParametersString

See the generic template mrpt::utils::TParameters.

Definition at line 152 of file TParameters.h.

◆ TRegisterFunction

typedef void(* mrpt::utils::TRegisterFunction) ()

Definition at line 19 of file internal_class_registry.h.

◆ variant

template<typename... T>
using mrpt::utils::variant = typedef mapbox::util::variant<T...>

Definition at line 18 of file variant.h.

◆ void_ptr

Definition at line 361 of file safe_pointers.h.

◆ void_ptr_noncopy

Definition at line 362 of file safe_pointers.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
fomRead 
fomWrite 
fomAppend 

Definition at line 27 of file CFileStream.h.

◆ TConstructorFlags_CImage

For usage in one of the CImage constructors.

Enumerator
UNINITIALIZED_IMAGE 
FAST_REF_OR_CONVERT_TO_GRAY 

Definition at line 46 of file CImage.h.

Function Documentation

◆ abs_diff()

template<typename T >
T mrpt::utils::abs_diff ( const T  a,
const T  b 
)
inline

Efficient and portable evaluation of the absolute difference of two unsigned integer values (but will also work for signed and floating point types)

Definition at line 150 of file bits.h.

References min.

◆ begin()

iterator mrpt::utils::begin ( ) const

◆ CLASS_ID_impl()

template<typename T >
constexpr const mrpt::utils::TRuntimeClassId* mrpt::utils::CLASS_ID_impl ( )

Definition at line 78 of file CObject.h.

◆ clear()

void mrpt::utils::clear ( )

Clear the contents of this container.

Definition at line 189 of file ts_hash_map.h.

References m_size, and m_vec.

Referenced by mrpt::slam::CIncrementalMapPartitioner::CIncrementalMapPartitioner(), mrpt::math::CPolygon::Clear(), mrpt::maps::CMultiMetricMapPDF::clear(), mrpt::math::MatrixBlockSparseCols< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::clearColEntries(), mrpt::maps::CMultiMetricMapPDF::CMultiMetricMapPDF(), mrpt::maps::COccupancyGridMap2D::findCriticalPoints(), IMPLEMENTS_SERIALIZABLE(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::hwdrivers::CTuMicos::init(), mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations(), mrpt::obs::CRawlog::loadFromRawLogFile(), mrpt::poses::CPoseInterpolatorBase< 3 >::loadFromTextFile(), mrpt::vision::TSequenceFeatureObservations::loadFromTextFile(), mrpt::utils::CSimpleDatabase::loadFromXML(), mrpt::obs::CRawlog::moveFrom(), mrpt::hmtslam::TArcList::read(), mrpt::utils::CPropertiesValuesList::readFromStream(), mrpt::opengl::C3DSScene::readFromStream(), mrpt::opengl::CSetOfObjects::readFromStream(), mrpt::maps::CColouredOctoMap::readFromStream(), mrpt::maps::COctoMap::readFromStream(), mrpt::hmtslam::CHierarchicalMHMap::readFromStream(), mrpt::utils::CMHPropertiesValuesList::readFromStream(), mrpt::hmtslam::CRobotPosesGraph::readFromStream(), mrpt::opengl::CAssimpModel::readFromStream(), mrpt::maps::CBeaconMap::readFromStream(), mrpt::obs::CRawlog::readFromStream(), mrpt::obs::CObservationGPS::readFromStream(), mrpt::hmtslam::THypothesisIDSet::readFromStream(), mrpt::utils::CSimpleDatabase::readFromStream(), mrpt::poses::CPosePDFParticles::resetAroundSetOfPoses(), mrpt::poses::CPosePDFParticles::resetDeterministic(), mrpt::poses::CPosePDFParticles::resetUniform(), mrpt::nav::ClearanceDiagram::resize(), run_rnav_test(), mrpt::graphslam::TUncertaintyPath< GRAPH_T >::TUncertaintyPath(), mrpt::hmtslam::CHierarchicalMHMap::~CHierarchicalMHMap(), mrpt::slam::CIncrementalMapPartitioner::~CIncrementalMapPartitioner(), mrpt::utils::CMHPropertiesValuesList::~CMHPropertiesValuesList(), mrpt::utils::CPropertiesValuesList::~CPropertiesValuesList(), mrpt::obs::CRawlog::~CRawlog(), mrpt::opengl::CSetOfObjects::~CSetOfObjects(), and mrpt::utils::CSimpleDatabase::~CSimpleDatabase().

Here is the caller graph for this function:

◆ DEG2RAD() [1/3]

double mrpt::utils::DEG2RAD ( const double  x)
inline

◆ DEG2RAD() [2/3]

float mrpt::utils::DEG2RAD ( const float  x)
inline

Degrees to radians.

Definition at line 98 of file bits.h.

References M_PIf.

◆ DEG2RAD() [3/3]

float mrpt::utils::DEG2RAD ( const int  x)
inline

Degrees to radians.

Definition at line 100 of file bits.h.

References M_PIf.

◆ delete_safe()

template<class T >
void mrpt::utils::delete_safe ( T *&  ptr)

Calls "delete" to free an object only if the pointer is not nullptr, then set the pointer to NULL.

Definition at line 253 of file bits.h.

◆ empty()

bool mrpt::utils::empty ( ) const

Definition at line 197 of file ts_hash_map.h.

References m_size.

Referenced by mrpt::utils::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::Load().

Here is the caller graph for this function:

◆ end()

iterator mrpt::utils::end ( ) const

◆ find()

const_iterator mrpt::utils::find ( const KEY &  key) const

Definition at line 220 of file ts_hash_map.h.

References end(), m_vec, and reduced_hash().

Referenced by mrpt::opengl::CPolyhedron::addEdges(), mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::checkPartitionsForLC(), mrpt::opengl::CSetOfObjects::contains(), mrpt::opengl::COpenGLStandardObject::enable(), mrpt::graphs::ScalarFactorGraph::eraseConstraint(), mrpt::opengl::CPolyhedron::facesInVertex(), mrpt::utils::list_searchable< CHMHMapNode::TNodeID >::find(), xsens::List< uint32_t >::findSorted(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationFrom(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationTo(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationValue(), getVerticesAndFaces(), mrpt::utils::TParameters< double >::getWithDefaultVal(), mrpt::utils::TParameters< double >::has(), mrpt::hmtslam::THypothesisIDSet::has(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::initClass(), mrpt::math::CBinaryRelation< T, U, UIsObject >::insertElements(), mrpt::opengl::COpenGLStandardObject::isEnabled(), mrpt::utils::TParameters< double >::operator[](), mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_implementation(), mrpt::math::CBinaryRelation< T, U, UIsObject >::removeElement(), mrpt::math::CBinaryRelation< T, U, UIsObject >::removeElements(), mrpt::math::CBinaryRelation< T, U, UIsObject >::setRelationValue(), and mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::updateMapPartitionsVisualization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findRegisteredClass()

const TRuntimeClassId * mrpt::mrpt::utils::findRegisteredClass ( const std::string className)

◆ fix()

template<typename T >
int mrpt::utils::fix ( x)
inline

Rounds toward zero.

Definition at line 168 of file bits.h.

Referenced by mrpt::topography::GeodeticToUTM(), and mrpt::topography::geodeticToUTM().

Here is the caller graph for this function:

◆ getAllRegisteredClasses()

std::vector< const TRuntimeClassId * > mrpt::utils::getAllRegisteredClasses ( )

Returns a list with all the classes registered in the system through mrpt::utils::registerClass.

See also
registerClass, findRegisteredClass

Definition at line 184 of file internal_class_registry.cpp.

References mrpt::utils::CClassRegistry::getListOfAllRegisteredClasses(), and mrpt::utils::CClassRegistry::Instance().

Referenced by getAllRegisteredClassesChildrenOf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllRegisteredClassesChildrenOf()

std::vector< const TRuntimeClassId * > mrpt::utils::getAllRegisteredClassesChildrenOf ( const TRuntimeClassId parent_id)

Like getAllRegisteredClasses(), but filters the list to only include children clases of a given base one.

See also
getAllRegisteredClasses(), getAllRegisteredClassesChildrenOf()

Definition at line 189 of file internal_class_registry.cpp.

References getAllRegisteredClasses().

Referenced by mrpt::nav::CAbstractPTGBasedReactive::saveConfigFile(), and mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::saveToConfigFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAs() [1/2]

template<class R , class SMART_PTR >
R* mrpt::utils::getAs ( SMART_PTR &  o)
inline

Utility to get a cast'ed pointer from a smart pointer.

Definition at line 179 of file bits.h.

References R.

◆ getAs() [2/2]

template<class R , class SMART_PTR >
const R* mrpt::utils::getAs ( const SMART_PTR &  o)
inline

Utility to get a cast'ed pointer from a smart pointer.

Definition at line 186 of file bits.h.

References R.

◆ global_profiler_enter()

void mrpt::utils::global_profiler_enter ( const char *  func_name)
noexcept

Definition at line 44 of file CTimeLogger.cpp.

References mrpt::utils::CTimeLogger::enter(), and global_profiler.

Referenced by mrpt::utils::CProfilerProxy::CProfilerProxy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global_profiler_getref()

CTimeLogger & mrpt::utils::global_profiler_getref ( )
noexcept

Definition at line 43 of file CTimeLogger.cpp.

References global_profiler.

◆ global_profiler_leave()

void mrpt::utils::global_profiler_leave ( const char *  func_name)
noexcept

Definition at line 48 of file CTimeLogger.cpp.

References global_profiler, and mrpt::utils::CTimeLogger::leave().

Referenced by mrpt::utils::CProfilerProxy::~CProfilerProxy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ keep_max()

template<typename T , typename K >
void mrpt::utils::keep_max ( T &  var,
const K  test_val 
)
inline

◆ keep_min()

template<typename T , typename K >
void mrpt::utils::keep_min ( T &  var,
const K  test_val 
)
inline

◆ length2length4N()

template<typename T >
T mrpt::utils::length2length4N ( len)

Returns the smaller number >=len such that it's a multiple of 4.

Definition at line 273 of file bits.h.

Referenced by mrpt::maps::CWeightedPointsMap::reserve(), mrpt::maps::CSimplePointsMap::reserve(), and mrpt::maps::CColouredPointsMap::reserve().

Here is the caller graph for this function:

◆ lowestPositive()

template<typename T >
T mrpt::utils::lowestPositive ( const T  a,
const T  b 
)

Returns the lowest, possitive among two numbers.

If both are non-positive (<=0), the lowest one is returned.

Definition at line 136 of file bits.h.

◆ max3()

template<typename T >
const T mrpt::utils::max3 ( const T &  A,
const T &  B,
const T &  C 
)
inline

Definition at line 161 of file bits.h.

Referenced by mrpt::maps::CBeaconMap::internal_insertObservation(), mrpt::maps::COccupancyGridMap2D::internal_insertObservation(), and rgb2hsv().

Here is the caller graph for this function:

◆ min3()

template<typename T >
const T mrpt::utils::min3 ( const T &  A,
const T &  B,
const T &  C 
)
inline

Definition at line 156 of file bits.h.

Referenced by mrpt::nav::CHolonomicND::evaluateGaps(), mrpt::maps::COccupancyGridMap2D::internal_insertObservation(), and rgb2hsv().

Here is the caller graph for this function:

◆ MRPT_SAVE_NAME_PADDING()

int mrpt::utils::MRPT_SAVE_NAME_PADDING ( )

◆ MRPT_SAVE_VALUE_PADDING()

int mrpt::utils::MRPT_SAVE_VALUE_PADDING ( )

◆ operator!=()

bool mrpt::utils::operator!= ( const mrpt::utils::TCamera a,
const mrpt::utils::TCamera b 
)

Definition at line 211 of file TCamera.cpp.

◆ operator+()

TColor mrpt::utils::operator+ ( const TColor first,
const TColor second 
)

Pairwise addition of their corresponding RGBA members.

Definition at line 18 of file TColor.cpp.

References mrpt::utils::TColor::A, mrpt::utils::TColor::B, mrpt::utils::TColor::G, and mrpt::utils::TColor::R.

◆ operator++() [1/2]

template<typename KEY , typename VALUE , unsigned int NUM_BYTES_HASH_TABLE = 1, unsigned int NUM_HAS_TABLE_COLLISIONS_ALLOWED = 5, typename VECTOR_T = std::array< std::array<ts_map_entry<KEY, VALUE>, NUM_HAS_TABLE_COLLISIONS_ALLOWED>, 1u << (8 * NUM_BYTES_HASH_TABLE)>>class ts_hash_map{ public: typedef ts_hash_map<KEY, VALUE, NUM_BYTES_HASH_TABLE, NUM_HAS_TABLE_COLLISIONS_ALLOWED, VECTOR_T> self_t; typedef KEY key_type; typedef ts_map_entry<KEY, VALUE> value_type; typedef VECTOR_T vec_t; struct iterator; struct const_iterator { public: const_iterator() : m_vec(nullptr), m_parent(nullptr), m_idx_outer(0), m_idx_inner(0) { } const_iterator( const VECTOR_T& vec, const self_t& parent, int idx_outer, int idx_inner) : m_vec(const_cast<VECTOR_T*>(&vec)), m_parent(const_cast<self_t*>(&parent)), m_idx_outer(idx_outer), m_idx_inner(idx_inner) { } const_iterator& operator=(const const_iterator& o) { m_vec = o.m_vec; m_idx_outer = o.m_idx_outer; m_idx_inner = o.m_idx_inner; return *this; } bool operator==(const const_iterator& o) const { return m_vec == o.m_vec && m_idx_outer == o.m_idx_outer && m_idx_inner == o.m_idx_inner; } bool operator!=(const const_iterator& o) const { return !(*this == o); } const value_type& operator*() const { return (*m_vec)[m_idx_outer][m_idx_inner]; } const value_type* operator->() const { return &(*m_vec)[m_idx_outer][m_idx_inner]; } inline const_iterator operator++(int) { const_iterator aux = *this; ++(*this); return aux; } inline const_iterator& operator++() { incr(); return *this; } protected: VECTOR_T* m_vec; self_t* m_parent; int m_idx_outer>
iterator mrpt::utils::operator++ ( int  )
inline

A thread-safe (ts) container which minimally emulates a std::map<>'s [] and find() methods but which is implemented as a linear vector indexed by a hash of KEY.

Any custom hash function can be implemented, we don't rely by default on C++11 std::hash<> due to its limitation in some implementations.

This implementation is much more efficient than std::map<> when the most common operation is accesing elements by KEY with find() or [], and is also thread-safe if different threads create entries with different hash values.

The default underlying non-associative container is a "memory-aligned std::vector<>", but it can be changed to a standard vector<> or to a deque<> (to avoid memory reallocations) by changing the template parameter VECTOR_T.

Note
Defined in #include <mrpt/utils/ts_hash_map.h>

Definition at line 164 of file ts_hash_map.h.

◆ operator++() [2/2]

iterator& mrpt::utils::operator++ ( )
inline

Definition at line 170 of file ts_hash_map.h.

◆ operator-()

TColor mrpt::utils::operator- ( const TColor first,
const TColor second 
)

Pairwise substraction of their corresponding RGBA members.

Definition at line 29 of file TColor.cpp.

References mrpt::utils::TColor::A, mrpt::utils::TColor::B, mrpt::utils::TColor::G, and mrpt::utils::TColor::R.

◆ operator<()

bool mrpt::mrpt::utils::operator< ( const TMatchingPair a,
const TMatchingPair b 
)

A comparison operator, for sorting lists of TMatchingPair's, first order by this_idx, if equals, by other_idx.

Definition at line 86 of file TMatchingPair.cpp.

◆ operator<<() [1/26]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TPixelCoordf p 
)

Prints TPixelCoordf as "(x,y)".

Definition at line 21 of file base/src/utils/types.cpp.

◆ operator<<() [2/26]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TPixelCoord p 
)

Prints TPixelCoord as "(x,y)".

Definition at line 30 of file base/src/utils/types.cpp.

◆ operator<<() [3/26]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TColor c 
)

Definition at line 83 of file TColor.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ operator<<() [4/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream o,
const TColor c 
)

Definition at line 95 of file TColor.cpp.

◆ operator<<() [5/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const mrpt::math::CVectorFloat a 
)

Definition at line 297 of file CStream.cpp.

◆ operator<<() [6/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const mrpt::math::CVectorDouble a 
)

Definition at line 305 of file CStream.cpp.

◆ operator<<() [7/26]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TColorf c 
)

Definition at line 108 of file TColor.cpp.

References mrpt::system::os::sprintf().

Here is the call graph for this function:

◆ operator<<() [8/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream o,
const TColorf c 
)

Definition at line 118 of file TColor.cpp.

◆ operator<<() [9/26]

CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const COctoMapVoxels::TInfoPerVoxelSet a 
)

Definition at line 218 of file COctoMapVoxels.cpp.

◆ operator<<() [10/26]

CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const COctoMapVoxels::TGridCube a 
)

Definition at line 231 of file COctoMapVoxels.cpp.

◆ operator<<() [11/26]

CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const COctoMapVoxels::TVoxel a 
)

Definition at line 243 of file COctoMapVoxels.cpp.

◆ operator<<() [12/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const char *  a 
)

Definition at line 123 of file CStream.cpp.

References mrpt::utils::CStream::WriteBuffer().

Referenced by mrpt::slam::CICP::ICP_Method_LM().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [13/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::string str 
)

Definition at line 147 of file CStream.cpp.

References mrpt::utils::CStream::WriteBuffer().

Here is the call graph for this function:

◆ operator<<() [14/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_int a 
)

Definition at line 269 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [15/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_uint a 
)

Definition at line 273 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [16/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_word a 
)

Definition at line 277 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [17/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_signed_word a 
)

Definition at line 281 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [18/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_long a 
)

Definition at line 285 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [19/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_byte a 
)

Definition at line 289 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [20/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_signed_byte a 
)

Definition at line 293 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [21/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream out,
const vector_bool a 
)

Definition at line 131 of file CStream.cpp.

References mrpt::utils::CStream::WriteBuffer().

Here is the call graph for this function:

◆ operator<<() [22/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< std::string > &  vec 
)

Definition at line 627 of file CStream.cpp.

◆ operator<<() [23/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< size_t > &  a 
)

Definition at line 370 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [24/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< float > &  a 
)

Definition at line 260 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [25/26]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< double > &  a 
)

Definition at line 264 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

Here is the call graph for this function:

◆ operator<<() [26/26]

template<typename... T>
mrpt::utils::CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const typename mrpt::utils::variant< T... > &  pObj 
)

Definition at line 530 of file CStream.h.

◆ operator==() [1/4]

bool mrpt::utils::operator== ( const TColor first,
const TColor second 
)

◆ operator==() [2/4]

bool mrpt::mrpt::utils::operator== ( const TMatchingPair a,
const TMatchingPair b 
)

A comparison operator.

Definition at line 94 of file TMatchingPair.cpp.

◆ operator==() [3/4]

bool mrpt::mrpt::utils::operator== ( const TMatchingPairList a,
const TMatchingPairList b 
)

A comparison operator.

Definition at line 99 of file TMatchingPair.cpp.

◆ operator==() [4/4]

bool mrpt::utils::operator== ( const mrpt::utils::TCamera a,
const mrpt::utils::TCamera b 
)

Definition at line 204 of file TCamera.cpp.

◆ operator>>() [1/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream i,
TColor c 
)

Definition at line 101 of file TColor.cpp.

◆ operator>>() [2/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
mrpt::math::CVectorDouble a 
)

Definition at line 359 of file CStream.cpp.

◆ operator>>() [3/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
mrpt::math::CVectorFloat a 
)

Definition at line 351 of file CStream.cpp.

◆ operator>>() [4/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream i,
TColorf c 
)

Definition at line 124 of file TColor.cpp.

◆ operator>>() [5/23]

CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
COctoMapVoxels::TInfoPerVoxelSet a 
)

Definition at line 224 of file COctoMapVoxels.cpp.

◆ operator>>() [6/23]

CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
COctoMapVoxels::TGridCube a 
)

Definition at line 237 of file COctoMapVoxels.cpp.

◆ operator>>() [7/23]

CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
COctoMapVoxels::TVoxel a 
)

Definition at line 248 of file COctoMapVoxels.cpp.

◆ operator>>() [8/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
char *  a 
)

Definition at line 407 of file CStream.cpp.

References ASSERT_.

◆ operator>>() [9/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
std::string str 
)

Definition at line 398 of file CStream.cpp.

◆ operator>>() [10/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_int a 
)

Definition at line 323 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [11/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_uint a 
)

Definition at line 327 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [12/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_word a 
)

Definition at line 331 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [13/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_signed_word a 
)

Definition at line 335 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [14/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_long a 
)

Definition at line 339 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [15/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_byte a 
)

Definition at line 343 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [16/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_signed_byte a 
)

Definition at line 347 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [17/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_bool a 
)

Definition at line 381 of file CStream.cpp.

◆ operator>>() [18/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
std::vector< std::string > &  a 
)

Definition at line 636 of file CStream.cpp.

◆ operator>>() [19/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream s,
std::vector< float > &  a 
)

Definition at line 315 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [20/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream s,
std::vector< double > &  a 
)

Definition at line 319 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [21/23]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream s,
std::vector< size_t > &  a 
)

Definition at line 375 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

Here is the call graph for this function:

◆ operator>>() [22/23]

template<typename T , std::enable_if_t< std::is_base_of< mrpt::utils::CSerializable, T >::value > * = nullptr>
mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
typename std::shared_ptr< T > &  pObj 
)

Definition at line 514 of file CStream.h.

References mrpt::utils::CStream::ReadObject().

Here is the call graph for this function:

◆ operator>>() [23/23]

template<typename... T>
mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
typename mrpt::utils::variant< T... > &  pObj 
)

Definition at line 522 of file CStream.h.

References mrpt::utils::CStream::ReadVariant().

Here is the call graph for this function:

◆ operator[]()

VALUE& mrpt::utils::operator[] ( const KEY &  key)

◆ pending_class_registers()

CThreadSafeQueue< TRegisterFunction > & mrpt::mrpt::utils::pending_class_registers ( )

Definition at line 40 of file internal_class_registry.cpp.

References pending_class_registers_modified.

Referenced by registerAllPendingClasses().

Here is the caller graph for this function:

◆ pending_class_registers_count()

std::atomic< int > & mrpt::mrpt::utils::pending_class_registers_count ( )

Definition at line 33 of file internal_class_registry.cpp.

Referenced by registerAllPendingClasses().

Here is the caller graph for this function:

◆ printf_vector()

template<typename T >
void mrpt::utils::printf_vector ( const char *  fmt,
const std::vector< T > &  V 
)

Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element.

Definition at line 56 of file printf_vector.h.

References sprintf_vector().

Referenced by mrpt::hmtslam::CHMTSLAM::TMessageLSLAMfromAA::dumpToConsole().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RAD2DEG() [1/2]

double mrpt::utils::RAD2DEG ( const double  x)
inline

Radians to degrees.

Definition at line 102 of file bits.h.

References M_PI.

◆ RAD2DEG() [2/2]

float mrpt::utils::RAD2DEG ( const float  x)
inline

Radians to degrees.

Definition at line 104 of file bits.h.

References M_PIf.

◆ reduced_hash() [1/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint8_t hash 
)

hash function used by ts_hash_map.

Uses dbj2 method

Definition at line 27 of file ts_hash_map.cpp.

References SELBYTE0, SELBYTE1, SELBYTE2, and SELBYTE3.

Referenced by find(), operator[](), reduced_hash(), and simple_test_hash_string().

Here is the caller graph for this function:

◆ reduced_hash() [2/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint16_t hash 
)

hash function used by ts_hash_map.

Uses dbj2 method

Definition at line 34 of file ts_hash_map.cpp.

References MAKEWORD16B, reduced_hash(), SELBYTE0, SELBYTE1, SELBYTE2, and SELBYTE3.

Here is the call graph for this function:

◆ reduced_hash() [3/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint32_t hash 
)

hash function used by ts_hash_map.

Uses dbj2 method

Definition at line 42 of file ts_hash_map.cpp.

References reduced_hash().

Here is the call graph for this function:

◆ reduced_hash() [4/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint64_t hash 
)

hash function used by ts_hash_map.

Uses dbj2 method

Definition at line 17 of file ts_hash_map.cpp.

◆ registerAllPendingClasses()

void mrpt::mrpt::utils::registerAllPendingClasses ( )

Register all pending classes - to be called just before de-serializing an object, for example.

After calling this method, pending_class_registers_modified is set to false until pending_class_registers() is invoked.

Definition at line 136 of file internal_class_registry.cpp.

References pending_class_registers(), pending_class_registers_count(), and pending_class_registers_modified.

Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG(), mrpt::utils::TRuntimeClassId::derivedFrom(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::Factory(), mrpt::nav::CAbstractHolonomicReactiveMethod::Factory(), registerClass(), and registerClassCustomName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerClass()

void mrpt::utils::registerClass ( const mrpt::utils::TRuntimeClassId pNewClass)

Register a class into the MRPT internal list of "CSerializable" descendents.

Used internally in the macros DEFINE_SERIALIZABLE, etc...

See also
getAllRegisteredClasses

Definition at line 158 of file internal_class_registry.cpp.

References mrpt::utils::CClassRegistry::Add(), mrpt::utils::TRuntimeClassId::className, mrpt::utils::CClassRegistry::Instance(), and registerAllPendingClasses().

Referenced by mrpt::utils::CLASSINIT::CLASSINIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerClassCustomName()

void mrpt::utils::registerClassCustomName ( const char *  customName,
const TRuntimeClassId pNewClass 
)

Mostly for internal use within mrpt sources, to handle exceptional cases with multiple serialization names for backward compatibility (CMultiMetricMaps, CImage,...)

For internal use within mrpt sources, and only in exceptional cases (CMultiMetricMaps, CImage,...)

Definition at line 171 of file internal_class_registry.cpp.

References mrpt::utils::CClassRegistry::Add(), mrpt::utils::CClassRegistry::Instance(), and registerAllPendingClasses().

Here is the call graph for this function:

◆ reverseBytes()

template<class T >
void mrpt::utils::reverseBytes ( const T &  v_in,
T &  v_out 
)
inline

Reverse the order of the bytes of a given type (useful for transforming btw little/big endian)

Definition at line 211 of file bits.h.

References reverseBytesInPlace().

Referenced by get_binary_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverseBytesInPlace() [1/11]

void mrpt::utils::reverseBytesInPlace ( bool &  v_in_out)

Reverse the order of the bytes of a given type (useful for transforming btw little/big endian)

Definition at line 94 of file bits.cpp.

Referenced by reverseBytes().

Here is the caller graph for this function:

◆ reverseBytesInPlace() [2/11]

void mrpt::utils::reverseBytesInPlace ( uint8_t v_in_out)

Definition at line 99 of file bits.cpp.

◆ reverseBytesInPlace() [3/11]

void mrpt::utils::reverseBytesInPlace ( int8_t v_in_out)

Definition at line 103 of file bits.cpp.

◆ reverseBytesInPlace() [4/11]

void mrpt::utils::reverseBytesInPlace ( uint16_t v_in_out)

Definition at line 108 of file bits.cpp.

References reverseBytesInPlace_2b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [5/11]

void mrpt::utils::reverseBytesInPlace ( int16_t v_in_out)

Definition at line 113 of file bits.cpp.

References reverseBytesInPlace_2b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [6/11]

void mrpt::utils::reverseBytesInPlace ( uint32_t v_in_out)

Definition at line 118 of file bits.cpp.

References reverseBytesInPlace_4b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [7/11]

void mrpt::utils::reverseBytesInPlace ( int32_t v_in_out)

Definition at line 123 of file bits.cpp.

References reverseBytesInPlace_4b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [8/11]

void mrpt::utils::reverseBytesInPlace ( uint64_t v_in_out)

Definition at line 128 of file bits.cpp.

References reverseBytesInPlace_8b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [9/11]

void mrpt::utils::reverseBytesInPlace ( int64_t v_in_out)

Definition at line 133 of file bits.cpp.

References reverseBytesInPlace_8b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [10/11]

void mrpt::utils::reverseBytesInPlace ( float &  v_in_out)

Definition at line 138 of file bits.cpp.

References reverseBytesInPlace_4b().

Here is the call graph for this function:

◆ reverseBytesInPlace() [11/11]

void mrpt::utils::reverseBytesInPlace ( double &  v_in_out)

Definition at line 143 of file bits.cpp.

References reverseBytesInPlace_8b().

Here is the call graph for this function:

◆ saturate()

template<typename T >
void mrpt::utils::saturate ( T &  var,
const T  sat_min,
const T  sat_max 
)
inline

Saturate the value of var (the variable gets modified) so it does not get out of [min,max].

Definition at line 234 of file bits.h.

◆ saturate_val()

template<typename T >
T mrpt::utils::saturate_val ( const T &  value,
const T  sat_min,
const T  sat_max 
)
inline

Like saturate() but it returns the value instead of modifying the variable.

Definition at line 242 of file bits.h.

◆ sign()

template<typename T >
int mrpt::utils::sign ( x)
inline

◆ signWithZero()

template<typename T >
int mrpt::utils::signWithZero ( x)
inline

Returns the sign of X as "0", "1" or "-1".

Definition at line 128 of file bits.h.

References sign().

Here is the call graph for this function:

◆ sprintf_vector() [1/2]

template<typename T >
std::string mrpt::utils::sprintf_vector ( const char *  fmt,
const std::vector< T > &  V 
)

Generates a string for a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element.

Definition at line 26 of file printf_vector.h.

References mrpt::format().

Referenced by mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), mrpt::nav::CAbstractPTGBasedReactive::TNavigationParamsPTG::getAsText(), and printf_vector().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sprintf_vector() [2/2]

template<typename Derived >
std::string mrpt::utils::sprintf_vector ( const char *  fmt,
const Eigen::MatrixBase< Derived > &  V 
)

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 40 of file printf_vector.h.

References mrpt::format().

Here is the call graph for this function:

◆ ts_hash_map()

mrpt::utils::ts_hash_map ( )

< Default constructor */

Definition at line 187 of file ts_hash_map.h.

◆ vector_strong_clear()

template<class VECTOR_T >
void mrpt::utils::vector_strong_clear ( VECTOR_T &  v)
inline

Variable Documentation

◆ m_size

size_t mrpt::utils::m_size
private

Number of elements accessed with write access so far.

Definition at line 181 of file ts_hash_map.h.

Referenced by clear(), empty(), and operator[]().

◆ m_vec

vec_t mrpt::utils::m_vec
private

The actual container.

Definition at line 175 of file ts_hash_map.h.

Referenced by begin(), clear(), end(), find(), and operator[]().

◆ MRPT_GLOBAL_UNITTEST_SRC_DIR

std::string mrpt::utils::MRPT_GLOBAL_UNITTEST_SRC_DIR

Definition at line 24 of file CVelodyneScanner_unittest.cpp.

Referenced by run_test_pf_localization(), and TEST().

◆ pending_class_registers_modified

volatile bool mrpt::mrpt::utils::pending_class_registers_modified = false

Set to true if pending_class_registers() has been called after registerAllPendingClasses().

Startup value is false.

Definition at line 30 of file internal_class_registry.cpp.

Referenced by pending_class_registers(), and registerAllPendingClasses().




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