Helios++
Helios software for LiDAR simulations
ScanningStrip Class Reference

A scanning strip is a set of legs which belong to the same strip. Thus, it is an abstract group of legs. More...

#include <ScanningStrip.h>

Collaboration diagram for ScanningStrip:

Public Member Functions

 ScanningStrip (std::string const stripId=NULL_STRIP_ID)
 Default constructor for scanning strip.
 
bool has (int const serialId)
 Check whether given serial id belongs to the strip or not. More...
 
bool has (Leg &leg)
 Check whether given leg belongs to the strip or not. More...
 
void emplace (int const serialId, Leg *leg)
 Insert/emplace given leg into the scanning strip. More...
 
void emplace (Leg *leg)
 
void safeEmplace (int const serialId, Leg *leg)
 Like ScanningStrip::emplace(int const, Leg *) but with security checks. More...
 
void safeEmplace (Leg *leg)
 
std::string getStripId () const
 Obtain the strip identifier. More...
 
void setStripId (std::string const stripId)
 Set the new strip identifier. More...
 
LeggetLeg (int const serialId)
 Obtain leg with given serial identifier. More...
 
bool isLastLegInStrip () const
 Checks if all the legs in the strip were processed in order to know if the associated SyncFileWriter can be destroyed. More...
 

Static Public Attributes

static std::string const NULL_STRIP_ID = "NULL_STRIP_ID"
 

Protected Attributes

std::string stripId
 String identifying the scanning strip.
 
std::unordered_map< int, Leg * > legs
 Map with leg serial id as key and pointer to leg as value. More...
 

Detailed Description

A scanning strip is a set of legs which belong to the same strip. Thus, it is an abstract group of legs.

Author
Alberto M. Esmoris Pena
Version
1.0

One leg must belong to either none or at maximum one scanning strip.

A scanning strip is used, for instance, to export to the same output point cloud and trajectory files all legs belonging to the same strip.

See also
Leg

Member Function Documentation

◆ emplace() [1/2]

void ScanningStrip::emplace ( int const  serialId,
Leg leg 
)
inline

Insert/emplace given leg into the scanning strip.

Parameters
serialIdSerial identifier of the leg to be inserted/emplaced
legLeg to be inserted/emplaced

◆ emplace() [2/2]

void ScanningStrip::emplace ( Leg leg)
inline

◆ getLeg()

Leg* ScanningStrip::getLeg ( int const  serialId)
inline

Obtain leg with given serial identifier.

Parameters
serialIdSerial identifier of leg to be obtained
Returns
Leg with given serial identifier, nullptr if no leg with given identifier is contained in strip

◆ getStripId()

std::string ScanningStrip::getStripId ( ) const
inline

Obtain the strip identifier.

Returns
Strip identifier

◆ has() [1/2]

bool ScanningStrip::has ( int const  serialId)
inline

Check whether given serial id belongs to the strip or not.

Parameters
serialIdSerial id of leg which association with strip must be checked
Returns
True if given serial id belongs to the strip, false otherwise

◆ has() [2/2]

bool ScanningStrip::has ( Leg leg)
inline

Check whether given leg belongs to the strip or not.

Parameters
legLeg which association with strip must be checked
Returns
True if given leg belongs to the strip, false otherwise

◆ isLastLegInStrip()

bool ScanningStrip::isLastLegInStrip ( ) const
inline

Checks if all the legs in the strip were processed in order to know if the associated SyncFileWriter can be destroyed.

Returns
True if all legs have been processed. False if at least one leg has not been processed.

◆ safeEmplace() [1/2]

void ScanningStrip::safeEmplace ( int const  serialId,
Leg leg 
)
inline

◆ safeEmplace() [2/2]

void ScanningStrip::safeEmplace ( Leg leg)
inline

◆ setStripId()

void ScanningStrip::setStripId ( std::string const  stripId)
inline

Set the new strip identifier.

Parameters
stripIdNew strip identifier

Member Data Documentation

◆ legs

std::unordered_map<int, Leg*> ScanningStrip::legs
protected

Map with leg serial id as key and pointer to leg as value.

See also
Leg::serialId

The documentation for this class was generated from the following files: