Isis 3 Programmer Reference
LabelTranslationManager.h
1 #ifndef LabelTranslationManager_h
2 #define LabelTranslationManager_h
3 
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 
16 namespace 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 
51  virtual ~LabelTranslationManager();
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
Isis::LabelTranslationManager::parseSpecification
virtual QStringList parseSpecification(QString specification) const
Parses and validates a dependency specification.
Definition: LabelTranslationManager.cpp:172
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::LabelTranslationManager::DoTranslation
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
Isis::PvlTranslationTable
Internalizes a translation table.
Definition: PvlTranslationTable.h:106
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
QStringList
Isis::LabelTranslationManager::LabelTranslationManager
LabelTranslationManager()
Constructs a default LabelTranslationManager.
Definition: LabelTranslationManager.cpp:25
Isis::LabelTranslationManager::CreateContainer
virtual PvlContainer * CreateContainer(const QString translationGroupName, Pvl &pvl)
Creates all parent PVL containers for an output keyword.
Definition: LabelTranslationManager.cpp:100
Isis::LabelTranslationManager
Allows applications to translate simple text files.
Definition: LabelTranslationManager.h:43
Isis::LabelTranslationManager::Auto
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
Isis::PvlContainer
Contains more than one keyword-value pair.
Definition: PvlContainer.h:49
Isis::LabelTranslationManager::~LabelTranslationManager
virtual ~LabelTranslationManager()
Destroys the LabelTranslationManager object.
Definition: LabelTranslationManager.cpp:56
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16