Aria: ArMapObjectsInterface Class Reference

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# ArMapObjectsInterface Class Reference

`#include <ArMapInterface.h>`

Inheritance diagram for ArMapObjectsInterface:

List of all members.

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

## 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.
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.
virtual std::list< ArMapObject * > | findMapObjectsOfType (const char *type, bool isIncludeWithHeading=false)=0
| Returns a list of all map objects of the specified type.
virtual std::list< ArMapObject * > * | getMapObjects (void)=0
| Returns a pointer to the internal list of map objects.
virtual void | setMapObjects (const std::list< ArMapObject * > *mapObjects, bool isSortedObjects=false, ArMapChangeDetails *changeDetails=NULL)=0
| Sets the map objects (copies those passed in).
virtual void | writeObjectListToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars)=0
| Writes the list of map objects to a text-based functor.
virtual | ~ArMapObjectsInterface ()
| Destructor.

## Member Function Documentation

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:

  | 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

Returns:
  ArMapObject * the matching map object, or NULL if none found

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:

  | 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

Returns:
  ArMapObject * the matching map object, or NULL if none found

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:

  | 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

Returns:
  a list of pointers to all of the ArMapObject's that match the given type

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

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:

  | 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

See also:
  ArMapChangeDetails

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:

  | functor | a pointer to the ArFunctor1 that writes the text lines
  | endOfLineChars | the const char * string that indicates the end of each text line

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

- ArMapInterface.h