#include <ArMapInterface.h>
Inheritance diagram for ArMapInfoInterface:
ArMapInfoInterface is an abstract class that defines the methods used to get and set an Aria map's "info" arguments. An Aria map may have one or more categories of info, each implemented by an ordered list of ArArgumentBuilder's. The ArMapInfoInterface defines access to a collection of these info categories.
Public Types | |
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... | |
Public Member Functions | |
ArMapInfoInterface () | |
Constructor. | |
virtual std::list< ArArgumentBuilder * > * | getInfo (int infoType)=0 |
Gets the strings for the specified Info category. | |
virtual std::list< ArArgumentBuilder * > * | getInfo (const char *infoName)=0 |
Returns the arguments for the specified info category; or NULL if none found. | |
virtual int | getInfoCount () const=0 |
Returns the number of info categories that are contained in this collection. | |
virtual const char * | getInfoName (int infoType)=0 |
Returns the name of the specified Info type. | |
virtual std::list< std::string > | getInfoNames () const=0 |
Returns a list of the info category names that are contained in this collection. | |
virtual std::list< ArArgumentBuilder * > * | getMapInfo (void)=0 |
Gets the map info strings. | |
virtual bool | setInfo (int infoType, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails=NULL)=0 |
Sets the contents of the specified Info category (copies those passed in). | |
virtual bool | setInfo (const char *infoName, const std::list< ArArgumentBuilder * > *infoList, ArMapChangeDetails *changeDetails=NULL)=0 |
Sets the contents of the specified Info category (copies those passed in). | |
virtual bool | setMapInfo (const std::list< ArArgumentBuilder * > *mapInfo, ArMapChangeDetails *changeDetails=NULL)=0 |
Sets the map info (copies those passed in). | |
virtual void | writeInfoToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars)=0 |
Writes the info collection to a text-based functor. | |
virtual | ~ArMapInfoInterface () |
Destructor. | |
Static Public Attributes | |
static const char * | CAIRN_INFO_NAME |
static const char * | CUSTOM_INFO_NAME |
static const char * | MAP_INFO_NAME |
static const char * | META_INFO_NAME |
static const char * | ROUTE_INFO_NAME |
static const char * | SCHED_INFO_NAME |
static const char * | SCHED_TASK_INFO_NAME |
static const char * | TASK_INFO_NAME |
List of the standard Info categories defined for Aria maps.
virtual std::list<ArArgumentBuilder *>* ArMapInfoInterface::getInfo | ( | int | infoType | ) | [pure virtual] |
Gets the strings for the specified Info category.
infoType | the int ID of the Info category; must be >= 0 and less than numInfos |
virtual std::list<ArArgumentBuilder *>* ArMapInfoInterface::getInfo | ( | const char * | infoName | ) | [pure virtual] |
Returns the arguments for the specified info category; or NULL if none found.
This method returns a pointer to the actual ArArgumentBuilder list that is contained in the map. It is not safe to store these pointers because they will be deleted when the map is changed. If the caller needs the info arguments at a later time, then it should create its own copy of each argument in the list. This method is not thread-safe.
infoName | the unique char * identifier of the info category to be returned; must be non-NULL and a member of |
virtual const char* ArMapInfoInterface::getInfoName | ( | int | infoType | ) | [pure virtual] |
Returns the name of the specified Info type.
infoType | the int ID of the Info category |
virtual std::list<std::string> ArMapInfoInterface::getInfoNames | ( | ) | const [pure virtual] |
Returns a list of the info category names that are contained in this collection.
virtual std::list<ArArgumentBuilder *>* ArMapInfoInterface::getMapInfo | ( | void | ) | [pure virtual] |
virtual bool ArMapInfoInterface::setInfo | ( | int | infoType, | |
const std::list< ArArgumentBuilder * > * | infoList, | |||
ArMapChangeDetails * | changeDetails = NULL | |||
) | [pure virtual] |
Sets the contents of the specified Info category (copies those passed in).
This method is not thread-safe.
infoType | the int ID of the Info category to be set | |
infoList | the std::list<ArArgumentBuilder *> * that defines the Info category's contents; NULL to clear the Info | |
changeDetails | a pointer to the ArMapChangeDetails in which to accumulate changes to the map's info lines; if NULL, then changes are not tracked |
virtual bool ArMapInfoInterface::setInfo | ( | const char * | infoName, | |
const std::list< ArArgumentBuilder * > * | infoList, | |||
ArMapChangeDetails * | changeDetails = NULL | |||
) | [pure virtual] |
Sets the contents of the specified Info category (copies those passed in).
This method is not thread-safe.
infoName | the unique const char * identifier of the | |
infoList | the std::list<ArArgumentBuilder *> * that defines the Info category's contents; NULL to clear the Info | |
changeDetails | a pointer to the ArMapChangeDetails in which to accumulate changes to the map's info lines; if NULL, then changes are not tracked |
setInfoNames
virtual bool ArMapInfoInterface::setMapInfo | ( | const std::list< ArArgumentBuilder * > * | mapInfo, | |
ArMapChangeDetails * | changeDetails = NULL | |||
) | [pure virtual] |
Sets the map info (copies those passed in).
This method is equivalent to setInfo(MAP_INFO, mapInfo, changeDetails);
virtual void ArMapInfoInterface::writeInfoToFunctor | ( | ArFunctor1< const char * > * | functor, | |
const char * | endOfLineChars | |||
) | [pure virtual] |
Writes the info collection to a text-based functor.
This method writes a text line for each of the info's ArArgumentBuilders. This method is not thread-safe.
functor | a pointer to the ArFunctor1 that writes the text lines | |
endOfLineChars | the const char * string that indicates the end of each text line |