Aria
2.8.0
|
The collection of map objects that are contained in an Aria map. More...
#include <ArMapComponents.h>
Inherits ArMapObjectsInterface.
Public Member Functions | |
virtual bool | addToFileParser (ArFileParser *fileParser) |
Adds the keyword and handler for the map objects to the given file parser. | |
ArMapObjects (const char *keyword="Cairn:") | |
Constructor. More... | |
ArMapObjects (const ArMapObjects &other) | |
Copy constructor. | |
virtual void | clear () |
Clears the map objects and deletes them. | |
virtual ArMapObject * | findFirstMapObject (const char *name, const char *type, bool isIncludeWithHeading=false) |
virtual ArMapObject * | findMapObject (const char *name, const char *type=NULL, bool isIncludeWithHeading=false) |
virtual std::list< ArMapObject * > | findMapObjectsOfType (const char *type, bool isIncludeWithHeading=false) |
When the map changes the pointers will no longer be valid... More... | |
virtual std::list< ArMapObject * > * | getMapObjects (void) |
virtual ArTime | getTimeChanged () const |
Returns the time at which the map objects were last changed. | |
ArMapObjects & | operator= (const ArMapObjects &other) |
Assignment operator. | |
virtual bool | remFromFileParser (ArFileParser *fileParser) |
Removes the keyword and handler for the map objects from the given file parser. | |
virtual void | setMapObjects (const std::list< ArMapObject *> *mapObjects, bool isSortedObjects=false, ArMapChangeDetails *changeDetails=NULL) |
void | writeObjectListToFunctor (ArFunctor1< const char *> *functor, const char *endOfLineChars) |
virtual | ~ArMapObjects () |
Destructor. | |
Public Member Functions inherited from ArMapObjectsInterface | |
ArMapObjectsInterface () | |
Constructor. | |
virtual | ~ArMapObjectsInterface () |
Destructor. | |
Static Public Attributes | |
static const char * | DEFAULT_KEYWORD = "Cairn:" |
Default keyword that prefixes each map object line in the map file. | |
Protected Member Functions | |
void | createMultiSet (ArMapFileLineSet *multiSet) |
Writes the map objects to the given ArMapFileLineSet. | |
bool | handleMapObject (ArArgumentBuilder *arg) |
void | logMultiSet (const char *prefix, ArMapFileLineSet *multiSet) |
Writes the given ArMapFileLineSet to the output log with the specified prefix. More... | |
void | sortMapObjects (std::list< ArMapObject *> *mapObjects) |
Sorts the given list of map objects in order of increasing object pose. | |
Protected Attributes | |
bool | myIsSortedObjects |
Whether the myMapObjects list has been sorted in increasing (pose) order. | |
std::string | myKeyword |
Keyword that prefixes each map object in the map file. | |
ArRetFunctor1C< bool, ArMapObjects, ArArgumentBuilder * > | myMapObjectCB |
Callback to parse the map object from the map file. | |
std::list< ArMapObject * > | myMapObjects |
List of map objects contained in the Aria map. | |
ArTime | myTimeChanged |
Time at which the map objects were last changed. | |
The collection of map objects that are contained in an Aria map.
ArMapObjects contains a list of objects defined in an Aria map. There are two basic classes of objects: user-defined objects such as goals and forbidden areas; and, special data objects that are usually automatically generated during the scanning process.
ArMapObjects::ArMapObjects | ( | const char * | keyword = "Cairn:" | ) |
Constructor.
keyword | the char * keyword that prefixes each map object line in the map file |
|
virtual |
When the map changes the pointers will no longer be valid...
this doesn't lock the map while finding, so if you are using it from somewhere other than mapChanged you need to lock it... its probably easiest to just use it from mapChanged though.
type | The type of object to try to find... NULL means find any type |
isIncludeWithHeading | also match "WithHeading" versions of type ("<i>type</i>WithHeading") |
Implements ArMapObjectsInterface.
|
protected |
Writes the given ArMapFileLineSet to the output log with the specified prefix.
ArLog::log(ArLog::Normal, "#%-3i : %s", fileLine.getLineNum(), fileLine.getLineText());