Isis Developer Reference
LabelTranslationManager.h
Go to the documentation of this file.
1#ifndef LabelTranslationManager_h
2#define LabelTranslationManager_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include <string>
10#include <fstream>
11
12#include "FileName.h"
13#include "PvlTokenizer.h"
14#include "PvlTranslationTable.h"
15
16namespace Isis {
17 class Pvl;
18 class PvlContainer;
19 class PvlKeyword;
44 public:
46
47 LabelTranslationManager(const QString &transFile);
48
49 LabelTranslationManager(std::istream &transStrm);
50
52
53 // Attempt to translate the requested output name to output value
54 // using the input name and value/default value
55 virtual QString Translate(QString translationGroupName, int findex = 0) = 0;
56
57 // Translate all translation table groups which contain "Auto"
58 virtual void Auto(Pvl &outputLabel);
59
60 virtual QStringList parseSpecification(QString specification) const;
61 protected:
62
63 virtual PvlKeyword DoTranslation(const QString translationGroupName);
64 virtual PvlContainer *CreateContainer(const QString translationGroupName, Pvl &pvl);
65 };
66};
67
68#endif
Allows applications to translate simple text files.
Definition LabelTranslationManager.h:43
virtual PvlKeyword DoTranslation(const QString translationGroupName)
Translate the requested output name to output values using the input name and values or default value...
Definition LabelTranslationManager.cpp:144
virtual void Auto(Pvl &outputLabel)
Automatically translate all the output names tagged as Auto in the translation table If a output name...
Definition LabelTranslationManager.cpp:70
virtual QString Translate(QString translationGroupName, int findex=0)=0
LabelTranslationManager()
Constructs a default LabelTranslationManager.
Definition LabelTranslationManager.cpp:25
virtual QStringList parseSpecification(QString specification) const
Parses and validates a dependency specification.
Definition LabelTranslationManager.cpp:172
virtual PvlContainer * CreateContainer(const QString translationGroupName, Pvl &pvl)
Creates all parent PVL containers for an output keyword.
Definition LabelTranslationManager.cpp:100
virtual ~LabelTranslationManager()
Destroys the LabelTranslationManager object.
Definition LabelTranslationManager.cpp:56
Contains more than one keyword-value pair.
Definition PvlContainer.h:49
Container for cube-like labels.
Definition Pvl.h:119
A single keyword-value pair.
Definition PvlKeyword.h:87
Internalizes a translation table.
Definition PvlTranslationTable.h:106
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16