Aria
2.8.0
|
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 ArMapObject * | findFirstMapObject (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 ArMapObject * | findMapObject (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. | |
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.
|
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.
name | the const char * name of the object to be found; if NULL then any object of the specified type is a match |
type | the const char * type of the object to be found; if NULL then search all object types |
isIncludeWithHeading | a 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 |
|
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.
name | the const char * name of the object to be found |
type | the const char * type of the object to be found; if NULL then search all object types |
isIncludeWithHeading | a 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 |
|
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.
type | the const char * type of the objects to be found; if NULL then all objects are returned |
isIncludeWithHeading | a 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 |
Implemented in ArMapObjects.
|
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.
|
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.
mapObjects | a pointer to the list of ArMapObject *'s to be copied |
isSortedObjects | a 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 |
changeDetails | an 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 |
|
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.
functor | a pointer to the ArFunctor1 that writes the text lines |
endOfLineChars | the const char * string that indicates the end of each text line |