MRPT  2.0.2
Classes | Namespaces | Macros | Functions | Variables
CSerializable_unittest.cpp File Reference
#include <mrpt/obs.h>
#include <CTraitsTest.h>
#include <gtest/gtest.h>
#include <mrpt/io/CMemoryStream.h>
#include <mrpt/obs/stock_observations.h>
#include <sstream>
#include <mrpt/serialization/CArchive.h>
#include <mrpt/serialization/CSerializable.h>
Include dependency graph for serialization/src/CSerializable_unittest.cpp:

Go to the source code of this file.

Classes

class  MyNS::Foo
 

Namespaces

 MyNS
 [example-define-class]
 

Macros

#define MRPT_NO_WARN_BIG_HDR
 
#define TEST_CLASS_MOVE_COPY_CTORS(_classname)   template class mrpt::CTraitsTest<_classname>
 

Functions

 TEST_CLASS_MOVE_COPY_CTORS (CObservation2DRangeScan)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservation3DRangeScan)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationRGBD360)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationBearingRange)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationBatteryState)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationWirelessPower)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationRFID)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationBeaconRanges)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationComment)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationGasSensors)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationGPS)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationReflectivity)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationIMU)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationOdometry)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationRange)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationImage)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationStereoImages)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationCANBusJ1939)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationRawDAQ)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservation6DFeatures)
 
 TEST_CLASS_MOVE_COPY_CTORS (CObservationVelodyneScan)
 
 TEST_CLASS_MOVE_COPY_CTORS (CActionRobotMovement2D)
 
 TEST_CLASS_MOVE_COPY_CTORS (CActionRobotMovement3D)
 
 TEST (Observations, WriteReadToMem)
 
 TEST (Observations, WriteReadToOctectVectors)
 
static bool aux_get_sample_data (mrpt::obs::CObservation &)
 
static bool aux_get_sample_data (mrpt::obs::CAction &)
 
static bool aux_get_sample_data (mrpt::obs::CObservation2DRangeScan &o)
 
static bool aux_get_sample_data (mrpt::obs::CObservationImage &o)
 
static bool aux_get_sample_data (mrpt::obs::CObservationStereoImages &o)
 
template<class T >
void run_copy_tests ()
 
 TEST (Observations, CopyCtorAssignOp)
 
 IMPLEMENTS_SERIALIZABLE (Foo, CSerializable, MyNS)
 
 TEST (Serialization, CustomClassSerialize)
 
 TEST (Serialization, ArchiveSharedPtrs)
 

Variables

const mrpt::rtti::TRuntimeClassIdlstClasses []
 

Macro Definition Documentation

◆ MRPT_NO_WARN_BIG_HDR

#define MRPT_NO_WARN_BIG_HDR

◆ TEST_CLASS_MOVE_COPY_CTORS

#define TEST_CLASS_MOVE_COPY_CTORS (   _classname)    template class mrpt::CTraitsTest<_classname>

Function Documentation

◆ aux_get_sample_data() [1/5]

static bool aux_get_sample_data ( mrpt::obs::CObservation )
static

◆ aux_get_sample_data() [2/5]

static bool aux_get_sample_data ( mrpt::obs::CAction )
static

◆ aux_get_sample_data() [3/5]

static bool aux_get_sample_data ( mrpt::obs::CObservation2DRangeScan o)
static

◆ aux_get_sample_data() [4/5]

static bool aux_get_sample_data ( mrpt::obs::CObservationImage o)
static

◆ aux_get_sample_data() [5/5]

static bool aux_get_sample_data ( mrpt::obs::CObservationStereoImages o)
static

◆ IMPLEMENTS_SERIALIZABLE()

IMPLEMENTS_SERIALIZABLE ( Foo  ,
CSerializable  ,
MyNS   
)

◆ run_copy_tests()

template<class T >
void run_copy_tests ( )

◆ TEST() [1/5]

TEST ( Serialization  ,
CustomClassSerialize   
)

Definition at line 36 of file serialization/src/CSerializable_unittest.cpp.

References mrpt::serialization::archiveFrom(), CLASS_ID, EXPECT_EQ(), mrpt::rtti::registerClass(), mrpt::io::CMemoryStream::Seek(), and MyNS::Foo::value.

Here is the call graph for this function:

◆ TEST() [2/5]

TEST ( Serialization  ,
ArchiveSharedPtrs   
)

Definition at line 54 of file serialization/src/CSerializable_unittest.cpp.

◆ TEST() [3/5]

TEST ( Observations  ,
WriteReadToMem   
)

Definition at line 75 of file serialization/src/CSerializable_unittest.cpp.

◆ TEST() [4/5]

TEST ( Observations  ,
WriteReadToOctectVectors   
)

◆ TEST() [5/5]

TEST ( Observations  ,
CopyCtorAssignOp   
)

◆ TEST_CLASS_MOVE_COPY_CTORS() [1/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservation2DRangeScan  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [2/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservation3DRangeScan  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [3/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationRGBD360  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [4/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationBearingRange  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [5/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationBatteryState  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [6/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationWirelessPower  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [7/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationRFID  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [8/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationBeaconRanges  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [9/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationComment  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [10/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationGasSensors  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [11/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationGPS  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [12/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationReflectivity  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [13/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationIMU  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [14/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationOdometry  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [15/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationRange  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [16/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationImage  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [17/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationStereoImages  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [18/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationCANBusJ1939  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [19/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationRawDAQ  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [20/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservation6DFeatures  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [21/23]

TEST_CLASS_MOVE_COPY_CTORS ( CObservationVelodyneScan  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [22/23]

TEST_CLASS_MOVE_COPY_CTORS ( CActionRobotMovement2D  )

◆ TEST_CLASS_MOVE_COPY_CTORS() [23/23]

TEST_CLASS_MOVE_COPY_CTORS ( CActionRobotMovement3D  )

Variable Documentation

◆ lstClasses

const mrpt::rtti::TRuntimeClassId* lstClasses[]
Initial value:
= {
This "observation" is actually a placeholder for a text block with comments or additional parameters ...
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
This represents a measurement of the batteries on the robot.
Declares a class derived from "CObservation" that encapsules an omnidirectional RGBD measurement from...
Declares a class derived from "CObservation" that encapsules a single range measurement, and associated parameters.
A CObservation-derived class for RAW DATA (and optionally, point cloud) of scans from 3D Velodyne LID...
This class stores a message from a CAN BUS with the protocol J1939.
A range or depth 3D scan measurement, as from a time-of-flight range camera or a structured-light dep...
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...
Declares a class derived from "CObservation" that encapsules a single short-range reflectivity measur...
This class stores measurements from an Inertial Measurement Unit (IMU) (attitude estimation, raw gyroscope and accelerometer values), altimeters or magnetometers.
Represents a probabilistic 3D (6D) movement.
Represents a probabilistic 2D movement of the robot mobile base.
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
Definition: CObject.h:102
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
Declares a class derived from "CObservation" that represents a set of readings from gas sensors...
Store raw data from a Data Acquisition (DAQ) device, such that input or output analog and digital cha...
This represents a measurement of the wireless strength perceived by the robot.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
An observation of one or more "features" or "objects", possibly identified with a unique ID...
This observation represents a number of range-bearing value pairs, each one for a detected landmark...
This represents one or more RFID tags observed by a receiver.
An observation of the current (cumulative) odometry for a wheeled robot.
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...

Definition at line 55 of file serialization/src/CSerializable_unittest.cpp.




Page generated by Doxygen 1.8.14 for MRPT 2.0.2 Git: 9b4fd2465 Mon May 4 16:59:08 2020 +0200 at lun may 4 17:26:07 CEST 2020