|
Isis 3.0 Application Source Code Reference |
Home |
MDIS EDR keyword container class. More...
#include <MdisEdrKeys.h>
Public Member Functions | |
| MdisEdrKeys () | |
| Benign constuctor. | |
| MdisEdrKeys (Pvl &edrlab) | |
| Constuctor adds a Pvl label to the table. | |
| MdisEdrKeys (const QString &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 QString &name="") |
| Adds a keyword to the container directly. | |
| const PvlKeyword & | operator[] (const int index) const |
| Returns the nth keyword in the container. | |
| PvlKeyword & | get (const QString &name) |
| Return the specified keyword by name. | |
| const PvlKeyword & | get (const QString &name) const |
| Returns the specified keyword by name. | |
| void | updateKeys (Pvl &keys) |
| Replaces or adds keywords in a Pvl class. | |
| QString | extract (const QStringList &keylist, const QString &NAstr, PvlGroup *group=0) |
| Return a formatted list of keyword values. | |
MDIS EDR keyword container class.
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 63 of file MdisEdrKeys.h.
| MdisEdrKeys | ( | ) | [inline] |
Benign constuctor.
Definition at line 66 of file MdisEdrKeys.h.
| MdisEdrKeys | ( | Pvl & | edrlab | ) | [inline] |
Constuctor adds a Pvl label to the table.
Definition at line 68 of file MdisEdrKeys.h.
| MdisEdrKeys | ( | const QString & | 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 82 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 97 of file MdisEdrKeys.h.
| virtual ~MdisEdrKeys | ( | ) | [inline, virtual] |
Destroys the object.
Definition at line 103 of file MdisEdrKeys.h.
| int size | ( | ) | const [inline] |
Returns the number of keywords in the container.
Definition at line 110 of file MdisEdrKeys.h.
| void add | ( | const PvlKeyword & | key, | |
| const QString & | 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 123 of file MdisEdrKeys.h.
| const PvlKeyword& operator[] | ( | const int | index | ) | const [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 147 of file MdisEdrKeys.h.
| PvlKeyword& get | ( | const QString & | name | ) | [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 161 of file MdisEdrKeys.h.
| const PvlKeyword& get | ( | const QString & | name | ) | const [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 176 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 189 of file MdisEdrKeys.h.
| QString extract | ( | const QStringList & | keylist, | |
| const QString & | 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 208 of file MdisEdrKeys.h.