|
Isis 3 Programmer Reference
|
9 #include "PvlKeyword.h"
11 template<
typename T>
class QList;
63 inline QString
name()
const {
72 bool isNamed(
const QString &match)
const {
79 inline QString
type()
const {
237 m_formatTemplate = &ref;
240 bool hasFormatTemplate() {
241 return m_formatTemplate != NULL;
245 return m_formatTemplate;
248 PvlFormat *format() {
251 void setFormat(PvlFormat *format) {
258 void setIndent(
int indent) {
262 inline int comments()
const {
265 QString comment(
const int index)
const {
269 void addComment(
const QString &comment) {
273 PvlKeyword &nameKeyword() {
276 const PvlKeyword &nameKeyword()
const {
314 std::ostream &
operator<<(std::ostream &os, PvlContainer &container);
PvlKeyword m_name
This is the name keyword.
QString name() const
Returns the keyword name.
PvlKeyword operator[](const char *name) const
When you use the [] operator with a (char) name, it will call the findKeyword() method.
PvlKeyword & operator[](const char *name)
When you use the [] operator with a (char) name, it will call the findKeyword() method.
void clear()
Clears PvlKeywords.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
const PvlContainer & operator=(const PvlContainer &other)
This is an assignment operator.
A single keyword-value pair.
QList< PvlKeyword >::const_iterator ConstPvlKeywordIterator
The const keyword iterator.
QString m_filename
This contains the filename used to initialize the pvl object.
This is free and unencumbered software released into the public domain.
void setName(const QString &name)
Set the name of the container.
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
int indent() const
Returns the current indent level.
void operator+=(const PvlKeyword &keyword)
When you use the += operator with a PvlKeyword, it will call the addKeyword() method.
void setFormat(PvlFormat *formatter)
Set the PvlFormatter used to format the keyword name and value(s)
PvlContainer(const QString &type)
Constructs a PvlContainer object with a type.
bool cleanDuplicateKeywords()
Removes keywords from the container that have BOTH the same name and value.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
QList< PvlKeyword > m_keywords
This is the vector of PvlKeywords the container is holding.
PvlFormat * format()
Get the current PvlFormat or create one.
void setIndent(int indent)
Sets the indent level when outputted(for formatting)
void validateAllKeywords(PvlContainer &pPvlCont)
Validate All the Keywords in a Container comparing with the Template.
void validateRepeatOption(PvlKeyword &pPvlTmplKwrd, PvlContainer &pPvlCont)
Validate the Repeat Option for a Keyword.
int comments() const
Returns the number of lines of comments associated with this keyword.
PvlKeyword & operator[](const QString &name)
When you use the [] operator with a (string) name, it will call the findKeyword() method.
ConstPvlKeywordIterator begin() const
Return the const beginning iterator.
bool isNamed(const QString &match) const
Returns whether the given string is equal to the container name or not.
void addComment(QString comment)
Add a comment to the PvlKeyword.
InsertMode
Contains both modes: Append or Replace.
QString fileName() const
Returns the filename used to initialise the Pvl object.
QString name() const
Returns the container name.
void setValue(QString value, QString unit="")
Sets new values.
void deleteKeyword(const QString &name)
Remove a specified keyword.
ConstPvlKeywordIterator end() const
Return the const ending iterator.
void operator-=(const QString &name)
When you use the -= operator with a (string) name, it will call the deleteKeyword() method.
QList< PvlKeyword >::iterator PvlKeywordIterator
The keyword iterator.
int keywords() const
Returns the number of keywords contained in the PvlContainer.
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
PvlKeywordIterator end()
Return the ending iterator.
void init()
Sets the filename to blank.
QString comment(const int index) const
Return a comment at the specified index.
Contains more than one keyword-value pair.
static bool stringEqual(const QString &string1, const QString &string2)
Checks to see if two QStrings are equal.
void setFileName(const QString &filename)
Sets the filename to the specified string.
PvlKeywordIterator begin()
Return the beginning iterator.
This is free and unencumbered software released into the public domain.
const PvlKeyword & operator[](const QString &name) const
When you use the [] operator with a (string) name, it will call the findKeyword() method.
QString type() const
Returns the container type.