File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
7 #include "PvlTranslationTable.h"
9 #include "IException.h"
11 #include "LabelTranslationManager.h"
14 #include "PvlContainer.h"
16 #include "PvlKeyword.h"
17 #include "PvlObject.h"
25 LabelTranslationManager::LabelTranslationManager()
109 for(
int c = 0; c < np.
size(); c += 2) {
111 if(np[c].toUpper() ==
"OBJECT") {
119 else if(np[c].toUpper() ==
"GROUP") {
145 PvlKeyword outputKeyword( outputName, Translate(outputName) );
146 return outputKeyword;
177 QStringList typeSplit = specification.split(
"@", QString::SkipEmptyParts);
178 QStringList barSplit = specification.split(
"|", QString::SkipEmptyParts);
180 if (typeSplit.size() == 2) {
181 if (typeSplit[0].toLower() !=
"att" &&
182 typeSplit[0].toLower() !=
"tag" &&
183 typeSplit[0].toLower() !=
"new") {
184 QString msg =
"Dependency type specification [" + typeSplit[0] +
185 "] is invalid. Valid types are [att], [tag] and [new]";
188 parsedSpecification.append(typeSplit[0].toLower());
190 QStringList nameValueSplit = typeSplit[1].split(
"|", QString::SkipEmptyParts);
191 if (nameValueSplit.size() == 2) {
192 parsedSpecification.append(nameValueSplit);
194 else if (nameValueSplit.size() == 1) {
195 parsedSpecification.append(nameValueSplit);
198 QString msg =
"Malformed dependency specification [" + specification +
"].";
202 else if (barSplit.size() == 2) {
203 parsedSpecification = barSplit;
205 else if (barSplit.size() == 1 && typeSplit.size() == 1) {
206 parsedSpecification = barSplit;
209 QString msg =
" [" + specification +
"] has unexpected number of '@' or '|' delimiters";
215 QString msg =
"Malformed dependency specification [" + specification +
"].";
219 return parsedSpecification;
virtual QStringList parseSpecification(QString specification) const
Parses and validates a dependency specification.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
PvlGroup & group(const int index)
Return the group at the specified index.
Contains Pvl Groups and Pvl Objects.
A single keyword-value pair.
virtual PvlKeyword DoTranslation(const QString translationGroupName)
Translate the requested output name to output values using the input name and values or default value...
int groups() const
Returns the number of groups contained.
Internalizes a translation table.
void AddTable(std::istream &transStm)
Adds the contents of a translation table to the searchable groups/keys Also performs a verification,...
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Container for cube-like labels.
void addObject(const PvlObject &object)
Add a PvlObject.
Contains multiple PvlContainers.
LabelTranslationManager()
Constructs a default LabelTranslationManager.
virtual PvlContainer * CreateContainer(const QString translationGroupName, Pvl &pvl)
Creates all parent PVL containers for an output keyword.
PvlKeyword OutputPosition(const QString translationGroupName)
Retrieves the OutputPosition PvlKeyword for the translation group with the given name.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
virtual void Auto(Pvl &outputLabel)
Automatically translate all the output names tagged as Auto in the translation table If a output name...
QString name() const
Returns the container name.
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
bool IsAuto(const QString translationGroupName)
Determines whether the given group should be automatically translated.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Namespace for the standard library.
int size() const
Returns the number of values stored in this keyword.
bool IsOptional(const QString translationGroupName)
Determines whether the translation group is optional.
Contains more than one keyword-value pair.
virtual ~LabelTranslationManager()
Destroys the LabelTranslationManager object.
This is free and unencumbered software released into the public domain.
Pvl & TranslationTable()
Protected accessor for pvl translation table passed into class.