Isis 3 Programmer Reference
PvlToPvlTranslationManager.h
1#ifndef PvlToPvlTranslationManager_h
2#define PvlToPvlTranslationManager_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include "LabelTranslationManager.h"
10
11#include <fstream>
12#include <string>
13
14#include "FileName.h"
15#include "PvlTokenizer.h"
16
17namespace Isis {
18 class Pvl;
19 class PvlContainer;
20 class PvlKeyword;
66 public:
67 PvlToPvlTranslationManager(const QString &transFile);
68
69 PvlToPvlTranslationManager(std::istream &transStrm);
70
72 const QString &transFile);
73
75 std::istream &transStrm);
76
78
79 // Attempt to translate the requested output name to output value
80 // using the input name and value/default value
81 virtual QString Translate(QString translationGroupName, int findex = 0);
82
83 // Translate all translation table groups which contain "Auto"
84 void Auto(Pvl &outputLabel);
85 void Auto(Pvl &inputLabel, Pvl &outputLabel);
86
87 // Return the ith input value associated with a output name
88 virtual const PvlKeyword &InputKeyword(const QString translationGroupName) const;
89
90 // Return true if the input lable contains the translated group and key names
91 virtual bool InputHasKeyword(const QString translationGroupName);
92
93 void SetLabel(Pvl &inputLabel);
94
95 protected:
96 virtual PvlKeyword DoTranslation(const QString translationGroupName);
97 virtual const PvlContainer *GetContainer(const PvlKeyword &inputGroup) const;
98 virtual PvlContainer *CreateContainer(const QString translationGroupName, Pvl &pvl);
99 private:
101 };
102};
103
104#endif
Allows applications to translate simple text files.
Contains more than one keyword-value pair.
Container for cube-like labels.
Definition Pvl.h:119
A single keyword-value pair.
Definition PvlKeyword.h:87
Allows applications to translate simple text files.
virtual PvlContainer * CreateContainer(const QString translationGroupName, Pvl &pvl)
Create the requsted container and any containers above it and return a reference to the container.
virtual ~PvlToPvlTranslationManager()
Destroys the TranslationManager object.
virtual PvlKeyword DoTranslation(const QString translationGroupName)
Translate the requested output name to output values using the input name and values or default value...
virtual const PvlKeyword & InputKeyword(const QString translationGroupName) const
Returns the ith input value associated with the output name argument.
Pvl p_fLabel
A Pvl object for the input label file.
virtual const PvlContainer * GetContainer(const PvlKeyword &inputGroup) const
Return a container from the input label according tund.
virtual QString Translate(QString translationGroupName, int findex=0)
Returns a translated value.
virtual bool InputHasKeyword(const QString translationGroupName)
Indicates if the input keyword corresponding to the output name exists in the label.
PvlToPvlTranslationManager(const QString &transFile)
Constructs and initializes a TranslationManager object from given the Pvl translation file.
void Auto(Pvl &outputLabel)
Automatically translate all the output names found in the translation table If a output name does not...
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16