15#include "PvlKeyword.h"
236 bool exists(
const QString &key)
const;
237 int count(
const QString &key)
const;
238 bool isNull(
const QString &key,
239 const int index = 0)
const;
241 void add(
const QString &key,
242 const QString &value);
246 void append(
const QString &key,
247 const QString &value);
249 bool erase(
const QString &key);
251 QString
get(
const QString &key,
252 const int &index = 0)
const;
253 QString
get(
const QString &key,
254 const QString &defValue,
255 const int &index = 0)
const;
258 QString
operator()(
const QString &name)
const;
File name manipulation and expansion.
This class can be used to define import/export behavior of Pvl structures when used in the PvlFlatMap...
const QStringList & includes() const
Returns the PvlObject/PvlGroup inclusion constraints.
bool isKeyInList(const QString &name) const
Determines if a PvlKeyword is included.
void addInclude(const QString &name)
Adds a PvlObject/PvlGroup inclusion constraint.
void readKeyListFile(const FileName &fname)
Reads PvlKeyword inclusion constraints from a file.
const QStringList & excludes() const
Returns the PvlObject/PvlGroup exclusion constraints.
const QStringList & keyList() const
Returns the PvlKeyword inclusion constraints.
QStringList m_excludes
The names of objects and groups excluded (Excludes keyword)
bool isIncluded(const QString &name) const
Determines if a PvlObject or PvlGroup is included.
void addExclude(const QString &name)
Adds a PvlObject/PvlGroup exclusion constraint.
int excludeSize() const
Returns the number of PvlObjects and PvlGroups to exclude.
QStringList m_includes
The names of objects and groups included (Includes keyword)
int keyListSize() const
Returns the number of PvlKeywords to include.
int includeSize() const
Returns the number of PvlObjects and PvlGroups to include.
static PvlConstraints withExcludes(const QStringList &excludes)
Static method to construct a PvlConstraints object from a list of names for the PvlObjects and PvlGro...
static PvlConstraints withIncludes(const QStringList &includes)
Static method to construct a PvlConstraints object from a list of names for the PvlObjects and PvlGro...
void addKeyToList(const QString &name)
Adds a PvlKeyword inclusion constraint.
virtual ~PvlConstraints()
Destructor.
QStringList m_keylist
The names of keywords to exclusively include (KeyListFile)
PvlConstraints()
Default constructor for an empty PvlConstraints object.
bool isExcluded(const QString &name) const
Determines if a PvlObject or PvlGroup is excluded.
Contains more than one keyword-value pair.
Provides a flat map of PvlKeywords.
void append(const PvlKeyword &key)
Appends the given PvlKeyword's values to the PvlFlatMap.
PvlKeyword keyword(const QString &key) const
Finds a keyword in the PvlFlatMap.
void add(const QString &key, const QString &value)
Adds PvlKeyword with the given name and value to the PvlFlatMap.
QString operator()(const QString &name) const
Gets the first value of a keyword in the PvlFlatMap.
QStringList allValues(const QString &key) const
Gets all the values associated with a keyword in the PvlFlatMap.
int count(const QString &key) const
Returns the number of values associated with a given keyword.
QString get(const QString &key, const int &index=0) const
Gets the value of a keyword in the PvlFlatMap.
int merge(const PvlFlatMap &other)
Adds the keywords from another PvlFlatMap.
bool erase(const QString &key)
Erases a keyword from the PvlFlatMap.
bool exists(const QString &key) const
Determines whether a given keyword exists in the PvlFlatMap.
virtual ~PvlFlatMap()
Destructor.
QMap< QString, PvlKeyword >::const_iterator ConstPvlFlatMapIterator
A const iterator for the underling QMap that PvlFlatMap is built on.
int loadGroups(const PvlObject &object, const PvlConstraints &constraints)
Loads PvlGroups into the PvlFlatMap.
PvlFlatMap()
Default constructor.
bool isNull(const QString &key, const int index=0) const
Determines if the value of a keyword is Null.
static QStringList keywordValues(const PvlKeyword &keyword)
Gets all of a PvlKeyword's values.
int loadKeywords(const PvlContainer &pvl, const PvlConstraints &constraints)
Loads PvlKeywords within a PvlContainer into the PvlFlatMap.
QMap< QString, PvlKeyword >::iterator PvlFlatMapIterator
An iterator for the underlying QMap that PvlFlatMap is built on.
int loadGroup(const PvlGroup &group, const PvlConstraints &constraints)
Loads a PvlGroup into the PvlFlatMap.
int loadObject(const PvlObject &object, const PvlConstraints &constraints)
Loads PvlObjects into the PvlFlatMap.
Contains multiple PvlContainers.
A single keyword-value pair.
Contains Pvl Groups and Pvl Objects.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.