Isis 3.0 Programmer Reference
Back | Home
PvlTranslationManager.h
Go to the documentation of this file.
1 #ifndef PvlTranslationManager_h
2 #define PvlTranslationManager_h
3 
25 #include <string>
26 #include <fstream>
27 
28 #include "FileName.h"
29 #include "PvlTokenizer.h"
30 #include "PvlTranslationTable.h"
31 
32 namespace Isis {
76  public:
77  PvlTranslationManager(const QString &transFile);
78 
79  PvlTranslationManager(Isis::Pvl &inputLabel,
80  const QString &transFile);
81 
82  PvlTranslationManager(Isis::Pvl &inputLabel,
83  std::istream &transStrm);
84 
87 
88  // Attempt to translate the requested output name to output value
89  // using the input name and value/default value
90  QString Translate(QString nName, int findex = 0);
91 
92  // Translate all translation table groups which contain "Auto"
93  void Auto(Isis::Pvl &outputLabel);
94 
95  // Return the ith input value associated with a output name
96  const PvlKeyword &InputKeyword(const QString nName) const;
97 
98  // Return true if the input lable contains the translated group and key names
99  bool InputHasKeyword(const QString nName);
100 
101  void SetLabel(Isis::Pvl &lab) {
102  p_fLabel = lab;
103  }
104  private:
105 
107 
108  Isis::PvlKeyword DoTranslation(const QString nName);
109  const Isis::PvlContainer *GetContainer(const PvlKeyword &inputGroup) const;
110  Isis::PvlContainer *CreateContainer(const QString nName, Isis::Pvl &pvl);
111  };
112 };
113 
114 #endif
115 
116 
Contains more than one keyword-value pair.
Definition: PvlContainer.h:64
bool InputHasKeyword(const QString nName)
Indicates if the input keyword corresponding to the output name exists in the label.
Allows applications to translate simple text files.
const PvlKeyword & InputKeyword(const QString nName) const
Returns the ith input value assiciated with the output name argument.
A single keyword-value pair.
Definition: PvlKeyword.h:98
QString Translate(QString nName, int findex=0)
Returns a translated value.
Isis::PvlKeyword DoTranslation(const QString nName)
Translate the requested output name to output values using the input name and values or default value...
Container for cube-like labels.
Definition: Pvl.h:135
Internalizes a translation table.
Isis::Pvl p_fLabel
A Pvl object for the input label file.
~PvlTranslationManager()
Destroys the TranslationManager object.

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:25