Aria  2.8.0
ArMapInfo Class Reference

A container for the various "info" tags in an Aria map. More...

#include <ArMapComponents.h>

Inherits ArMapInfoInterface.

Public Member Functions

virtual bool addToFileParser (ArFileParser *fileParser)
 Adds handlers for all of the info types to the given file parser.
 
 ArMapInfo (const char **infoNameList=NULL, size_t infoNameCount=0, const char *keywordPrefix=NULL)
 Contructor. More...
 
 ArMapInfo (const ArMapInfo &other)
 Copy contructor.
 
virtual void clear ()
 Clears all info arguments and deletes them.
 
virtual std::list< ArArgumentBuilder * > * getInfo (const char *infoName)
 
virtual std::list< ArArgumentBuilder * > * getInfo (int infoType)
 
virtual int getInfoCount () const
 
virtual const char * getInfoName (int infoType)
 
virtual std::list< std::string > getInfoNames () const
 
virtual std::list< ArArgumentBuilder * > * getMapInfo (void)
 
virtual ArTime getTimeChanged () const
 Returns the time at which the info were last changed.
 
ArMapInfooperator= (const ArMapInfo &other)
 Assignment operator.
 
virtual bool remFromFileParser (ArFileParser *fileParser)
 Removes handlers for all of the info types from the given file parser.
 
virtual bool setInfo (const char *infoName, const std::list< ArArgumentBuilder *> *infoList, ArMapChangeDetails *changeDetails)
 
virtual bool setInfo (int infoType, const std::list< ArArgumentBuilder *> *infoList, ArMapChangeDetails *changeDetails=NULL)
 
virtual bool setMapInfo (const std::list< ArArgumentBuilder *> *mapInfo, ArMapChangeDetails *changeDetails=NULL)
 
virtual void writeInfoToFunctor (ArFunctor1< const char *> *functor, const char *endOfLineChars)
 
virtual ~ArMapInfo ()
 Destructor.
 
- Public Member Functions inherited from ArMapInfoInterface
 ArMapInfoInterface ()
 Constructor.
 
virtual ~ArMapInfoInterface ()
 Destructor.
 

Protected Types

typedef std::map< std::string, ArMapInfoData *, ArStrCaseCmpOpArInfoNameToDataMap
 

Protected Member Functions

void createMultiSet (const char *infoName, ArMapFileLineSet *multiSet, ArMapChangeDetails *changeDetails)
 Writes the specified info arguments to the given ArMapFileLineSet. More...
 
ArMapInfoData * findData (const char *infoName)
 
ArMapInfoData * findDataByKeyword (const char *keyword)
 
bool handleInfo (ArArgumentBuilder *arg)
 Processes the given argument for the specified info.
 
void setChanged ()
 Basically updates the timeChanged to now.
 
void setDefaultInfoNames ()
 Populates this object with the default info names / keywords.
 

Protected Attributes

ArInfoNameToDataMap myInfoNameToDataMap
 
std::map< int, std::string > myInfoTypeToNameMap
 
std::map< std::string, std::string, ArStrCaseCmpOpmyKeywordToInfoNameMap
 
int myNumInfos
 Number of info types contained in this collection.
 
std::string myPrefix
 
ArTime myTimeChanged
 Time at which the info was last changed.
 

Friends

class ArMapSimple
 Give ArMapSimple access to the createMultiSet() and setChanged() methods.
 

Additional Inherited Members

- Public Types inherited from ArMapInfoInterface
enum  { INFO_COUNT = LAST_INFO + 1 }
 
enum  InfoType {
  MAP_INFO, FIRST_INFO = MAP_INFO, META_INFO, TASK_INFO,
  ROUTE_INFO, SCHED_TASK_INFO, SCHED_INFO, CAIRN_INFO,
  CUSTOM_INFO, LAST_INFO = CUSTOM_INFO
}
 List of the standard Info categories defined for Aria maps. More...
 
- Static Public Attributes inherited from ArMapInfoInterface
static const char * CAIRN_INFO_NAME = "CairnInfo:"
 
static const char * CUSTOM_INFO_NAME = "CustomInfo:"
 
static const char * MAP_INFO_NAME = "MapInfo:"
 
static const char * META_INFO_NAME = "MetaInfo:"
 
static const char * ROUTE_INFO_NAME = "RouteInfo:"
 
static const char * SCHED_INFO_NAME = "SchedInfo:"
 
static const char * SCHED_TASK_INFO_NAME = "SchedTaskInfo:"
 
static const char * TASK_INFO_NAME = "TaskInfo:"
 

Detailed Description

A container for the various "info" tags in an Aria map.

ArMapInfo is an implementation of ArMapInfoInterface that provides access to a collection of "info" arguments (such as MapInfo and RouteInfo). An Aria map may have one or more categories of info, each implemented by an ordered list of ArArgumentBuilder's.

Info types are currently identified by a unique integer. The default types are defined in ArMapInfoInterface::InfoType, but applications may define additional types. (See ArMapInfo::ArMapInfo(int*, char**, size_t))

Constructor & Destructor Documentation

◆ ArMapInfo()

ArMapInfo::ArMapInfo ( const char **  infoNameList = NULL,
size_t  infoNameCount = 0,
const char *  keywordPrefix = NULL 
)

Contructor.

Parameters
infoNameListan array of the char * keywords for each of the standard ArMapInfo::InfoType's; if NULL, then the default keywords are used
infoNameCountthe size_t length of the infoNameList array
keywordPrefixoptional prefix to add to keywords.

Member Function Documentation

◆ createMultiSet()

void ArMapInfo::createMultiSet ( const char *  infoName,
ArMapFileLineSet multiSet,
ArMapChangeDetails changeDetails 
)
protected

Writes the specified info arguments to the given ArMapFileLineSet.

Parameters
infoNameunique identifier for the info to be written
multiSetthe ArMapFileLineSet * to which to write the info; must be non-NULL
changeDetailsthe ArMapChangeDetails * that specifies the parent/child relationship amongst info lines
See also
ArMapChangeDetails::isChildArg

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