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

ArMapObjects Class Reference

#include <ArMapComponents.h>

Inheritance diagram for ArMapObjects:

ArMapObjectsInterface List of all members.

Detailed Description

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.


Public Member Functions

virtual bool addToFileParser (ArFileParser *fileParser)
 Adds the keyword and handler for the map objects to the given file parser.
 ArMapObjects (const ArMapObjects &other)
 Copy constructor.
 ArMapObjects (const char *keyword="Cairn:")
 Constructor.
virtual void clear ()
 Clears the map objects and deletes them.
virtual ArMapObjectfindFirstMapObject (const char *name, const char *type, bool isIncludeWithHeading=false)
virtual ArMapObjectfindMapObject (const char *name, const char *type=NULL, bool isIncludeWithHeading=false)
virtual std::list< ArMapObject * > findMapObjectsOfType (const char *type, bool isIncludeWithHeading=false)
virtual std::list< ArMapObject * > * getMapObjects (void)
virtual ArTime getTimeChanged () const
 Returns the time at which the map objects were last changed.
ArMapObjectsoperator= (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.

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


Constructor & Destructor Documentation

ArMapObjects::ArMapObjects const char *  keyword = "Cairn:"  ) 
 

Constructor.

Parameters:
keyword the char * keyword that prefixes each map object line in the map file


Member Function Documentation

std::list< ArMapObject * > ArMapObjects::findMapObjectsOfType const char *  type,
bool  isIncludeWithHeading = false
[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.

Returns:
Gets a list of pointers to all the map objects of a given * type... if none match the list will be empty.
Parameters:
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.

void ArMapObjects::logMultiSet const char *  prefix,
ArMapFileLineSet multiSet
[protected]
 

Writes the given ArMapFileLineSet to the output log with the specified prefix.

ArLog::log(ArLog::Normal, "#%-3i : %s", fileLine.getLineNum(), fileLine.getLineText());


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