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

ArMap Class Reference

#include <ArMap.h>

List of all members.


Detailed Description

This is a class for maps made with ScanStudio and Mapper3.

ArMap encapsulates the data contained in a .map file. It provides methods to read and write a .map file, and to obtain and modify the contents of the map. In addition, the application may install callbacks on the map to be notified when its contents are modified.

Aria maps contain the following types of data:

See below for the exact format of the actual .map file.

Thread Issuses

The ArMap class is not inherently thread-safe. It has lock() and unlock() methods, which the application must call before and after calls to get and set the data (e.g. getMapObjects(), getPoints()... setMapObjects(), setPoints()...).

If you are going to use setMapObjects(), setPoints(), setLines(), or setMapInfo(), then you should lock() the map beforehand, call the methods, then call mapChanged() to invoke the callbacks, and then finally unlock() the map when done. Note that mapChanged() will only invoke the callbacks if the data has actually changed.

The readFile() and writeFile() methods do automatically lock the map while they read and write.

Map Objects

Certain types of objects are predefined for ArMaps. These include Goal, GoalWithHeading, Dock, ForbiddenLine, ForbiddenArea, and RobotHome.

A rectangle object may have an associated angle of rotation as well, stored in the object pose theta value (ArMapObject::getPose().getTh()). The actual global coordinates of the rectangle must be calculated using this angle and its "from-to" values. You can get a list of the 4 ArLineSegment objects taht compose the rectangle's edges using ArMapObject::getFromToSegments(). If you want to do your own calculations, see ArMapObject::ArMapObject().

Defining Custom Map Objects

It is possible to define additional types of objects in a map file using the "MapInfo" metadata section. For example, if you wished to program some special behavior that would only occur upon reaching certain goals, you could define a new goal type as follows:
    MapInfo: GoalType Name=SpecialGoal "Label=Special" "Desc=Doing special stuff" Heading=Required Shape=VBars "Color0=0xff0000"
 
The new goal type will appear be available in Mapper3 and MobilePlanner in a drop-down menu. Instances in the map will also be displayed by MobileEyes.

Please read the following information carefully if you plan to use this feature.

Each MapInfo line is of the format:

       MapInfo: <Keyword> ([ParamName=ParmValue] )*
 

(([ParamName=ParamValue] )* is a space separated list of "key=value codes.)

The following Keywords are supported:

The available parameters depend on the Keyword. Unless otherwise specified, parameters are optional.

If a parameter value contains a space, then both the parameter name and value must be enclosed within quotes. For example:

      "Label=Normal Goal"
 
Neither the name nor the value can contain the special characters #, ;, , or ".

The following ParamNames are valid for all keywords:

For GoalType, DockType, and LocationType, the following ParamNames are also supported:

In addition, the following ParamName is supported only for GoalTypes: For BoundaryType, the following ParamNames are also supported:

For SectorType, the following ParamNames are also supported:

Important Note: if a map defines special GoalType or DockType items, then it must define all possible goal or dock types, including the default "Goal", "GoalWithHeading", and "Dock" types if you want those types to remain available.

Map File Format Specification

The robot map file is in ASCII text, and may be viewed or edited in any text editor. Map file names conventionally end in the suffix ".map". A formal description of the map syntax follows in augmented Backus-Naur Format (ABNF).

All blank lines should be ignored. As an exception to ABNF, literal strings are case-sensitive.

A map is the line "2D-Map" followed by the metadata section, followed by some number of data sections:

ARMAP           = ("2D-Map" NEWLINE) (MetadataSection) (*DataSection)

The MetadataSection section provides information about the map data, adds objects (Cairns) and also provides storage of application-specific/custom information.

MetadataSection      = *MetadataLine
MetadataLine         = MDKey ":" *(WS MDVal) NEWLINE
MDKey                = StringID
MDVal                = Integer / Float / StringID / KeyValPair 

Most metadata lines fall into one of two categories: a simple list of numeric tokens, or a StringID followed by a list of either numeric tokens or a set of KeyValuePair tokens.

Sensor data sections contain data that was recorded with sensors (e.g. a Laser Rangefinder for the "DATA" section) and which represent more or less permanent, solid objects detectable by a robot's range sensors. (This data can be used for localization and path planning, for instance.) The DATA section is a collection of points detected by a high-resolution sensor like the LRF. LINES abstracts the world into a set of flat surfaces.

DataSection          = ("DATA" NEWLINE *PointLine) / ("LINES" NEWLINE *LineLine)
PointLine            = XPos WS YPos NEWLINE
LineLine             = XPos WS YPos WS XPos WS YPos NEWLINE

"Cairn" is a common instance of MDKey. A "Cairn" metadata entry looks like this:

MetaDataLine         =/ Cairn  NEWLINE
Cairn                = "Cairn:" WS CairnType WS XPos WS YPos WS Theta WS InternalName WS IconName WS Label [WS TypeSpecificData]
CairnType            = StringID
XPos                 = Integer
YPos                 = Integer
Theta                = Integer
InternalName         = QuotedString
IconName             = QuotedString
Label                = QuotedString
TypeSpecificData     = *(WS MDKey)

"MapInfo" is another common instance of MDKey. A "MapInfo" entry can describe custom map object types for your application beyond the usual Cairn types (see above).

MetaDataLine         =/ MapInfo NEWLINE
MapInfo              = "MapInfo:" WS MapInfoClass WS *(KeyValuePair)
MapInfoClass         = StringID

Data types:

KeyValPair           = (StringID "=" MDVal) /  QUOTE ALNUM "=" Text QUOTE
Integer              = ["-"] *1(DIGIT)
Float                = ["-"] *1(DIGIT | ".")
StringID             = *1 ALNUM     ; One or more alphanumeric characters
QuotedText           = QUOTE Text QUOTE
Text                 = *(ALNUM / WS / PUNCTUATION)
DIGIT                = ("0"-"9")
ALPHA                = ("a"-"z" / "A"-"Z")
ALNUM                = ALPHA / DIGIT
WS                   = *(" ")      ; Any number of ASCII space characters (incl. 0)
QUOTE                = d34        ; ASCII double quote mark (")
NEWLINE              = d10        ; ASCII newline (
) PUNCTUATION = d32-%d47 / d58-%d64 / d92-%d96 / d123-%d126 ANY = d32-%d126 ; Any ASCII text

Notes:

  1. Common IDs for MDKey are:
    MinPos
    MaxPos
    NumPoints
    Number of entries in the DATA section.
    LineMinPos
    LineMaxPos
    NumLines
    Number of entries in the LINES section.
    Resolution
    Cairn
    Defines a special object in the map with semantic meaning.
    MapInfo
    Describes custom, cairn types
    New values may be added in the future, or used only by some applications.

  2. Common CairnType values are:
    Goal
    A named goal. Theta should be ignored. The name of the goal is provided in Label.
    GoalWithHeading
    A named goal. Theta indicates a final heading. The name of the goal is provided in Label.
    RobotHome
    A possible starting position of a robot.
    Dock
    A position and heading at which a docking maneuver may be initiated
    ForbiddenLine
    Specifies a line that any automatic navigation procedure should avoid crossing. This Cairn type has the following TypeSpecificData, which defines the endpoints of the line:
    TypeSpecificData     =/ ForbiddenLineData
    ForbiddenLineData    =  XPos WS YPos WS XPos WS YPos
    
    The normal Cairn pose is not used for ForbiddenLine.
    ForbiddenArea
    Specifies a rectangular area that any automatic navigation procedure should avoid entering. This Cairn type has the following TypeSpecificData, which defines the upper-left and lower-right opposing corners of the rectangle:
    TypeSpecificData     =/ ForbiddenAreaData
    ForbiddenAreaData    =  XPos WS YPos WS XPos WS YPos
    
    The normal Cairn pose for ForbiddenArea defines an offset of the geometric center of the area, plus a rotation of the area. (Typically, XPos and YPos will always be 0 for ForbiddenArea, but Theta may be used to provide the rotation of the rectangular area).
  3. The InternalName and IconName tokens in CairnData are not currently used. Typically, InternalName is simply an empty quoted string ("") and IconName is the placeholder value "ICON". You should preserve them when reading and writing map files though, as they may be used in the future.
  4. It is be better to calculate maximum, minimum, and number of points or lines based on the data in the map, if possible, rather than relying on the metadata header.
  5. What the heck is a "cairn"? The word is from the Scottish Gaelic, Old Irish and Welsh "carn" and Middle English "carne". A cairn is a pile of stones, placed in the landscape as a memorial, navigation aid, or other marker. So we use it to indicate a semantically meaningful object placed at some point by the human mapmaker (rather than something detectable by the robot).
  6. Currently used MapInfoClass keywords include:
    GoalType
    define a custom goal subtype
    DockType
    define a custom dock subtype
    LocationType
    define a custom other generic poses on the map
    BoundaryType
    define a custom line on the map
    SectorType
    defines a custom rectangular area (which may be rotated)
    The following ParamNames are valid for all MapInfoClass keywords:
    Name=Text
    Name of the type that is being defined.
    Label=Text
    Label that is displayed for the type in a GUI, etc.
    Desc=Text
    Longer description of the type that is displayed in a GUI, etc.
    For more information about the use of MapInfo metadata, see the discussion above.

Definition at line 397 of file ArMap.h.

Public Types

enum  { INFO_COUNT = LAST_INFO + 1 }
enum  InfoType {
  META_INFO, TASK_INFO, ROUTE_INFO, SCHED_TASK_INFO,
  SCHED_INFO, LAST_INFO = SCHED_INFO
}
 List of the standard Info categories defined for the map. More...

Public Member Functions

void addMapChangedCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST)
 Adds a callback called when the map is changed.
void addPreMapChangedCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST)
 Adds a callback called before the map changed callbacks are called.
 ArMap (const char *baseDirectory="./", bool addToGlobalConfig=true, const char *configSection="Files", const char *configParam="Map", const char *configDesc="Map of the environment we'll use to navigate", bool ignoreEmptyFileName=true)
 Constructor.
ArMapObjectfindFirstMapObject (const char *name, const char *type)
 Gets the first map object of given name and type if it exists.
ArMapObjectfindMapObject (const char *name, const char *type=NULL)
 Gets a map object of given name and type if it exists.
const char * getBaseDirectory (void) const
 Gets the base directory.
const char * getFileName (void) const
 Gets the fileName that was loaded.
bool getIgnoreEmptyFileName (void)
 Gets whether we ignore empty file names or fail if we encounter one.
std::list< ArArgumentBuilder * > * getInfo (int infoType)
 Gets the strings for the specified Info category.
ArTime getInfoChanged (int infoType)
 Returns the last time that the specified Info category was changed.
ArPose getLineMaxPose (void)
 Gets the upper right point of the lines.
ArPose getLineMinPose (void)
 Gets the lower left point of the lines.
std::vector< ArLineSegment > * getLines (void)
 Gets the lines.
ArTime getLinesChanged (void)
 Gets the last time the lines were changed.
ArLog::LogLevel getMapChangedLogLevel (void)
 Gets the level we log our map changed callback at.
std::list< ArArgumentBuilder * > * getMapInfo (void)
 Gets the map info strings.
ArTime getMapInfoChanged (void)
 Gets the last time the map info was changed.
std::list< ArMapObject * > * getMapObjects (void)
 Gets the map objects.
ArTime getMapObjectsChanged (void)
 Gets the last time the map objects were changed.
ArPose getMaxPose (void)
 Gets the upper right point of the points.
ArPose getMinPose (void)
 Gets the lower left point of the points.
int getNumLines (void)
 Gets the number of lines.
int getNumPoints (void)
 Gets the number of points.
std::vector< ArPose > * getPoints (void)
 Gets the map points.
ArTime getPointsChanged (void)
 Gets the last time the points were changed.
int getResolution (void)
 Gets the resolution (-1 if none specified).
bool isLoadingDataStarted ()
bool isLoadingLinesAndDataStarted ()
void loadDataPoint (double x, double y)
 Adds the specified data point to the loading points.
void loadLineSegment (double x1, double y1, double x2, double y2)
 Adds the specified line segment to the loading lines.
int lock ()
 Lock the map instance.
void mapChanged (void)
 Function that will call the map changed CBs if needed.
bool parseLine (char *line)
 Parses a map line.
void parsingComplete (void)
 Says that the parsing by lines is done and to use the parsed data.
bool readDataPoint (char *line)
 Reads a data point from the given line, and adds it to the loading points.
bool readFile (const char *fileName, char *errorBuffer=NULL, size_t errorBufferLen=0)
 Reads a map.
bool readLineSegment (char *line)
 Reads a line segment from the given line, and adds it to the loading lines.
void remMapChangedCB (ArFunctor *functor)
 Removes a callback called when the map is changed.
void remPreMapChangedCB (ArFunctor *functor)
 Removes a callback called before the map changed callbacks are called.
void setBaseDirectory (const char *baseDirectory)
 Sets the base directory.
void setIgnoreEmptyFileName (bool ignore)
 Sets whether we ignore empty file names or fail if we encounter one.
bool setInfo (int infoType, const std::list< ArArgumentBuilder * > *infoList)
 Sets the contents of the specified Info category.
void setLines (const std::vector< ArLineSegment > *lines)
 Sets the lines (copies those passed in).
void setMapChangedLogLevel (ArLog::LogLevel level)
 Sets the level we log our map changed callback at.
void setMapInfo (const std::list< ArArgumentBuilder * > *mapInfo)
 Sets the map info (copies those passed in).
void setMapObjects (const std::list< ArMapObject * > *mapObjects)
 Sets the map objects (copies those passed in).
void setPoints (const std::vector< ArPose > *points)
 Sets the points (copies those passed in).
void setResolution (int resolution)
int tryLock ()
 Try to lock the map instance without blocking.
int unlock ()
 Unlock the map instance.
bool writeFile (const char *fileName, bool internalCall=false)
 Write out a map file.
void writeLinesToFunctor (ArFunctor2< int, std::vector< ArLineSegment > * > *functor)
 Writes the map line segments to a functor.
void writeObjectsToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars)
 Writes the map header information and objects to a text-based functor.
void writePointsToFunctor (ArFunctor2< int, std::vector< ArPose > * > *functor)
 Writes the map data points to a functor.
void writeToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars)
 Writes all of the map to a functor instead of a to a file.
virtual ~ArMap (void)
 Destructor.

Protected Types

enum  { MAX_MAP_NAME_LENGTH = 512 }

Protected Member Functions

virtual const char * getInfoName (int infoType)
 Returns the name of the specified Info category (i.e. the "xInfo:" tag at the beginning of the line).
bool handle2DMap (ArArgumentBuilder *arg)
bool handleData (ArArgumentBuilder *arg)
bool handleInfo (ArArgumentBuilder *arg, int info)
bool handleLine (ArArgumentBuilder *arg)
bool handleLineMaxPos (ArArgumentBuilder *arg)
bool handleLineMinPos (ArArgumentBuilder *arg)
bool handleLines (ArArgumentBuilder *arg)
bool handleMapInfo (ArArgumentBuilder *arg)
bool handleMapObject (ArArgumentBuilder *arg)
bool handleMaxPos (ArArgumentBuilder *arg)
bool handleMinPos (ArArgumentBuilder *arg)
bool handleNumLines (ArArgumentBuilder *arg)
bool handleNumPoints (ArArgumentBuilder *arg)
bool handlePoint (ArArgumentBuilder *arg)
bool handleResolution (ArArgumentBuilder *arg)
bool processFile (char *errorBuffer, size_t errorBufferLen)
bool reset (void)

Protected Attributes

ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
my2DMapCB
std::string myBaseDirectory
char myConfigMapName [MAX_MAP_NAME_LENGTH]
std::string myConfigParam
bool myConfigProcessedBefore
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myDataCB
std::string myFileName
bool myIgnoreEmptyFileName
std::list< ArArgumentBuilder * > * myInfoArray
ArRetFunctor2C< bool, ArMap,
ArArgumentBuilder *, int > ** 
myInfoCBArray
ArTimemyInfoChangedArray
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myLineCB
ArPose myLineMax
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myLineMaxPosCB
ArPose myLineMin
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myLineMinPosCB
std::vector< ArLineSegmentmyLines
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myLinesCB
ArTime myLinesChanged
bool myLoadingDataStarted
bool myLoadingGot2DMap
bool myLoadingGotLineMaxPos
bool myLoadingGotLineMinPos
bool myLoadingGotMaxPos
bool myLoadingGotMinPos
std::list< ArArgumentBuilder * > * myLoadingInfoArray
ArPose myLoadingLineMax
ArPose myLoadingLineMaxFromFile
ArPose myLoadingLineMin
ArPose myLoadingLineMinFromFile
std::vector< ArLineSegmentmyLoadingLines
bool myLoadingLinesAndDataStarted
int myLoadingLinesRead
std::list< ArArgumentBuilder * > myLoadingMapInfo
std::list< ArMapObject * > myLoadingMapObjects
ArPose myLoadingMax
ArPose myLoadingMaxFromFile
ArPose myLoadingMin
ArPose myLoadingMinFromFile
int myLoadingNumLines
int myLoadingNumPoints
ArFileParsermyLoadingParser
std::vector< ArPosemyLoadingPoints
int myLoadingPointsRead
int myLoadingResolution
std::list< ArFunctor * > myMapChangedCBList
ArTimemyMapChangedInfoArray
ArLog::LogLevel myMapChangedLogLevel
ArTime myMapChangedMapInfo
ArTime myMapChangedMapObjects
ArTime myMapChangedPoints
std::list< ArArgumentBuilder * > myMapInfo
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myMapInfoCB
ArTime myMapInfoChanged
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myMapObjectCB
std::list< ArMapObject * > myMapObjects
ArTime myMapObjectsChanged
ArPose myMax
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myMaxPosCB
ArPose myMin
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myMinPosCB
ArMutex myMutex
int myNumInfos
 Number of different Info categories available in this map.
int myNumLines
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myNumLinesCB
int myNumPoints
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myNumPointsCB
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myPointCB
std::vector< ArPosemyPoints
ArTime myPointsChanged
std::list< ArFunctor * > myPreMapChangedCBList
ArRetFunctor2C< bool, ArMap,
char *, size_t > 
myProcessFileCB
stat myReadFileStat
int myResolution
ArRetFunctor1C< bool, ArMap,
ArArgumentBuilder * > 
myResolutionCB

Static Protected Attributes

static const char * ourInfoNames [INFO_COUNT]
 Array of names for the standard Info categories; see InfoType.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
INFO_COUNT  Number of standard Info categories.

Definition at line 413 of file ArMap.h.

enum ArMap::InfoType
 

List of the standard Info categories defined for the map.

Enumeration values:
LAST_INFO  Last value in the enumeration.

Definition at line 402 of file ArMap.h.


Constructor & Destructor Documentation

ArMap::ArMap const char *  baseDirectory = "./",
bool  addToGlobalConfig = true,
const char *  configSection = "Files",
const char *  configParam = "Map",
const char *  configDesc = "Map of the environment we'll use to navigate",
bool  ignoreEmptyFileName = true
 

Constructor.

myRouteInfoCB(this, &ArMap::handleRouteInfo),

Definition at line 51 of file ArMap.cpp.


Member Function Documentation

void ArMap::addMapChangedCB ArFunctor functor,
ArListPos::Pos  position = ArListPos::LAST
 

Adds a callback called when the map is changed.

Adds a read callback that is called when the map is read in, the map is locked when this callback happens so you don't need to worry about that.

Definition at line 232 of file ArMap.cpp.

void ArMap::addPreMapChangedCB ArFunctor functor,
ArListPos::Pos  position = ArListPos::LAST
 

Adds a callback called before the map changed callbacks are called.

Adds a read callback that is called when the map is read in, BEFORE the map changed callbacks... note that anything added here CANNOT care about what is in the map file... this is for adding things that the map changed callbacks might care about..., the map is locked when this callback happens so you don't need to worry about that.

Definition at line 257 of file ArMap.cpp.

ArMapObject * ArMap::findFirstMapObject const char *  name,
const char *  type
 

Gets the first map object of given name and type if it exists.

Returns:
The first map object (arbitrary) which matches both name and type (unless either is NULL), return NULL if no object matches.
Parameters:
name The name of the object to try to find, NULL means find any name
type The type of object to try to find... NULL means find any type

Definition at line 1493 of file ArMap.cpp.

ArMapObject * ArMap::findMapObject const char *  name,
const char *  type = NULL
 

Gets a map object of given name and type if it exists.

Parameters:
name The name of the object to try to find, NULL means find any name
type The type of object to try to find... NULL means find any type

Definition at line 1448 of file ArMap.cpp.

std::list< ArArgumentBuilder * > * ArMap::getInfo int  infoType  ) 
 

Gets the strings for the specified Info category.

Parameters:
infoType the int ID of the Info category; must be >= 0 and less than numInfos
Returns:
std::list<ArArgumentBuilder *> * a pointer to the Info list; NULL if infoType was invalid

Definition at line 217 of file ArMap.cpp.

ArTime ArMap::getInfoChanged int  infoType  ) 
 

Returns the last time that the specified Info category was changed.

Parameters:
infoType the int ID of the Info category; must be >= 0 and < numInfos
Returns:
ArTime the time that the Info category was last changed; returns default time (1/1/1970) if infoType is invalid

Definition at line 695 of file ArMap.cpp.

const char * ArMap::getInfoName int  infoType  )  [protected, virtual]
 

Returns the name of the specified Info category (i.e. the "xInfo:" tag at the beginning of the line).

If subclasses define additional Info categories, then they must override this method.

Parameters:
infoType the int ID of the Info category
Returns:
const char * the name of the specified Info category; or NULL if not found

Definition at line 1475 of file ArMap.cpp.

bool ArMap::handleData ArArgumentBuilder arg  )  [protected]
 

bool ArMap::handleRouteInfo(ArArgumentBuilder *arg) { ArArgumentBuilder *routeInfo = NULL; routeInfo = new ArArgumentBuilder(*arg); myLoadingRouteInfo.push_back(routeInfo); return true; }

Definition at line 572 of file ArMap.cpp.

bool ArMap::isLoadingDataStarted  )  [inline]
 

This value returns true once the DATA tag has been reached. The rest of the map contains data points.

Definition at line 566 of file ArMap.h.

bool ArMap::isLoadingLinesAndDataStarted  )  [inline]
 

This value returns true once the LINES tag has been reached. The rest of the map contains data points.

Definition at line 573 of file ArMap.h.

void ArMap::parsingComplete void   ) 
 

Says that the parsing by lines is done and to use the parsed data.

If you've been giving the map lines to parse with parseLine and you are finished then you should call this function call to move all of that data from the loading zone into the main variables.

Definition at line 1152 of file ArMap.cpp.

bool ArMap::readFile const char *  fileName,
char *  errorBuffer = NULL,
size_t  errorBufferLen = 0
 

Reads a map.

Parameters:
fileName the name of the file to read
errorBuffer this is mainly for the config stuff, saves errors here (you can just use the default NULL)
errorBufferLen length of the error buffer

Definition at line 919 of file ArMap.cpp.

bool ArMap::setInfo int  infoType,
const std::list< ArArgumentBuilder * > *  infoList
 

Sets the contents of the specified Info category.

Parameters:
infoType the int ID of the Info category to be set; must be >= 0 and < numInfos;
infoList the std::list<ArArgumentBuilder *> * that defines the Info category's contents; NULL to clear the Info
Returns:
bool set to true if the contents were successfully set; false, if infoType was invalid

Definition at line 856 of file ArMap.cpp.

void ArMap::setLines const std::vector< ArLineSegment > *  lines  ) 
 

Sets the lines (copies those passed in).

Deletes and clears the old lines (and the info about our lines) and then makes a copy of the ones passed in.

Parameters:
lines lines to copy, or if NULL, then clear all previous lines stored.

Definition at line 782 of file ArMap.cpp.

void ArMap::setMapInfo const std::list< ArArgumentBuilder * > *  mapInfo  ) 
 

Sets the map info (copies those passed in).

Deletes and clears the old mapInfo and then makes a copy of the ones passed in.

Parameters:
mapInfo the mapInfo to copy, if NULL just deletes the ones we had

Definition at line 842 of file ArMap.cpp.

void ArMap::setMapObjects const std::list< ArMapObject * > *  mapObjects  ) 
 

Sets the map objects (copies those passed in).

Deletes and clears the old map objects and then makes a copy of the ones passed in.

Parameters:
mapObjects the map objects to copy, if NULL just deletes the ones we had

Definition at line 715 of file ArMap.cpp.

void ArMap::setPoints const std::vector< ArPose > *  points  ) 
 

Sets the points (copies those passed in).

Deletes and clears the old points (and the info about our points) and then makes a copy of the ones passed in.

Parameters:
points the points to copy, if NULL just clears the ones we had

Definition at line 735 of file ArMap.cpp.

bool ArMap::writeFile const char *  fileName,
bool  internalCall = false
 

Write out a map file.

Writes a file out... The map is locked while the write happens.

Parameters:
fileName the fileName to write out
internalCall whether this is an internal call or not (doesn't lock on internal calls)

Definition at line 1396 of file ArMap.cpp.

void ArMap::writeLinesToFunctor ArFunctor2< int, std::vector< ArLineSegment > * > *  functor  ) 
 

Writes the map line segments to a functor.

A pointer to the entire line segment vector is passed directly to the modify the vector's contents.

Definition at line 1381 of file ArMap.cpp.

void ArMap::writeObjectsToFunctor ArFunctor1< const char * > *  functor,
const char *  endOfLineChars
 

Writes the map header information and objects to a text-based functor.

This method writes everything up to and including the DATA tag to the given functor. The data points are not written.

Definition at line 1280 of file ArMap.cpp.

void ArMap::writePointsToFunctor ArFunctor2< int, std::vector< ArPose > * > *  functor  ) 
 

Writes the map data points to a functor.

A pointer to the entire data point vector is passed directly to the functor in order to improve performance. The functor should not modify the vector's contents.

Definition at line 1375 of file ArMap.cpp.

void ArMap::writeToFunctor ArFunctor1< const char * > *  functor,
const char *  endOfLineChars
 

Writes all of the map to a functor instead of a to a file.

This function calls the functor with each line of the map, the lines do not have any \n or \r characters on them

Definition at line 1237 of file ArMap.cpp.


Member Data Documentation

const char * ArMap::ourInfoNames [static, protected]
 

Initial value:

 
{
  "MetaInfo:",
    "TaskInfo:",
    "RouteInfo:",
  "SchedTaskInfo:",
  "SchedInfo:"
}
Array of names for the standard Info categories; see InfoType.

Definition at line 36 of file ArMap.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:44 2007 for Aria by  doxygen 1.4.0