Aria  2.8.0
ArMapChangeDetails Class Reference

Helper class used to track changes to an Aria map. More...

#include <ArMapUtils.h>

Classes

struct  ArMapScanChangeDetails
 Summary of changes for a specific map scan type. More...
 

Public Types

enum  { CHANGE_TYPE_COUNT = LAST_CHANGE_TYPE + 1 }
 
enum  MapLineChangeType { DELETIONS, ADDITIONS, LAST_CHANGE_TYPE = ADDITIONS }
 

Public Member Functions

 ArMapChangeDetails ()
 Constructor.
 
 ArMapChangeDetails (const ArMapChangeDetails &other)
 Copy constructor.
 
void createChildArgMap ()
 Creates a map of args that are considered to be a "child" of another arg.
 
std::list< std::string > findChangedInfoNames () const
 Returns a list of the info types that have been changed. More...
 
ArMapFileLineSetgetChangedInfoLines (const char *infoName, MapLineChangeType change)
 Returns a pointer to the specified info lines that have been changed. More...
 
std::vector< ArLineSegment > * getChangedLineSegments (MapLineChangeType change, const char *scanType)
 Returns a pointer to the data line segments that have been changed for the specified scan type. More...
 
ArMapFileLineSetgetChangedObjectLines (MapLineChangeType change)
 Returns a pointer to the map object (i.e. Cairn) lines that have been changed. More...
 
std::vector< ArPose > * getChangedPoints (MapLineChangeType change, const char *scanType)
 Returns a pointer to the data points that have been changed for the specified scan type. More...
 
ArMapFileLineSetgetChangedSummaryLines (MapLineChangeType change, const char *scanType)
 Returns a pointer to the header lines that have been changed for the specified scan type. More...
 
ArMapFileLineSetgetChangedSupplementLines (MapLineChangeType change)
 Returns a pointer to the map supplement lines that have been changed. More...
 
bool getNewMapId (ArMapId *mapIdOut)
 Returns the new post-change map ID. More...
 
bool getOrigMapId (ArMapId *mapIdOut)
 Returns the original pre-change map ID. More...
 
std::list< std::string > * getScanTypes ()
 Returns a pointer to the list of scan types that have been modified. More...
 
bool isChildArg (const char *infoName, ArArgumentBuilder *arg) const
 Determines whether the given argument for the specified info type is a "child". More...
 
bool isChildArg (const char *infoName, const char *arg0Text) const
 Determines whether the given arg 0 for the info type is a "child".
 
void lock ()
 Locks the change details for multithreaded access.
 
void log ()
 Writes the change details to the Aria log.
 
ArMapChangeDetailsoperator= (const ArMapChangeDetails &other)
 Assignment operator.
 
void setNewMapId (const ArMapId &mapId)
 Sets the new post-change map ID. More...
 
void setOrigMapId (const ArMapId &mapId)
 Sets the original pre-change map ID. More...
 
void unlock ()
 
 ~ArMapChangeDetails ()
 Destructor.
 

Protected Member Functions

ArMapScanChangeDetailsgetScanChangeDetails (const char *scanType)
 

Protected Attributes

ArMapFileLineSet myChangedObjectLines [CHANGE_TYPE_COUNT]
 Change details for the map's object list.
 
ArMapFileLineSet myChangedSupplementLines [CHANGE_TYPE_COUNT]
 Change details for the map's supplemental data.
 
std::map< std::string, std::map< std::string, bool > > myInfoNameToMapOfChildArgsMap
 Map of info type identifiers to argument types, and whether each argument type is a child.
 
std::map< std::string, ArMapFileLineSetmyInfoToChangeMaps [CHANGE_TYPE_COUNT]
 Change details for the map's info data.
 
ArMutex myMutex
 Mutex to protect multithreaded access.
 
ArMapId myNewMapId
 Identifier of the map after the changes were made.
 
ArMapScanChangeDetails myNullScanTypeChanges
 Value returned when no scan data was changed.
 
ArMapId myOrigMapId
 Identifier of the map before the changes were made.
 
std::list< std::string > myScanTypeList
 List of scan types included in the change details.
 
std::map< std::string, ArMapScanChangeDetails * > myScanTypeToChangesMap
 Map of scan types to the changes for the scan.
 

Detailed Description

Helper class used to track changes to an Aria map.

ArMapChangeDetails is a simple helper class that is used to track changes to an Aria map. These changes are determined based on set comparisons (and thus everything in the map must be ordered in a repeatable manner).

The class itself provides very little functionality. It is basically a repository of change information that may be accessed directly by the application. The methods return pointers to the internal data members which may be directly manipulated. There is no error checking, thread-safety, etc. The class's use and scope is expected to be very limited (to the Aria map and related classes).

Java and Python Wrappers: Not available in Java or Python wrapper libraries.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CHANGE_TYPE_COUNT 

Number of map change types.

◆ MapLineChangeType

Enumerator
DELETIONS 

Lines that have been deleted from the Aria map.

ADDITIONS 

Lines that have been added to the Aria map.

LAST_CHANGE_TYPE 

Last value in the enumeration.

Member Function Documentation

◆ findChangedInfoNames()

std::list< std::string > ArMapChangeDetails::findChangedInfoNames ( ) const

Returns a list of the info types that have been changed.

This method searches the internal changed info lines and returns the info types that have non-empty change information.

Returns
list of the string info names that have non-empty changes

◆ getChangedInfoLines()

ArMapFileLineSet * ArMapChangeDetails::getChangedInfoLines ( const char *  infoName,
MapLineChangeType  change 
)

Returns a pointer to the specified info lines that have been changed.

Parameters
infoNamethe int identifier of the info type to be returned
changethe MapLineChangeType that indicates whether added or removed map info lines are to be returned
Returns
a non-NULL pointer to the ArMapFileLineSet that describes the changes

◆ getChangedLineSegments()

std::vector< ArLineSegment > * ArMapChangeDetails::getChangedLineSegments ( MapLineChangeType  change,
const char *  scanType 
)

Returns a pointer to the data line segments that have been changed for the specified scan type.

Parameters
changethe MapLineChangeType that indicates whether added or removed line segments are to be returned
scanTypethe const char * identifier of the scan for which the line segments are to be returned; must be non-NULL
Returns
a non-NULL pointer to the vector of ArLineSegment's that have been changed

◆ getChangedObjectLines()

ArMapFileLineSet * ArMapChangeDetails::getChangedObjectLines ( MapLineChangeType  change)

Returns a pointer to the map object (i.e. Cairn) lines that have been changed.

Parameters
changethe MapLineChangeType that indicates whether added or removed map object lines are to be returned
Returns
a non-NULL pointer to the ArMapFileLineSet that describes the changes

◆ getChangedPoints()

std::vector< ArPose > * ArMapChangeDetails::getChangedPoints ( MapLineChangeType  change,
const char *  scanType 
)

Returns a pointer to the data points that have been changed for the specified scan type.

Parameters
changethe MapLineChangeType that indicates whether added or removed points are to be returned
scanTypethe const char * identifier of the scan for which the points are to be returned; must be non-NULL
Returns
a non-NULL pointer to the vector of ArPose's that have been changed

◆ getChangedSummaryLines()

ArMapFileLineSet * ArMapChangeDetails::getChangedSummaryLines ( MapLineChangeType  change,
const char *  scanType 
)

Returns a pointer to the header lines that have been changed for the specified scan type.

Parameters
changethe MapLineChangeType that indicates whether added or removed scan header lines are to be returned
scanTypethe const char * identifier of the scan for which the changes are to be returned; must be non-NULL
Returns
a non-NULL pointer to the ArMapFileLineSet that describes the changes

◆ getChangedSupplementLines()

ArMapFileLineSet * ArMapChangeDetails::getChangedSupplementLines ( MapLineChangeType  change)

Returns a pointer to the map supplement lines that have been changed.

Parameters
changethe MapLineChangeType that indicates whether added or removed supplement lines are to be returned
Returns
a non-NULL pointer to the ArMapFileLineSet that describes the changes

◆ getNewMapId()

bool ArMapChangeDetails::getNewMapId ( ArMapId mapIdOut)

Returns the new post-change map ID.

Parameters
mapIdOuta pointer to the ArMapId to be returned
Returns
bool true if the map ID was successfully retrieved; false if an error occurred

◆ getOrigMapId()

bool ArMapChangeDetails::getOrigMapId ( ArMapId mapIdOut)

Returns the original pre-change map ID.

Parameters
mapIdOuta pointer to the ArMapId to be returned
Returns
bool true if the map ID was successfully retrieved; false if an error occurred

◆ getScanChangeDetails()

ArMapChangeDetails::ArMapScanChangeDetails * ArMapChangeDetails::getScanChangeDetails ( const char *  scanType)
protected

ArLog::log(ArLog::Normal, "ArMapChangeDetails::getScanChangeDetails() adding details for scan type %s", scanType);

◆ getScanTypes()

std::list< std::string > * ArMapChangeDetails::getScanTypes ( )

Returns a pointer to the list of scan types that have been modified.

This list includes the scan types in the map before and after it was changed. Scan types usually won't be added or removed, but it may occur when one map is inserted into another. A pointer to the actual internal attribute is returned.

Returns
a pointer to the list of scan type identifier strings

◆ isChildArg()

bool ArMapChangeDetails::isChildArg ( const char *  infoName,
ArArgumentBuilder arg 
) const

Determines whether the given argument for the specified info type is a "child".

"Child" arguments have a non-NULL parent. For example, an argument that represents a robot task may be a child of one that defines a macro. When a child argument is changed, then the parent and all of its children must be included in the change details. Note that currently only one level of parent-ness is supported (i.e. there are no grandparents).

◆ setNewMapId()

void ArMapChangeDetails::setNewMapId ( const ArMapId mapId)

Sets the new post-change map ID.

Parameters
mapIdthe ArMapId of the map after it was changed

◆ setOrigMapId()

void ArMapChangeDetails::setOrigMapId ( const ArMapId mapId)

Sets the original pre-change map ID.

Parameters
mapIdthe ArMapId of the map before it was changed

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