Isis 3.0 Programmer Reference
Back | Home
PvlTranslationTable.h
Go to the documentation of this file.
1 #ifndef PvlTranslationTable_h
2 #define PvlTranslationTable_h
3 
25 #include <iostream>
26 #include <vector>
27 #include <string>
28 
29 #include "FileName.h"
30 #include "Pvl.h"
31 
32 namespace Isis {
126 
127  public:
128  // Constructors
130  PvlTranslationTable(std::istream &istr);
132 
135 
136  // Return the associated input group from the trans table
137  PvlKeyword InputGroup(const QString nName, const int inst = 0) const;
138 
139  // Return the associated input keyword name from the trans table
140  QString InputKeywordName(const QString nName) const;
141 
142  // Return the associated input default value from the trans table
143  QString InputDefault(const QString nName) const;
144 
145  // Translate a single input value associated with a output name to a output value
146  QString Translate(const QString nName, const QString fValue = "") const;
147 
148  // Add more table entries to the translation table data
149  void AddTable(std::istream &transStm);
150  void AddTable(const QString &transFile);
151 
152  protected:
153  Pvl &TranslationTable() {
154  return p_trnsTbl;
155  }
156  const Pvl &TranslationTable() const {
157  return p_trnsTbl;
158  }
159 
160  bool IsAuto(const QString nName);
161  bool IsOptional(const QString nName);
162  PvlKeyword &OutputPosition(const QString nName);
163  QString OutputName(const QString nName);
164 
165  private:
166  Pvl p_trnsTbl;
167  };
168 };
169 
170 #endif
PvlKeyword InputGroup(const QString nName, const int inst=0) const
Returns the input group name from the translation table corresponding to the output name argument...
~PvlTranslationTable()
Destroys the PvlTranslationTable object.
File name manipulation and expansion.
Definition: FileName.h:111
QString Translate(const QString nName, const QString fValue="") const
Translates the output name and input value.
PvlTranslationTable()
Construct an empty PvlTranslationTable.
QString InputDefault(const QString nName) const
Returns the input default value from the translation table corresponding to the output name argument...
void AddTable(std::istream &transStm)
Adds the contents of a translation table to the searchable groups/keys Also performs a verification...
QString InputKeywordName(const QString nName) const
Returns the input keyword name from the translation table corresponding to the output name argument...
A single keyword-value pair.
Definition: PvlKeyword.h:98
Container for cube-like labels.
Definition: Pvl.h:135
Internalizes a translation table.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:27:27