Isis 3 Developer Reference
PvlToPvlTranslationManager.h
Go to the documentation of this file.
1 #ifndef PvlToPvlTranslationManager_h
2 #define PvlToPvlTranslationManager_h
3 
25 
26 #include <fstream>
27 #include <string>
28 
29 #include "FileName.h"
30 #include "PvlTokenizer.h"
31 
32 namespace Isis {
33  class Pvl;
34  class PvlContainer;
35  class PvlKeyword;
81  public:
82  PvlToPvlTranslationManager(const QString &transFile);
83 
84  PvlToPvlTranslationManager(std::istream &transStrm);
85 
86  PvlToPvlTranslationManager(Pvl &inputLabel,
87  const QString &transFile);
88 
89  PvlToPvlTranslationManager(Pvl &inputLabel,
90  std::istream &transStrm);
91 
93 
94  // Attempt to translate the requested output name to output value
95  // using the input name and value/default value
96  virtual QString Translate(QString translationGroupName, int findex = 0);
97 
98  // Translate all translation table groups which contain "Auto"
99  void Auto(Pvl &outputLabel);
100  void Auto(Pvl &inputLabel, Pvl &outputLabel);
101 
102  // Return the ith input value associated with a output name
103  virtual const PvlKeyword &InputKeyword(const QString translationGroupName) const;
104 
105  // Return true if the input lable contains the translated group and key names
106  virtual bool InputHasKeyword(const QString translationGroupName);
107 
108  void SetLabel(Pvl &inputLabel);
109 
110  protected:
111  virtual PvlKeyword DoTranslation(const QString translationGroupName);
112  virtual const PvlContainer *GetContainer(const PvlKeyword &inputGroup) const;
113  virtual PvlContainer *CreateContainer(const QString translationGroupName, Pvl &pvl);
114  private:
115  Pvl p_fLabel;
116  };
117 };
118 
119 #endif
virtual PvlContainer * CreateContainer(const QString translationGroupName, Pvl &pvl)
Create the requsted container and any containers above it and return a reference to the container...
Definition: PvlToPvlTranslationManager.cpp:367
Contains more than one keyword-value pair.
Definition: PvlContainer.h:63
virtual ~PvlToPvlTranslationManager()
Destroys the TranslationManager object.
Definition: PvlToPvlTranslationManager.cpp:95
virtual PvlKeyword DoTranslation(const QString translationGroupName)
Translate the requested output name to output values using the input name and values or default value...
Definition: PvlToPvlTranslationManager.cpp:157
Allows applications to translate simple text files.
Definition: PvlToPvlTranslationManager.h:80
virtual bool InputHasKeyword(const QString translationGroupName)
Indicates if the input keyword corresponding to the output name exists in the label.
Definition: PvlToPvlTranslationManager.cpp:297
A single keyword-value pair.
Definition: PvlKeyword.h:98
PvlToPvlTranslationManager(const QString &transFile)
Constructs and initializes a TranslationManager object from given the Pvl translation file...
Definition: PvlToPvlTranslationManager.cpp:46
virtual QString Translate(QString translationGroupName, int findex=0)
Returns a translated value.
Definition: PvlToPvlTranslationManager.cpp:122
Container for cube-like labels.
Definition: Pvl.h:135
virtual const PvlContainer * GetContainer(const PvlKeyword &inputGroup) const
Return a container from the input label according tund.
Definition: PvlToPvlTranslationManager.cpp:318
virtual const PvlKeyword & InputKeyword(const QString translationGroupName) const
Returns the ith input value associated with the output name argument.
Definition: PvlToPvlTranslationManager.cpp:246
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void SetLabel(Pvl &inputLabel)
Definition: PvlToPvlTranslationManager.cpp:99
Allows applications to translate simple text files.
Definition: LabelTranslationManager.h:59
void Auto(Pvl &outputLabel)
Automatically translate all the output names found in the translation table If a output name does not...
Definition: PvlToPvlTranslationManager.cpp:214