#include <ArMapComponents.h>
Inheritance diagram for ArMapSimple:
ArMapSimple is the real subject of the ArMap proxy. Functionally, it is identical to the ArMap, except that it is not well-suited for for loading from a file at runtime and therefore doesn't provide any hooks into the Aria config. In general, ArMap should be used instead. The exception to this rule may be in off-line authoring tools where error checking can be performed at a higher level.
Public Member Functions | |
virtual void | addMapChangedCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
virtual void | addPostWriteFileCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
virtual void | addPreMapChangedCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
virtual void | addPreWriteFileCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
virtual bool | addToFileParser (ArFileParser *fileParser) |
ArMapSimple (const ArMapSimple &other) | |
Copy constructor. | |
ArMapSimple (const char *baseDirectory="./", const char *tempDirectory=NULL, const char *overrideMutexName=NULL) | |
Constructor. | |
virtual bool | calculateChecksum (unsigned char *md5DigestBuffer, size_t md5DigestBufferLen) |
virtual void | clear () |
virtual ArMapInterface * | clone () |
virtual std::string | createRealFileName (const char *fileName) |
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 ArArgumentBuilder * | findMapObjectParams (const char *mapObjectName) |
virtual std::list< ArMapObject * > | findMapObjectsOfType (const char *type, bool isIncludeWithHeading=false) |
virtual const char * | getBaseDirectory (void) const |
virtual const char * | getDisplayString (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual const char * | getFileName (void) const |
virtual bool | getIgnoreCase (void) |
virtual bool | getIgnoreEmptyFileName (void) |
virtual ArMapInfoInterface * | getInactiveInfo () |
virtual ArMapObjectsInterface * | getInactiveObjects () |
virtual std::list< ArArgumentBuilder * > * | getInfo (int infoType) |
virtual std::list< ArArgumentBuilder * > * | getInfo (const char *infoName) |
virtual int | getInfoCount () const |
virtual const char * | getInfoName (int infoType) |
virtual std::list< std::string > | getInfoNames () const |
virtual ArPose | getLineMaxPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual ArPose | getLineMinPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual std::vector< ArLineSegment > * | getLines (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual ArLog::LogLevel | getMapChangedLogLevel (void) |
virtual bool | getMapId (ArMapId *mapIdOut, bool isInternalCall=false) |
virtual std::list< ArArgumentBuilder * > * | getMapInfo (void) |
virtual std::list< ArMapObject * > * | getMapObjects (void) |
virtual ArPose | getMaxPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual ArPose | getMinPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual int | getNumLines (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual int | getNumPoints (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual double | getOriginAltitude () |
virtual ArPose | getOriginLatLong () |
virtual std::vector< ArPose > * | getPoints (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual struct stat | getReadFileStat () const |
virtual std::list< ArArgumentBuilder * > * | getRemainder () |
virtual int | getResolution (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual std::list< std::string > | getScanTypes () const |
virtual const char * | getTempDirectory (void) const |
virtual bool | hasOriginLatLongAlt () |
bool | isLoadingDataStarted () |
bool | isLoadingLinesAndDataStarted () |
virtual bool | isSortedLines (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) const |
virtual bool | isSortedPoints (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) const |
virtual void | loadDataPoint (double x, double y) |
virtual void | loadLineSegment (double x1, double y1, double x2, double y2) |
virtual int | lock () |
virtual void | mapChanged (void) |
ArMapSimple & | operator= (const ArMapSimple &other) |
Assignment operator. | |
bool | parseLine (char *line) |
void | parsingComplete (void) |
virtual bool | readDataPoint (char *line) |
virtual bool | readFile (const char *fileName, char *errorBuffer=NULL, size_t errorBufferLen=0, unsigned char *md5DigestBuffer=NULL, size_t md5DigestBufferLen=0) |
virtual bool | readLineSegment (char *line) |
virtual bool | refresh () |
virtual bool | remFromFileParser (ArFileParser *fileParser) |
virtual void | remMapChangedCB (ArFunctor *functor) |
virtual void | remPostWriteFileCB (ArFunctor *functor) |
virtual void | remPreMapChangedCB (ArFunctor *functor) |
virtual void | remPreWriteFileCB (ArFunctor *functor) |
virtual bool | set (ArMapInterface *other) |
virtual void | setBaseDirectory (const char *baseDirectory) |
virtual void | setIgnoreCase (bool ignoreCase=false) |
virtual void | setIgnoreEmptyFileName (bool ignore) |
virtual bool | setInfo (int infoType, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails=NULL) |
virtual bool | setInfo (const char *infoName, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails=NULL) |
virtual void | setLines (const std::vector< ArLineSegment > *lines, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, bool isSortedLines=false, ArMapChangeDetails *changeDetails=NULL) |
virtual void | setMapChangedLogLevel (ArLog::LogLevel level) |
virtual bool | setMapInfo (const std::list< ArArgumentBuilder * > *mapInfo, ArMapChangeDetails *changeDetails=NULL) |
virtual bool | setMapObjectParams (const char *mapObjectName, ArArgumentBuilder *params, ArMapChangeDetails *changeDetails=NULL) |
virtual void | setMapObjects (const std::list< ArMapObject * > *mapObjects, bool isSortedObjects=false, ArMapChangeDetails *changeDetails=NULL) |
virtual void | setOriginLatLongAlt (bool hasOriginLatLong, const ArPose &originLatLong, double altitude, ArMapChangeDetails *changeDetails=NULL) |
virtual void | setPoints (const std::vector< ArPose > *points, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, bool isSortedPoints=false, ArMapChangeDetails *changeDetails=NULL) |
virtual void | setQuiet (bool isQuiet) |
virtual void | setResolution (int resolution, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, ArMapChangeDetails *changeDetails=NULL) |
virtual bool | setScanTypes (const std::list< std::string > &scanTypeList) |
virtual void | setSourceFileName (const char *sourceName, const char *fileName, bool isInternalCall=false) |
virtual void | setTempDirectory (const char *tempDirectory) |
virtual int | tryLock () |
virtual int | unlock () |
virtual bool | writeFile (const char *fileName, bool internalCall=false, unsigned char *md5DigestBuffer=NULL, size_t md5DigestBufferLen=0, time_t fileTimestamp=-1) |
virtual void | writeInfoToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars) |
virtual void | writeLinesToFunctor (ArFunctor2< int, std::vector< ArLineSegment > * > *functor, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, ArFunctor1< const char * > *keywordFunctor=NULL) |
virtual void | writeObjectListToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars) |
virtual void | writeObjectsToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars, bool isOverrideAsSingleScan=false, const char *maxCategory=NULL) |
virtual void | writePointsToFunctor (ArFunctor2< int, std::vector< ArPose > * > *functor, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, ArFunctor1< const char * > *keywordFunctor=NULL) |
virtual void | writeScanToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) |
virtual void | writeSupplementToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars) |
virtual void | writeToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars) |
virtual | ~ArMapSimple (void) |
Destructor. | |
Static Public Member Functions | |
static std::list< ArArgumentBuilder * >::iterator | findMapObjectParamInfo (const char *mapObjectName, std::list< ArArgumentBuilder * > &cairnInfoList) |
Searches the given CairnInfo list for an entry that matches the given mapObject. | |
Protected Member Functions | |
bool | addScansToParser () |
Adds all of the map's scan types to the current file parser. | |
void | addToCallbackList (ArFunctor *functor, ArListPos::Pos position, std::list< ArFunctor * > *cbList) |
bool | createScans (const std::list< std::string > &scanTypeList) |
Sets up the map to contain teh specified scan types. | |
ArTime | findMaxMapScanTimeChanged () |
ArMapScan * | findScanWithDataKeyword (const char *myLoadingDataTag, bool *isLineDataTagOut) |
virtual const char * | getMapCategory () |
virtual ArMapScan * | getScan (const char *scanType) const |
Returns the ArMapScan for the specified scan type. | |
bool | handleDataIntro (ArArgumentBuilder *arg) |
Callback that handles the different types of data introductions (e.g. DATA, LINES). | |
bool | handleMapCategory (ArArgumentBuilder *arg) |
Callback that handles the different types of map categories (e.g. 2D-Map, 2D-Map-Ex). | |
bool | handleRemainder (ArArgumentBuilder *arg) |
bool | handleSources (ArArgumentBuilder *arg) |
Callback that handles the Sources keyword. | |
void | invokeCallbackList (std::list< ArFunctor * > *cbList) |
bool | isDataTag (const char *line) |
void | remFromCallbackList (ArFunctor *functor, std::list< ArFunctor * > *cbList) |
bool | remScansFromParser (bool isRemovePointsAndLinesKeywords=true) |
Removes all of the map's scan types from the current file parser. | |
void | reset () |
bool | setInactiveInfo (const char *infoName, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails=NULL) |
void | setInactiveObjects (const std::list< ArMapObject * > *mapObjects, bool isSortedObjects=false, ArMapChangeDetails *changeDetails=NULL) |
virtual void | updateMapCategory (const char *updatedInfoName=NULL) |
void | updateMapFileInfo (const char *realFileName) |
void | updateSummaryScan () |
void | writeScanTypesToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars) |
Static Protected Member Functions | |
static int | getNextFileNumber () |
Protected Attributes | |
std::string | myBaseDirectory |
ArMD5Calculator * | myChecksumCalculator |
ArRetFunctor1C< bool, ArMapSimple, ArArgumentBuilder * > | myDataIntroCB |
ArDataTagToScanTypeMap | myDataTagToScanTypeMap |
std::string | myFileName |
bool | myIgnoreCase |
bool | myIgnoreEmptyFileName |
ArMapInfo *const | myInactiveInfo |
ArMapObjects *const | myInactiveObjects |
bool | myIsQuiet |
bool | myIsWriteToTempFile |
bool | myLoadingDataStarted |
std::string | myLoadingDataTag |
bool | myLoadingGotMapCategory |
bool | myLoadingLinesAndDataStarted |
ArFileParser * | myLoadingParser |
ArMapScan * | myLoadingScan |
std::string | myMapCategory |
ArRetFunctor1C< bool, ArMapSimple, ArArgumentBuilder * > | myMapCategoryCB |
std::list< std::string > | myMapCategoryList |
ArMapChangedHelper * | myMapChangedHelper |
ArMapId | myMapId |
ArMapInfo *const | myMapInfo |
std::map< std::string, ArArgumentBuilder *, ArStrCaseCmpOp > | myMapObjectNameToParamsMap |
ArMapObjects *const | myMapObjects |
ArMapSupplement *const | myMapSupplement |
ArMutex | myMutex |
std::list< ArFunctor * > | myPostWriteCBList |
std::list< ArFunctor * > | myPreWriteCBList |
stat | myReadFileStat |
std::list< ArArgumentBuilder * > | myRemainderList |
List of map file lines that were not recognized. | |
ArRetFunctor1C< bool, ArMapSimple, ArArgumentBuilder * > | myRemCB |
std::list< std::string > | myScanTypeList |
ArRetFunctor1C< bool, ArMapSimple, ArArgumentBuilder * > | mySourcesCB |
ArMapScan * | mySummaryScan |
std::string | myTempDirectory |
ArTime | myTimeMapInfoChanged |
ArTime | myTimeMapObjectsChanged |
ArTime | myTimeMapScanChanged |
ArTime | myTimeMapSupplementChanged |
ArTypeToScanMap | myTypeToScanMap |
Static Protected Attributes | |
static int | ourTempFileNumber |
static ArMutex | ourTempFileNumberMutex |
ArMapSimple::ArMapSimple | ( | const char * | baseDirectory = "./" , |
|
const char * | tempDirectory = NULL , |
|||
const char * | overrideMutexName = NULL | |||
) |
Constructor.
baseDirectory | the name of the directory in which to search for map files that are not fully qualified | |
tempDirectory | the name of the directory in which to write temporary files when saving a map; if NULL, then the map file is written directly. Note that using a temp file reduces the risk that the map will be corrupted if the application crashes. | |
overrideMutexName | an optional name to be used for the map object's mutex; useful for debugging when multiple maps are active |
bool ArMapSimple::addScansToParser | ( | ) | [protected] |
Adds all of the map's scan types to the current file parser.
This method calls addToFileParser() on each of the map's scans. It also adds handlers for each of the scans' data point and line introduction keywords.
bool ArMapSimple::createScans | ( | const std::list< std::string > & | scanTypeList | ) | [protected] |
Sets up the map to contain teh specified scan types.
Any scans which are currently in the map are cleared and removed. This method is not virtual because it is called by the constructor.
scanTypeList | a list of the scan type string identifiers to be created; the list must be non-empty and must not contain duplicates; if the list contains more than one entry, then they all must be non-empty |
static std::list<ArArgumentBuilder *>::iterator ArMapSimple::findMapObjectParamInfo | ( | const char * | mapObjectName, | |
std::list< ArArgumentBuilder * > & | cairnInfoList | |||
) | [static] |
Searches the given CairnInfo list for an entry that matches the given mapObject.
The CairnInfo list stores the parameter information (if any) for map objects. If a map object is removed (or activated), then the CairnInfo must also be updated.
mapObject | the ArMapObject for which to find the parameters | |
cairnInfoList | the list of ArArgumentBuilder *'s that contain the map object parameters (also may be set to the inactive section) |
virtual struct stat ArMapSimple::getReadFileStat | ( | ) | const [virtual] |
Java and Python Wrappers: Not available in Java or Python wrapper libraries.
Implements ArMapInterface.
bool ArMapSimple::handleDataIntro | ( | ArArgumentBuilder * | arg | ) | [protected] |
Callback that handles the different types of data introductions (e.g. DATA, LINES).
This method replaces the old handleData and handleLines methods. It determines which keyword was detected and updates the myLoadingDataTag and myLoadingScan attributes accordingly.
arg | a pointer to the parsed ArArgumentBuilder; no arguments are expected |
bool ArMapSimple::handleMapCategory | ( | ArArgumentBuilder * | arg | ) | [protected] |
Callback that handles the different types of map categories (e.g. 2D-Map, 2D-Map-Ex).
This method replaces the old handle2DMap method. It determines which category was detected and sets the myMapCategory attribute accordingly.
arg | a pointer to the parsed ArArgumentBuilder; no arguments are expected |
bool ArMapSimple::handleSources | ( | ArArgumentBuilder * | arg | ) | [protected] |
Callback that handles the Sources keyword.
arg | a pointer to the parsed ArArgumentBuilder; a list of string scan type arguments are expected |
virtual void ArMapSimple::loadDataPoint | ( | double | x, | |
double | y | |||
) | [virtual] |
Public for ArQClientMapProducer
Implements ArMapScanInterface.