Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

ArMapChangeDetails Class Reference

#include <ArMapUtils.h>

List of all members.


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.


Public Types

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

Public Member Functions

 ArMapChangeDetails (const ArMapChangeDetails &other)
 Copy constructor.
 ArMapChangeDetails ()
 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.
ArMapFileLineSetgetChangedInfoLines (const char *infoName, MapLineChangeType change)
 Returns a pointer to the specified info lines that have been changed.
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.
ArMapFileLineSetgetChangedObjectLines (MapLineChangeType change)
 Returns a pointer to the map object (i.e. Cairn) lines that have been changed.
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.
ArMapFileLineSetgetChangedSummaryLines (MapLineChangeType change, const char *scanType)
 Returns a pointer to the header lines that have been changed for the specified scan type.
ArMapFileLineSetgetChangedSupplementLines (MapLineChangeType change)
 Returns a pointer to the map supplement lines that have been changed.
bool getNewMapId (ArMapId *mapIdOut)
 Returns the new post-change map ID.
bool getOrigMapId (ArMapId *mapIdOut)
 Returns the original pre-change map ID.
std::list< std::string > * getScanTypes ()
 Returns a pointer to the list of scan types that have been modified.
bool isChildArg (const char *infoName, const char *arg0Text) const
 Determines whether the given arg 0 for the info type is a "child".
bool isChildArg (const char *infoName, ArArgumentBuilder *arg) const
 Determines whether the given argument for the specified 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.
void setOrigMapId (const ArMapId &mapId)
 Sets the original pre-change map ID.
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.

Classes

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


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
CHANGE_TYPE_COUNT  Number of map change types.

enum ArMapChangeDetails::MapLineChangeType
 

Enumeration values:
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

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

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

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

Parameters:
infoType the int identifier of the info type to be returned
change the 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

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:
change the MapLineChangeType that indicates whether added or removed line segments are to be returned
scanType the 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

ArMapFileLineSet * ArMapChangeDetails::getChangedObjectLines MapLineChangeType  change  ) 
 

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

Parameters:
change the 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

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:
change the MapLineChangeType that indicates whether added or removed points are to be returned
scanType the 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

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:
change the MapLineChangeType that indicates whether added or removed scan header lines are to be returned
scanType the 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

ArMapFileLineSet * ArMapChangeDetails::getChangedSupplementLines MapLineChangeType  change  ) 
 

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

Parameters:
change the 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

bool ArMapChangeDetails::getNewMapId ArMapId mapIdOut  ) 
 

Returns the new post-change map ID.

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

bool ArMapChangeDetails::getOrigMapId ArMapId mapIdOut  ) 
 

Returns the original pre-change map ID.

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

ArMapChangeDetails::ArMapScanChangeDetails * ArMapChangeDetails::getScanChangeDetails const char *  scanType  )  [protected]
 

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

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

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).

void ArMapChangeDetails::setNewMapId const ArMapId mapId  ) 
 

Sets the new post-change map ID.

Parameters:
mapId the ArMapId of the map after it was changed

void ArMapChangeDetails::setOrigMapId const ArMapId mapId  ) 
 

Sets the original pre-change map ID.

Parameters:
mapId the ArMapId of the map before it was changed


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:42 2010 for Aria by  doxygen 1.4.2