Aria  2.8.0
ArMapObjectsInterface Class Referenceabstract

Methods related to setting and retrieving the objects in an Aria map. More...

#include <ArMapInterface.h>

Inherited by ArMapInterface, and ArMapObjects.

Public Member Functions

 ArMapObjectsInterface ()
 Constructor.
 
virtual ArMapObjectfindFirstMapObject (const char *name, const char *type, bool isIncludeWithHeading=false)=0
 Returns the first map object of given name and type, or NULL if none is found. More...
 
virtual ArMapObjectfindMapObject (const char *name, const char *type=NULL, bool isIncludeWithHeading=false)=0
 Returns the map object of given name and type, or NULL if none is found. More...
 
virtual std::list< ArMapObject * > findMapObjectsOfType (const char *type, bool isIncludeWithHeading=false)=0
 Returns a list of all map objects of the specified type. More...
 
virtual std::list< ArMapObject * > * getMapObjects (void)=0
 Returns a pointer to the internal list of map objects. More...
 
virtual void setMapObjects (const std::list< ArMapObject *> *mapObjects, bool isSortedObjects=false, ArMapChangeDetails *changeDetails=NULL)=0
 Sets the map objects (copies those passed in) More...
 
virtual void writeObjectListToFunctor (ArFunctor1< const char *> *functor, const char *endOfLineChars)=0
 Writes the list of map objects to a text-based functor. More...
 
virtual ~ArMapObjectsInterface ()
 Destructor.
 

Detailed Description

Methods related to setting and retrieving the objects in an Aria map.

ArMapObjectsInterface is an abstract class that defines the methods used to manipulate the ArMapObjects that are contained in an Aria map.

Member Function Documentation

◆ findFirstMapObject()

virtual ArMapObject* ArMapObjectsInterface::findFirstMapObject ( const char *  name,
const char *  type,
bool  isIncludeWithHeading = false 
)
pure virtual

Returns the first map object of given name and type, or NULL if none is found.

A pointer to the actual map object is returned. It is not safe to store this pointer because it will be deleted when the map is changed. If the caller needs the map object, then it should create its own copy. This method is not thread-safe.

Parameters
namethe const char * name of the object to be found; if NULL then any object of the specified type is a match
typethe const char * type of the object to be found; if NULL then search all object types
isIncludeWithHeadinga bool set to true if the given type represents a pose and both "heading-less" and "with-heading" objects should be searched; if false, then only objects of the exact type are searched
Returns
ArMapObject * the matching map object, or NULL if none found

◆ findMapObject()

virtual ArMapObject* ArMapObjectsInterface::findMapObject ( const char *  name,
const char *  type = NULL,
bool  isIncludeWithHeading = false 
)
pure virtual

Returns the map object of given name and type, or NULL if none is found.

A pointer to the actual map object is returned. It is not safe to store this pointer because it will be deleted when the map is changed. If the caller needs the map object, then it should create its own copy. This method is not thread-safe.

Parameters
namethe const char * name of the object to be found
typethe const char * type of the object to be found; if NULL then search all object types
isIncludeWithHeadinga bool set to true if the given type represents a pose and both "heading-less" and "with-heading" objects should be searched; if false, then only objects of the exact type are searched
Returns
ArMapObject * the matching map object, or NULL if none found

◆ findMapObjectsOfType()

virtual std::list<ArMapObject *> ArMapObjectsInterface::findMapObjectsOfType ( const char *  type,
bool  isIncludeWithHeading = false 
)
pure virtual

Returns a list of all map objects of the specified type.

A list of pointers to the actual map objects is returned. It is not safe to store these pointers because they will be deleted when the map is changed. If the caller needs the map objects at a later time, then it should create its own copy of each object in the list. This method is not thread-safe.

Parameters
typethe const char * type of the objects to be found; if NULL then all objects are returned
isIncludeWithHeadinga bool set to true if the given type represents a pose and both "heading-less" and "with-heading" objects should be searched; if false, then only objects of the exact type are searched
Returns
a list of pointers to all of the ArMapObject's that match the given type

Implemented in ArMapObjects.

◆ getMapObjects()

virtual std::list<ArMapObject *>* ArMapObjectsInterface::getMapObjects ( void  )
pure virtual

Returns a pointer to the internal list of map objects.

Ideally, callers of this method should not use the pointer to modify the map objects directly. It is preferable to modify a copy and then call setMapObjects.

It is not safe to store the returned pointer list because the pointers will be deleted when the map is changed. If the caller needs the map objects at a later time, then it should create its own copy of each object in the list. This method is not thread-safe.

Returns
a list of pointers to all of the ArMapObject's in the map

◆ setMapObjects()

virtual void ArMapObjectsInterface::setMapObjects ( const std::list< ArMapObject *> *  mapObjects,
bool  isSortedObjects = false,
ArMapChangeDetails changeDetails = NULL 
)
pure virtual

Sets the map objects (copies those passed in)

This method sets its internal list to contain a copy of all of the given map objects. Any map objects which were originally in the list but are no longer referenced are deleted. The list of map objects will be sorted by increasing pose (i.e. objects in the upper left will be placed before objects in the lower right). This method is not thread-safe.

Parameters
mapObjectsa pointer to the list of ArMapObject *'s to be copied
isSortedObjectsa bool set to true if the objects in the given list have already been sorted by increasing pose; this can improve the performance of this method
changeDetailsan optional pointer to the ArMapChangeDetails in which to accumulate a description of the changes to the map objects; if NULL, then changes are not tracked
See also
ArMapChangeDetails

◆ writeObjectListToFunctor()

virtual void ArMapObjectsInterface::writeObjectListToFunctor ( ArFunctor1< const char *> *  functor,
const char *  endOfLineChars 
)
pure virtual

Writes the list of map objects to a text-based functor.

This method writes a Cairn text line for each of the ArMapObject's. This method is not thread-safe.

Parameters
functora pointer to the ArFunctor1 that writes the text lines
endOfLineCharsthe const char * string that indicates the end of each text line

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