Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
XmlToPvlTranslationManager.h
Go to the documentation of this file.
1#ifndef XmlToPvlTranslationManager_h
2#define XmlToPvlTranslationManager_h
7
8/* SPDX-License-Identifier: CC0-1.0 */
10
11#include <fstream>
12#include <string>
13
14#include <QDomDocument>
15
16#include "FileName.h"
17
18namespace Isis {
19 class Pvl;
20 class PvlContainer;
21 class PvlKeyword;
115 public:
116 XmlToPvlTranslationManager(const QString &transFile);
117
118 XmlToPvlTranslationManager(std::istream &transStrm);
119
120 XmlToPvlTranslationManager(FileName &inputLabel,
121 const QString &transFile);
122
123 XmlToPvlTranslationManager(FileName &inputLabel,
124 std::istream &transStrm);
125
127
128 // Attempt to translate the requested output name to output value
129 // using the input name and value/default value
130 virtual QString Translate(QString translationGroupName, int findex = 0);
131
132 // Translate all translation table groups which contain "Auto"
134 void Auto(FileName &inputLabel, Pvl &outputLabel);
135
136 void SetLabel(FileName &inputLabel);
137
138 protected:
139 virtual std::vector< std::pair<QString, int> > validKeywords() const;
140 bool checkDependencies(QDomElement element, PvlKeyword dependencies, bool isDebug) const;
141 void parseFile(const FileName &xmlFileName);
142
143 private:
144 QDomDocument m_xmlLabel;
145
146 };
147};
148
149#endif
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
LabelTranslationManager()
Constructs a default LabelTranslationManager.
Definition LabelTranslationManager.cpp:25
virtual std::vector< std::pair< QString, int > > validKeywords() const
Returns a vector of valid keyword names and their sizes.
Definition XmlToPvlTranslationManager.cpp:118
bool checkDependencies(QDomElement element, PvlKeyword dependencies, bool isDebug) const
Checks if a element in the xml label satisfies a list of dependencies.
Definition XmlToPvlTranslationManager.cpp:372
virtual QString Translate(QString translationGroupName, int findex=0)
Returns a translated value.
Definition XmlToPvlTranslationManager.cpp:163
virtual ~XmlToPvlTranslationManager()
Destroys the XmlToPvlTranslationManager object.
Definition XmlToPvlTranslationManager.cpp:98
void Auto(FileName &inputLabel, Pvl &outputLabel)
Automatically translate all the output names flagged with the Auto keyword in the translation table a...
Definition XmlToPvlTranslationManager.cpp:449
XmlToPvlTranslationManager(const QString &transFile)
Constructs and initializes an XmlToPvlTranslationManager object from the given Pvl translation file.
Definition XmlToPvlTranslationManager.cpp:39
void parseFile(const FileName &xmlFileName)
Opens, parses, and internalizes an Xml label file.
Definition XmlToPvlTranslationManager.cpp:464
void SetLabel(FileName &inputLabel)
Reads an Xml label file and internalizes it for translation.
Definition XmlToPvlTranslationManager.cpp:107
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16