#include <ArMapComponents.h>
Inheritance diagram for ArMapInfo:
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))
Public Member Functions | |
virtual bool | addToFileParser (ArFileParser *fileParser) |
Adds handlers for all of the info types to the given file parser. | |
ArMapInfo (const ArMapInfo &other) | |
Copy contructor. | |
ArMapInfo (const char **infoNameList=NULL, size_t infoNameCount=0, const char *keywordPrefix=NULL) | |
Contructor. | |
virtual void | clear () |
Clears all info arguments and deletes them. | |
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 std::list< ArArgumentBuilder * > * | getMapInfo (void) |
virtual ArTime | getTimeChanged () const |
Returns the time at which the info were last changed. | |
ArMapInfo & | operator= (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 (int infoType, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails=NULL) |
virtual bool | setInfo (const char *infoName, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails) |
virtual bool | setMapInfo (const std::list< ArArgumentBuilder * > *mapInfo, ArMapChangeDetails *changeDetails=NULL) |
virtual void | writeInfoToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars) |
virtual | ~ArMapInfo () |
Destructor. | |
Protected Types | |
typedef std::map< std::string, ArMapInfoData *, ArStrCaseCmpOp > | ArInfoNameToDataMap |
Protected Member Functions | |
void | createMultiSet (const char *infoName, ArMapFileLineSet *multiSet, ArMapChangeDetails *changeDetails) |
Writes the specified info arguments to the given ArMapFileLineSet. | |
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, ArStrCaseCmpOp > | myKeywordToInfoNameMap |
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. |
ArMapInfo::ArMapInfo | ( | const char ** | infoNameList = NULL , |
|
size_t | infoNameCount = 0 , |
|||
const char * | keywordPrefix = NULL | |||
) |
Contructor.
infoNameList | an array of the char * keywords for each of the standard ArMapInfo::InfoType's; if NULL, then the default keywords are used | |
infoNameCount | the size_t length of the infoNameList array |
void ArMapInfo::createMultiSet | ( | const char * | infoName, | |
ArMapFileLineSet * | multiSet, | |||
ArMapChangeDetails * | changeDetails | |||
) | [protected] |
Writes the specified info arguments to the given ArMapFileLineSet.
infoType | the unique int identifier of the info to be written | |
multiSet | the ArMapFileLineSet * to which to write the info; must be non-NULL | |
changeDetails | the ArMapChangeDetails * that specifies the parent/child relationship amongst info lines |