11#include "PvlContainer.h"
16#include <nlohmann/json.hpp>
19template<
typename T>
class QList;
66 PvlObject(
const QString &
name,
const nlohmann::json &jsonobj);
133 return std::find(beg,
end, temp);
144 ConstPvlGroupIterator beg,
145 ConstPvlGroupIterator
end)
const {
147 return std::find(beg,
end, temp);
193 using PvlContainer::operator+=;
280 return std::find(beg,
end, temp);
292 ConstPvlObjectIterator beg,
293 ConstPvlObjectIterator
end)
const {
295 return std::find(beg,
end, temp);
Contains more than one keyword-value pair.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
void clear()
Clears PvlKeywords.
QString fileName() const
Returns the filename used to initialise the Pvl object.
PvlKeywordIterator end()
Return the ending iterator.
QString name() const
Returns the container name.
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
Contains multiple PvlContainers.
A single keyword-value pair.
static bool stringEqual(const QString &string1, const QString &string2)
Checks to see if two QStrings are equal.
Contains Pvl Groups and Pvl Objects.
PvlObjectIterator beginObject()
Returns the index of the beginning object.
ConstPvlGroupIterator findGroup(const QString &name, ConstPvlGroupIterator beg, ConstPvlGroupIterator end) const
Find a group with the specified name, within these indexes.
bool hasKeyword(const QString &kname, FindOptions opts) const
See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within ...
PvlGroupIterator beginGroup()
Returns the beginning group index.
const PvlObject & operator=(const PvlObject &other)
This is an assignment operator.
friend std::istream & operator>>(std::istream &is, PvlObject &result)
This method reads a PvlObject from the input stream.
friend std::ostream & operator<<(std::ostream &os, Isis::PvlObject &object)
Outputs the PvlObject data to a specified output stream.
QList< Isis::PvlGroup >::iterator PvlGroupIterator
The counter for groups.
PvlGroup & group(const int index)
Return the group at the specified index.
ConstPvlGroupIterator beginGroup() const
Returns the beginning group index.
PvlObject()
Creates a blank PvlObject.
QList< PvlGroup > m_groups
A vector of PvlGroups contained in the current PvlObject.
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
int groups() const
Returns the number of groups contained.
void addLogGroup(Isis::PvlGroup &group)
Add a group to the object and report it to the log/terminal.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
void deleteObject(const QString &name)
Remove an object from the current PvlObject.
int objects() const
Returns the number of objects.
QList< PvlObject >::iterator PvlObjectIterator
The counter for objects.
PvlObject & object(const int index)
Return the object at the specified index.
ConstPvlGroupIterator endGroup() const
Returns the const ending group index.
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
void clear()
Remove everything from the current PvlObject.
FindOptions
A collection of options to use when finding.
@ Traverse
Search child objects.
@ None
Search only the current level.
QList< PvlObject > m_objects
A vector of PvlObjects contained in the current PvlObject.
void addObject(const PvlObject &object)
Add a PvlObject.
PvlObjectIterator endObject()
Returns the index of the ending object.
PvlKeyword & findKeyword(const QString &kname, FindOptions opts)
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this...
void validateObject(PvlObject &pPvlObj)
Validate Object.
ConstPvlObjectIterator endObject() const
Returns the const index of the ending object.
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
ConstPvlObjectIterator findObject(const QString &name, ConstPvlObjectIterator beg, ConstPvlObjectIterator end) const
Find the index of object with a specified name, between two indexes.
void deleteGroup(const QString &name)
Remove a group from the current PvlObject.
PvlGroupIterator endGroup()
Returns the ending group index.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
ConstPvlObjectIterator beginObject() const
Returns the const index of the beginning object.
bool operator==(const PvlObject &object) const
Compares two PvlObjects.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.