|
Isis 3.0 Application Source Code Reference |
Home |
#include <MdisEdrKeys.h>
This class ingests a PDS EDR label and stages all keywords found in a table. Keywords can be added through the Pvl class or updated explicitly by adding a PvlKeyword.
Any add or update operation will replace existing completely so no more than on keyword will exist in the table at a time.
Keyword names are not case sensitive. Also, any Object or Group hierarchy is not honored in this class. Meaning that if a keyword of the same name exists in more than one Object or Group, only the last occurring one is retained.
Definition at line 60 of file MdisEdrKeys.h.
Public Member Functions | |
| MdisEdrKeys () | |
| Benign constuctor. | |
| MdisEdrKeys (Pvl &edrlab) | |
| Constuctor adds a Pvl label to the table. | |
| MdisEdrKeys (const std::string &edrfile) | |
| Add a Pvl file (label) to the table. | |
| MdisEdrKeys (Cube &cube) | |
| Construct from an Isis Cube file. | |
| virtual | ~MdisEdrKeys () |
| Destroys the object. | |
| int | size () const |
| Returns the number of keywords in the container. | |
| void | add (const PvlKeyword &key, const std::string &name="") |
| Adds a keyword to the container directly. | |
| const PvlKeyword & | operator[] (const int index) const throw (iException &) |
| Returns the nth keyword in the container. | |
| PvlKeyword & | get (const std::string &name) throw (iException &) |
| Return the specified keyword by name. | |
| const PvlKeyword & | get (const std::string &name) const throw (iException &) |
| Returns the specified keyword by name. | |
| void | updateKeys (Pvl &keys) |
| Replaces or adds keywords in a Pvl class. | |
| std::string | extract (const std::vector< std::string > &keylist, const std::string &NAstr, PvlGroup *group=0) |
| Return a formatted list of keyword values. | |
| MdisEdrKeys | ( | ) | [inline] |
| MdisEdrKeys | ( | Pvl & | edrlab | ) | [inline] |
| MdisEdrKeys | ( | const std::string & | edrfile | ) | [inline] |
Add a Pvl file (label) to the table.
This constuctor will ingest a Pvl labelled file to the table. It can be any Pvl file that is supported by the Pvl class, including most all PDS formatted labels. This particular interface assumes a MDIS PDS EDR label as its parameter.
| edrfile | File containing the PDS EDR label |
Definition at line 79 of file MdisEdrKeys.h.
| MdisEdrKeys | ( | Cube & | cube | ) | [inline] |
Construct from an Isis Cube file.
This constructor will ingest an ISIS cube file label. Note that there is no regard for the Object/Group structure so all keywords are included and keywords that repeat in other Objects or Groups replace any existing definition.
| cube | A valid ISIS Cube object with a label |
Definition at line 94 of file MdisEdrKeys.h.
| virtual ~MdisEdrKeys | ( | ) | [inline, virtual] |
| int size | ( | ) | const [inline] |
Returns the number of keywords in the container.
Definition at line 107 of file MdisEdrKeys.h.
| void add | ( | const PvlKeyword & | key, | |
| const std::string & | name = "" | |||
| ) | [inline] |
Adds a keyword to the container directly.
This method is provided for adding keywords directly to the contained that may not be contained within a Pvl object.
| key | PvlKeyword to add to the container | |
| name | Optional name other than what the keyword is named |
Definition at line 118 of file MdisEdrKeys.h.
| const PvlKeyword& operator[] | ( | const int | index | ) | const throw (iException &) [inline] |
Returns the nth keyword in the container.
This method allows one to retrieve the nth keyword in the container as a means to iterate through the complete contents for direct interogation/use.
If the keyword at specified index does not exist, an exception is thrown.
| index | Index of the keyword ranging from 0 to size()-1 |
Definition at line 142 of file MdisEdrKeys.h.
| PvlKeyword& get | ( | const std::string & | name | ) | throw (iException &) [inline] |
Return the specified keyword by name.
Retrieves a keyword by name without regard for case. An exception is thrown if it does not exist.
| name | Name of keyword to retrieve |
Definition at line 156 of file MdisEdrKeys.h.
| const PvlKeyword& get | ( | const std::string & | name | ) | const throw (iException &) [inline] |
Returns the specified keyword by name.
Retrieves a keyword by name without regard for case. An exception is thrown if it does not exist.
| name | Name of keyword to retrieve |
Definition at line 171 of file MdisEdrKeys.h.
| void updateKeys | ( | Pvl & | keys | ) | [inline] |
Replaces or adds keywords in a Pvl class.
This method will add all the keywords found in the Pvl keys object to the container. Any keywords that already exist in the container are replaced with the new one.
| keys | Pvl class containing the keywords to add |
Definition at line 184 of file MdisEdrKeys.h.
| std::string extract | ( | const std::vector< std::string > & | keylist, | |
| const std::string & | NAstr, | |||
| PvlGroup * | group = 0 | |||
| ) | [inline] |
Return a formatted list of keyword values.
This method takes in a list of named keywords and formats them according to PDS standards in a comma delineated string. This is the defined format of the team for its population of PDS EDR label keywords.
If any one of the keywords is not found, an exception is thrown.
| keylist | List of keywords to extract | |
| NAstr | String used to specify no value (used mainly so a unit qualifer is not added to the value) |
Definition at line 203 of file MdisEdrKeys.h.