Isis Developer Reference
|
Contains Pvl Groups and Pvl Objects. More...
#include <PvlObject.h>
Public Types | |
enum | FindOptions { None , Traverse } |
A collection of options to use when finding. More... | |
typedef QList< Isis::PvlGroup >::iterator | PvlGroupIterator |
The counter for groups. | |
typedef QList< Isis::PvlGroup >::const_iterator | ConstPvlGroupIterator |
typedef QList< PvlObject >::iterator | PvlObjectIterator |
The counter for objects. | |
typedef QList< PvlObject >::const_iterator | ConstPvlObjectIterator |
enum | InsertMode { Append , Replace } |
Contains both modes: Append or Replace. More... | |
typedef QList< PvlKeyword >::iterator | PvlKeywordIterator |
The keyword iterator. | |
typedef QList< PvlKeyword >::const_iterator | ConstPvlKeywordIterator |
The const keyword iterator. | |
Public Member Functions | |
PvlObject () | |
Creates a blank PvlObject. | |
PvlObject (const QString &name) | |
Creates a PvlObject with a specified name. | |
PvlObject (const PvlObject &other) | |
Copy constructor. | |
PvlObject (const QString &name, const nlohmann::json &jsonobj) | |
Creates a PvlObject with a specified name converted from a json object. | |
int | groups () const |
Returns the number of groups contained. | |
PvlGroup & | group (const int index) |
Return the group at the specified index. | |
const PvlGroup & | group (const int index) const |
Return the group at the specified index. | |
PvlGroupIterator | beginGroup () |
Returns the beginning group index. | |
ConstPvlGroupIterator | beginGroup () const |
Returns the beginning group index. | |
PvlGroupIterator | endGroup () |
Returns the ending group index. | |
ConstPvlGroupIterator | endGroup () const |
Returns the const ending group index. | |
PvlGroupIterator | findGroup (const QString &name, PvlGroupIterator beg, PvlGroupIterator end) |
Find a group with the specified name, within these indexes. | |
ConstPvlGroupIterator | findGroup (const QString &name, ConstPvlGroupIterator beg, ConstPvlGroupIterator end) const |
Find a group with the specified name, within these indexes. | |
PvlKeyword & | findKeyword (const QString &kname, FindOptions opts) |
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this one. | |
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 this one. | |
Isis::PvlGroup & | findGroup (const QString &name, FindOptions opts=None) |
Finds a group within the current PvlObject. | |
const Isis::PvlGroup & | findGroup (const QString &name, FindOptions opts=None) const |
Finds a group within the current PvlObject. | |
void | addGroup (const Isis::PvlGroup &group) |
Add a group to the object. | |
void | addLogGroup (Isis::PvlGroup &group) |
Add a group to the object and report it to the log/terminal. | |
void | operator+= (const Isis::PvlGroup &group) |
void | operator+= (const Isis::PvlObject &obj) |
void | deleteGroup (const QString &name) |
Remove a group from the current PvlObject. | |
void | deleteGroup (const int index) |
Remove a group from the current PvlObject. | |
bool | hasGroup (const QString &name) const |
Returns a boolean value based on whether the object has the specified group or not. | |
int | objects () const |
Returns the number of objects. | |
PvlObject & | object (const int index) |
Return the object at the specified index. | |
const PvlObject & | object (const int index) const |
Return the object at the specified index. | |
PvlObjectIterator | beginObject () |
Returns the index of the beginning object. | |
ConstPvlObjectIterator | beginObject () const |
Returns the const index of the beginning object. | |
PvlObjectIterator | endObject () |
Returns the index of the ending object. | |
ConstPvlObjectIterator | endObject () const |
Returns the const index of the ending object. | |
PvlObjectIterator | findObject (const QString &name, PvlObjectIterator beg, PvlObjectIterator end) |
Find the index of object with a specified name, between two indexes. | |
ConstPvlObjectIterator | findObject (const QString &name, ConstPvlObjectIterator beg, ConstPvlObjectIterator end) const |
Find the index of object with a specified name, between two indexes. | |
PvlObject & | findObject (const QString &name, FindOptions opts=None) |
Find an object within the current PvlObject. | |
const PvlObject & | findObject (const QString &name, FindOptions opts=None) const |
Find an object within the current PvlObject. | |
void | addObject (const PvlObject &object) |
Add a PvlObject. | |
void | deleteObject (const QString &name) |
Remove an object from the current PvlObject. | |
void | deleteObject (const int index) |
Remove an object from 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. | |
bool | operator== (const PvlObject &object) const |
Compares two PvlObjects. | |
void | clear () |
Remove everything from the current PvlObject. | |
const PvlObject & | operator= (const PvlObject &other) |
This is an assignment operator. | |
void | validateObject (PvlObject &pPvlObj) |
Validate Object. | |
PvlKeyword & | findKeyword (const QString &name) |
Find a keyword with a specified name. | |
const PvlKeyword & | findKeyword (const QString &name) const |
Find a keyword with a specified name. | |
PvlKeywordIterator | findKeyword (const QString &name, PvlKeywordIterator beg, PvlKeywordIterator end) |
Find the index of a keyword, using iterators. | |
ConstPvlKeywordIterator | findKeyword (const QString &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const |
Find the index of a keyword, using iterators. | |
bool | hasKeyword (const QString &name) const |
Check to see if a keyword exists. | |
void | operator+= (const PvlKeyword &keyword) |
When you use the += operator with a PvlKeyword, it will call the addKeyword() method. | |
void | setName (const QString &name) |
Set the name of the container. | |
QString | name () const |
Returns the container name. | |
bool | isNamed (const QString &match) const |
Returns whether the given string is equal to the container name or not. | |
QString | type () const |
Returns the container type. | |
int | keywords () const |
Returns the number of keywords contained in the PvlContainer. | |
void | addKeyword (const PvlKeyword &keyword, const InsertMode mode=Append) |
Add a keyword to the container. | |
PvlKeywordIterator | addKeyword (const PvlKeyword &keyword, PvlKeywordIterator pos) |
Insert a keyword at the specified iterator position. | |
PvlKeyword & | operator[] (const QString &name) |
When you use the [] operator with a (string) name, it will call the findKeyword() method. | |
PvlKeyword & | operator[] (const int index) |
Return the PvlKeyword object at the specified index. | |
PvlKeyword & | operator[] (const char *name) |
When you use the [] operator with a (char) name, it will call the findKeyword() method. | |
const PvlKeyword & | operator[] (const QString &name) const |
When you use the [] operator with a (string) name, it will call the findKeyword() method. | |
const PvlKeyword & | operator[] (const int index) const |
Return the PvlKeyword object at the specified index. | |
PvlKeyword | operator[] (const char *name) const |
When you use the [] operator with a (char) name, it will call the findKeyword() method. | |
PvlKeywordIterator | begin () |
Return the beginning iterator. | |
ConstPvlKeywordIterator | begin () const |
Return the const beginning iterator. | |
PvlKeywordIterator | end () |
Return the ending iterator. | |
ConstPvlKeywordIterator | end () const |
Return the const ending iterator. | |
void | deleteKeyword (const QString &name) |
Remove a specified keyword. | |
void | deleteKeyword (const int index) |
Remove the specified keyword. | |
bool | cleanDuplicateKeywords () |
Removes keywords from the container that have BOTH the same name and value. | |
void | operator-= (const QString &name) |
When you use the -= operator with a (string) name, it will call the deleteKeyword() method. | |
void | operator-= (const PvlKeyword &key) |
When you use the -= operator with a PvlKeyword object, it will call the deleteKeyword() method. | |
QString | fileName () const |
Returns the filename used to initialise the Pvl object. | |
void | setFormatTemplate (PvlContainer &ref) |
bool | hasFormatTemplate () |
PvlContainer * | formatTemplate () |
PvlFormat * | format () |
void | setFormat (PvlFormat *format) |
int | indent () |
void | setIndent (int indent) |
int | comments () const |
QString | comment (const int index) const |
void | addComment (const QString &comment) |
PvlKeyword & | nameKeyword () |
const PvlKeyword & | nameKeyword () const |
Protected Member Functions | |
void | init () |
Sets the filename to blank. | |
void | setFileName (const QString &filename) |
Sets the filename to the specified string. | |
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. | |
Protected Attributes | |
QString | m_filename |
This contains the filename used to initialize the pvl object. | |
PvlKeyword | m_name |
This is the name keyword. | |
QList< PvlKeyword > | m_keywords |
This is the vector of PvlKeywords the container is holding. | |
PvlContainer * | m_formatTemplate |
Friends | |
std::ostream & | operator<< (std::ostream &os, Isis::PvlObject &object) |
Outputs the PvlObject data to a specified output stream. | |
std::istream & | operator>> (std::istream &is, PvlObject &result) |
This method reads a PvlObject from the input stream. | |
Contains Pvl Groups and Pvl Objects.
Contains Pvl groups and objects. Organizes text on output to be indented correctly.
typedef QList<Isis::PvlGroup>::const_iterator Isis::PvlObject::ConstPvlGroupIterator |
|
inherited |
The const keyword iterator.
typedef QList<PvlObject>::const_iterator Isis::PvlObject::ConstPvlObjectIterator |
typedef QList<Isis::PvlGroup>::iterator Isis::PvlObject::PvlGroupIterator |
The counter for groups.
|
inherited |
The keyword iterator.
typedef QList<PvlObject>::iterator Isis::PvlObject::PvlObjectIterator |
The counter for objects.
|
inherited |
Isis::PvlObject::PvlObject | ( | ) |
Creates a blank PvlObject.
Isis::PvlObject::PvlObject | ( | const QString & | name | ) |
Isis::PvlObject::PvlObject | ( | const PvlObject & | other | ) |
Copy constructor.
Isis::PvlObject::PvlObject | ( | const QString & | name, |
const nlohmann::json & | jsonobj ) |
Creates a PvlObject with a specified name converted from a json object.
TODO: Needs to be more robust, right now exists in order to convert an Ale ISD NaifKeywords group over to an ISIS compatible version.
name | The name of the PvlObject. |
json | Json object to convert to PVL |
References _FILEINFO_, Isis::PvlKeyword::addJsonValue(), Isis::PvlContainer::addKeyword(), Isis::PvlContainer::name(), Isis::PvlKeyword::setJsonValue(), Isis::PvlKeyword::setName(), and Isis::IException::Unknown.
|
inlineinherited |
References Isis::PvlKeyword::addComment(), Isis::PvlContainer::comment(), and Isis::PvlContainer::m_name.
Referenced by Isis::Table::toBlob().
|
inline |
Add a group to the object.
group | The PvlGroup object to add. |
References group().
Referenced by Isis::SessionLog::AddError(), addLogGroup(), Isis::SessionLog::AddResults(), Isis::ControlNetDiff::addUniqueMeasure(), Isis::NaifStatus::CheckErrors(), Isis::ControlNetDiff::compareGroups(), Isis::TiffImporter::convertProjection(), Isis::Application::History(), operator+=(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Table::Table(), and Isis::IException::toPvl().
|
inherited |
Add a keyword to the container.
Add a keyword to the PvlContainer object.
keyword | The PvlKeyword object to append. |
mode | Using the InsertMode value of Append. |
key | The PvlKeyword object to add. |
mode | The enum InsertMode has two possible values, Append or Replace. Use Append if you just want to add it to the end, Replace if you want to replace it. |
References Isis::PvlContainer::Append, Isis::PvlContainer::findKeyword(), Isis::PvlContainer::hasKeyword(), Isis::PvlContainer::m_keywords, and Isis::PvlKeyword::name().
Referenced by Isis::PvlFormat::add(), Isis::ControlNetDiff::addUniquePoint(), Isis::CameraFactory::Create(), Isis::ControlNetDiff::diff(), Isis::ControlNetDiff::diff(), Isis::PvlContainer::operator+=(), PvlObject(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Projection::SetUpperLeftCorner(), Isis::Spice::storeValue(), and Isis::SubArea::UpdateLabel().
|
inherited |
Insert a keyword at the specified iterator position.
This method provides the capability to insert a keyword at the specified iterator position. The process follows the description of the STL vector definition along with all the caveats (e.g., invalidation of iterators upon insert operations).
This method will not perform any checks for the existance of the keyword. This could lead to multiple instances of the same keyword in the same container. It is up to the caller to manage this issue.
key | Keyword to insert |
pos | Iterator position where to insert the new keyword |
References Isis::PvlContainer::m_keywords.
void Isis::PvlObject::addLogGroup | ( | Isis::PvlGroup & | group | ) |
Add a group to the object and report it to the log/terminal.
group | The PvlGroup object to add. |
References addGroup(), group(), and Isis::Application::Log().
|
inline |
Add a PvlObject.
object | The PvlObject to add. |
References Isis::PvlContainer::fileName().
Referenced by Isis::History::AddEntry(), Isis::ControlNetDiff::addUniquePoint(), Isis::ControlNetDiff::compare(), Isis::Cube::copy(), Isis::Cube::create(), Isis::LabelTranslationManager::CreateContainer(), operator+=(), Isis::Process::SetOutputCube(), Isis::Equalization::setResults(), Isis::ControlNetVersioner::toPvl(), Isis::Blob::Write(), and Isis::Blob::Write().
|
inlineinherited |
Return the beginning iterator.
References Isis::PvlContainer::m_keywords.
Referenced by Isis::PvlContainer::cleanDuplicateKeywords(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::deleteKeyword(), findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), hasKeyword(), and Isis::PvlContainer::hasKeyword().
|
inlineinherited |
Return the const beginning iterator.
References Isis::PvlContainer::m_keywords.
|
inline |
Returns the beginning group index.
Referenced by deleteGroup(), deleteGroup(), findGroup(), findGroup(), and hasGroup().
|
inline |
Returns the beginning group index.
|
inline |
Returns the index of the beginning object.
Referenced by deleteObject(), deleteObject(), findObject(), findObject(), and hasObject().
|
inline |
Returns the const index of the beginning object.
|
inherited |
Removes keywords from the container that have BOTH the same name and value.
References Isis::PvlContainer::begin(), Isis::PvlContainer::end(), and Isis::PvlContainer::m_keywords.
|
inline |
Remove everything from the current PvlObject.
References Isis::PvlContainer::clear().
|
inlineinherited |
References Isis::PvlKeyword::comment(), and Isis::PvlContainer::m_name.
Referenced by Isis::PvlContainer::addComment(), and Isis::Table::toBlob().
|
inlineinherited |
References Isis::PvlKeyword::comments(), and Isis::PvlContainer::m_name.
Referenced by Isis::Table::toBlob().
void Isis::PvlObject::deleteGroup | ( | const int | index | ) |
Remove a group from the current PvlObject.
index | The index of the PvlGroup to remove. |
IException |
References _FILEINFO_, beginGroup(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.
void Isis::PvlObject::deleteGroup | ( | const QString & | name | ) |
Remove a group from the current PvlObject.
name | The name of the PvlGroup to remove. |
IException |
References _FILEINFO_, beginGroup(), endGroup(), findGroup(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.
|
inherited |
Remove the specified keyword.
index | The index of the keyword to remove. |
iException::Pvl | Keyword doesn't exist. |
References _FILEINFO_, Isis::PvlContainer::begin(), Isis::PvlContainer::m_filename, Isis::PvlContainer::m_keywords, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.
|
inherited |
Remove a specified keyword.
name | The name of the keyword to remove. |
iException::Pvl | Keyword doesn't exist. |
References _FILEINFO_, Isis::PvlContainer::begin(), Isis::PvlContainer::end(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::m_filename, Isis::PvlContainer::m_keywords, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.
Referenced by Isis::PvlFormat::add(), IsisAml::CommandLine(), Isis::ControlPointV0001::ControlPointV0001(), Isis::ControlPointV0002::ControlPointV0002(), Isis::ControlPointV0003::ControlPointV0003(), Isis::Blob::Find(), Isis::PvlContainer::operator-=(), Isis::PvlContainer::operator-=(), and Isis::Blob::Write().
void Isis::PvlObject::deleteObject | ( | const int | index | ) |
Remove an object from the current PvlObject.
index | The index of the PvlObject to remove. |
IException |
References _FILEINFO_, beginObject(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.
void Isis::PvlObject::deleteObject | ( | const QString & | name | ) |
Remove an object from the current PvlObject.
name | The name of the PvlObject to remove. |
IException |
References _FILEINFO_, beginObject(), endObject(), findObject(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.
Referenced by Isis::Cube::attachSpiceFromIsd(), Isis::Cube::deleteBlob(), and Isis::RemoveHiBlobs().
|
inlineinherited |
Return the ending iterator.
References Isis::PvlContainer::m_keywords.
Referenced by Isis::PvlContainer::cleanDuplicateKeywords(), Isis::PvlContainer::deleteKeyword(), findGroup(), findGroup(), findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), findObject(), findObject(), hasKeyword(), and Isis::PvlContainer::hasKeyword().
|
inlineinherited |
Return the const ending iterator.
References Isis::PvlContainer::m_keywords.
|
inline |
Returns the ending group index.
Referenced by deleteGroup(), findGroup(), findGroup(), and hasGroup().
|
inline |
Returns the const ending group index.
|
inline |
Returns the index of the ending object.
Referenced by deleteObject(), findObject(), findObject(), and hasObject().
|
inline |
Returns the const index of the ending object.
|
inlineinherited |
Returns the filename used to initialise the Pvl object.
If the object was not initialized using a file, this string is empty.
References Isis::PvlContainer::m_filename.
Referenced by addObject(), Isis::ObservationNumber::Compose(), Isis::SerialNumber::Compose(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateFromCube(), Isis::PvlTranslationTable::findTranslationGroup(), Isis::PvlToPvlTranslationManager::InputKeyword(), Isis::PvlToXmlTranslationManager::InputKeyword(), Isis::PvlTranslationTable::OutputPosition(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProjectionFactory::RingsCreateFromCube(), and Isis::PvlTranslationTable::Translate().
|
inline |
Find a group with the specified name, within these indexes.
name | The name of the group to look for. |
beg | The lower index |
end | The higher index |
References Isis::PvlContainer::end(), and Isis::PvlContainer::name().
Isis::PvlGroup & Isis::PvlObject::findGroup | ( | const QString & | name, |
PvlObject::FindOptions | opts = None ) |
Finds a group within the current PvlObject.
name | The name of the group to look for. |
opts | The FindOptions option (None or Traverse). |
IException |
References _FILEINFO_, beginGroup(), endGroup(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Traverse, and Isis::IException::Unknown.
const Isis::PvlGroup & Isis::PvlObject::findGroup | ( | const QString & | name, |
PvlObject::FindOptions | opts = None ) const |
Finds a group within the current PvlObject.
name | The name of the group to look for. |
opts | The FindOptions option (None or Traverse). |
IException |
References _FILEINFO_, beginGroup(), endGroup(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Traverse, and Isis::IException::Unknown.
|
inline |
Find a group with the specified name, within these indexes.
name | The name of the group to look for. |
beg | The lower index |
end | The higher index |
References Isis::PvlContainer::end(), and Isis::PvlContainer::name().
Referenced by Isis::ApolloMetricCamera::ApolloMetricCamera(), Isis::ApolloPanoramicCamera::ApolloPanoramicCamera(), Isis::Camera::Camera(), Isis::ProjectionFactory::Create(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateFromCube(), deleteGroup(), Isis::DemShape::DemShape(), Isis::PvlToPvlTranslationManager::DoTranslation(), Isis::Equirectangular::Equirectangular(), Isis::KernelDb::findAll(), Isis::PvlTranslationTable::findTranslationGroup(), Isis::MosaicSceneWidget::fromPvl(), Isis::Plugin::GetPlugin(), hasGroup(), Isis::IdealCamera::IdealCamera(), Isis::LambertConformal::LambertConformal(), Isis::LunarAzimuthalEqualArea::LunarAzimuthalEqualArea(), Isis::KernelDb::matches(), Isis::Mercator::Mercator(), Isis::Mollweide::Mollweide(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::Orthographic::Orthographic(), Isis::GridPolygonSeeder::Parse(), Isis::LimitPolygonSeeder::Parse(), Isis::PolygonSeeder::Parse(), Isis::StripPolygonSeeder::Parse(), Isis::Planar::Planar(), Isis::PointPerspective::PointPerspective(), Isis::PolarStereographic::PolarStereographic(), Isis::Projection::Projection(), Isis::AutoReg::RegTemplate(), Isis::RingCylindrical::RingCylindrical(), Isis::ProjectionFactory::RingsCreate(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProjectionFactory::RingsCreateFromCube(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::Robinson::Robinson(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ControlNet::SetTarget(), Isis::SimpleCylindrical::SimpleCylindrical(), Isis::Sinusoidal::Sinusoidal(), Isis::Target::Target(), and Isis::TransverseMercator::TransverseMercator().
PvlKeyword & Isis::PvlObject::findKeyword | ( | const QString & | kname, |
FindOptions | opts ) |
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this one.
Note: This member has the same name as the PvlContainer and hides those implementations, but with the using statement the parents FindKeyword members ar made visible. Note: If more than one occurance of a Keyword appears below this Object no guarantee is made as to which one is returned.
kname | The name of the keyword to look for. |
opts | The FindOptions option (None or Traverse). |
IException |
References _FILEINFO_, Isis::PvlContainer::begin(), Isis::PvlContainer::end(), findKeyword(), group(), Isis::PvlContainer::m_filename, None, and Isis::IException::Unknown.
Referenced by Isis::PvlFormat::accuracy(), Isis::ControlNetDiff::compare(), Isis::CSMCamera::CSMCamera(), findKeyword(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), Isis::Spice::readStoredValue(), Isis::Spice::storeValue(), and Isis::PvlFormat::type().
Isis::PvlKeyword & Isis::PvlContainer::findKeyword | ( | const QString & | name | ) |
Find a keyword with a specified name.
name | The name of the keyword to look for. |
iException::Pvl | The keyword doesn't exist. |
const Isis::PvlKeyword & Isis::PvlContainer::findKeyword | ( | const QString & | name | ) | const |
Find a keyword with a specified name.
name | The name of the keyword to look for. |
IException | The keyword doesn't exist. |
PvlContainer::ConstPvlKeywordIterator Isis::PvlContainer::findKeyword | ( | const QString & | name, |
PvlContainer::ConstPvlKeywordIterator | beg, | ||
PvlContainer::ConstPvlKeywordIterator | end ) const |
Find the index of a keyword, using iterators.
name | The name of the keyword. |
beg | The beginning iterator. |
end | The ending iterator. |
PvlContainer::PvlKeywordIterator Isis::PvlContainer::findKeyword | ( | const QString & | name, |
PvlContainer::PvlKeywordIterator | beg, | ||
PvlContainer::PvlKeywordIterator | end ) |
Find the index of a keyword, using iterators.
name | The name of the keyword. |
beg | The beginning iterator. |
end | The ending iterator. |
|
inline |
Find the index of object with a specified name, between two indexes.
name | The name of the object to find. |
beg | The lower index. |
end | The higher index. |
References Isis::PvlContainer::end(), and Isis::PvlContainer::name().
PvlObject & Isis::PvlObject::findObject | ( | const QString & | name, |
PvlObject::FindOptions | opts = None ) |
Find an object within the current PvlObject.
name | The object name to look for. |
opts | The FindOptions option (None or Traverse). |
IException |
References _FILEINFO_, beginObject(), endObject(), findObject(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Traverse, and Isis::IException::Unknown.
const PvlObject & Isis::PvlObject::findObject | ( | const QString & | name, |
FindOptions | opts = None ) const |
Find an object within the current PvlObject.
name | The object name to look for. |
opts | The FindOptions option (None or Traverse). |
IException |
References _FILEINFO_, beginObject(), endObject(), findObject(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Traverse, and Isis::IException::Unknown.
|
inline |
Find the index of object with a specified name, between two indexes.
name | The name of the object to find. |
beg | The lower index. |
end | The higher index. |
References Isis::PvlContainer::end(), and Isis::PvlContainer::name().
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::AlphaCube::AlphaCube(), Isis::AutoReg::AutoReg(), Isis::ControlNetDiff::compare(), Isis::Cube::copy(), Isis::CubeIoHandler::CubeIoHandler(), Isis::CubeTileHandler::CubeTileHandler(), Isis::Cube::deleteGroup(), deleteObject(), Isis::Cube::externalCubeFileName(), Isis::ProcessExportPds4::fileAreaObservational(), Isis::KernelDb::findAll(), findObject(), findObject(), Isis::Cube::fromLabel(), Isis::MosaicSceneWidget::fromPvl(), Isis::Equalization::fromPvl(), Isis::CubeViewport::getBandFilterName(), Isis::PvlToPvlTranslationManager::GetContainer(), Isis::PvlToXmlTranslationManager::GetContainer(), Isis::Equalization::getResults(), Isis::Cube::group(), Isis::Cube::hasGroup(), hasObject(), Isis::ImageImporter::import(), Isis::Equalization::importStatistics(), Isis::Cube::isProjected(), Isis::DbAccess::load(), Isis::KernelDb::matches(), Isis::Cube::open(), Isis::AutoReg::Parse(), Isis::ProcessImportPds::ProcessLabel(), Isis::Process::PropagateLabels(), Isis::Cube::putGroup(), Isis::Target::radiiGroup(), Isis::Cube::relocateDnData(), Isis::Process::SetOutputCube(), Isis::ProcessMosaic::SetOutputCube(), Isis::ControlNet::SetTarget(), Isis::ProcessExportPds::StandardAllMapping(), Isis::ProcessExportPds::StandardImageImage(), Isis::ProcessExportPds::StandardJP2Image(), Isis::ControlNetVersioner::toPvl(), Isis::AlphaCube::UpdateGroup(), Isis::SubArea::UpdateLabel(), Isis::CubeTileHandler::updateLabels(), Isis::CubeBsqHandler::updateLabels(), Isis::SpectralPlotTool::updateTool(), validateObject(), and Isis::Pvl::validatePvl().
|
inlineinherited |
|
inlineinherited |
References Isis::PvlContainer::m_formatTemplate.
Isis::PvlGroup & Isis::PvlObject::group | ( | const int | index | ) |
Return the group at the specified index.
index | The index of the group. |
IException |
References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), and Isis::IException::Programmer.
Referenced by addGroup(), addLogGroup(), Isis::LabelTranslationManager::Auto(), Isis::PvlToPvlTranslationManager::Auto(), Isis::PvlToXmlTranslationManager::Auto(), findKeyword(), Isis::Plugin::GetPlugin(), hasKeyword(), Isis::Table::initFromBlob(), operator+=(), Isis::Table::toBlob(), validateObject(), and Isis::Pvl::validatePvl().
const Isis::PvlGroup & Isis::PvlObject::group | ( | const int | index | ) | const |
Return the group at the specified index.
index | The index of the group. |
IException |
References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), and Isis::IException::Programmer.
|
inline |
Returns the number of groups contained.
Referenced by Isis::LabelTranslationManager::Auto(), Isis::PvlToPvlTranslationManager::Auto(), Isis::PvlToXmlTranslationManager::Auto(), Isis::Table::initFromBlob(), Isis::Table::toBlob(), Isis::IException::toString(), validateObject(), and Isis::Pvl::validatePvl().
|
inlineinherited |
References Isis::PvlContainer::m_formatTemplate.
|
inline |
Returns a boolean value based on whether the object has the specified group or not.
name | The name of the group to look for. |
References beginGroup(), endGroup(), findGroup(), and Isis::PvlContainer::name().
Referenced by Isis::KernelDb::findAll(), Isis::PvlTranslationTable::findTranslationGroup(), Isis::AutoReg::RegTemplate(), and Isis::ControlNet::SetTarget().
bool Isis::PvlObject::hasKeyword | ( | const QString & | kname, |
FindOptions | opts ) const |
See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this one.
Note: This member has the same name as the PvlContainer and hides those implementations, but with the using statement the parents FindKeyword members ar made visible.
kname | The name of the keyword to look for. |
opts | The FindOptions option (None or Traverse). |
References Isis::PvlContainer::begin(), Isis::PvlContainer::end(), group(), hasKeyword(), and None.
Referenced by Isis::PvlFormat::accuracy(), Isis::PvlFormat::add(), Isis::Blob::Find(), hasKeyword(), Isis::Table::initFromBlob(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), Isis::SpiceRotation::loadPCFromTable(), Isis::ProcessExportPds::OutputLabel(), Isis::Spice::readStoredValue(), Isis::Spice::storeValue(), and Isis::PvlFormat::type().
bool Isis::PvlContainer::hasKeyword | ( | const QString & | name | ) | const |
Check to see if a keyword exists.
name | The name of the keyword to check for. |
|
inline |
Returns a boolean value based on whether the object exists in the current PvlObject or not.
name | The name of the object to search for. |
References beginObject(), endObject(), findObject(), and Isis::PvlContainer::name().
Referenced by Isis::ProjectionFactory::CreateForCube(), Isis::KernelDb::findAll(), Isis::MosaicSceneWidget::fromPvl(), Isis::ProjectionFactory::RingsCreateForCube(), and Isis::ControlNet::SetTarget().
|
inlineinherited |
References Isis::PvlKeyword::indent(), and Isis::PvlContainer::m_name.
Referenced by Isis::PvlContainer::setIndent().
|
protectedinherited |
Sets the filename to blank.
References Isis::PvlContainer::m_filename, and Isis::PvlContainer::m_formatTemplate.
Referenced by Isis::PvlContainer::PvlContainer(), and Isis::PvlContainer::PvlContainer().
|
inlineinherited |
Returns whether the given string is equal to the container name or not.
match | The string to compare to the name. |
References Isis::PvlContainer::m_name, and Isis::PvlKeyword::stringEqual().
Referenced by Isis::KernelDb::findAll(), Isis::Table::initFromBlob(), and Isis::RemoveHiBlobs().
|
inlineinherited |
Returns the number of keywords contained in the PvlContainer.
References Isis::PvlContainer::m_keywords.
Referenced by Isis::UserInterface::BuildNewCommandLineFromPvl(), Isis::ControlPointV0001::ControlPointV0001(), Isis::ControlPointV0002::ControlPointV0002(), Isis::ControlPointV0003::ControlPointV0003(), Isis::operator<<(), Isis::Table::toBlob(), and Isis::PvlContainer::validateAllKeywords().
|
inlineinherited |
Returns the container name.
References Isis::PvlContainer::m_name.
Referenced by Isis::ControlNetDiff::compare(), Isis::ControlPointV0001::ControlPointV0001(), Isis::ControlPointV0002::ControlPointV0002(), Isis::ControlPointV0003::ControlPointV0003(), Isis::ProcessExportPds4::createUnitMap(), deleteGroup(), deleteGroup(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::deleteKeyword(), deleteObject(), deleteObject(), findGroup(), findGroup(), findGroup(), findGroup(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), findObject(), findObject(), findObject(), findObject(), hasGroup(), Isis::PvlContainer::hasKeyword(), hasObject(), Isis::PvlContainer::operator-=(), Isis::operator<<(), Isis::PvlGroup::operator==(), operator==(), Isis::PvlContainer::operator[](), Isis::PvlContainer::operator[](), Isis::PvlContainer::operator[](), Isis::PvlContainer::operator[](), Isis::Cube::putGroup(), Isis::PvlContainer::PvlContainer(), PvlObject(), Isis::PvlContainer::setName(), Isis::Table::toBlob(), Isis::Cube::write(), and Isis::Blob::Write().
|
inlineinherited |
References Isis::PvlContainer::m_name.
|
inlineinherited |
References Isis::PvlContainer::m_name.
PvlObject & Isis::PvlObject::object | ( | const int | index | ) |
Return the object at the specified index.
index | The index of the object. |
IException::Programmer |
References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), and Isis::IException::Programmer.
Referenced by Isis::Cube::attachSpiceFromIsd(), Isis::ControlNetDiff::compare(), Isis::Cube::copy(), Isis::ProcessExportPds4::createUnitMap(), Isis::Cube::deleteBlob(), Isis::Blob::Find(), Isis::KernelDb::findAll(), Isis::ImageFileListWidget::fromPvl(), Isis::Cube::hasBlob(), Isis::Image::isFootprintable(), Isis::Shape::isFootprintable(), Isis::Process::PropagateTables(), Isis::RemoveHiBlobs(), Isis::History::ReturnHist(), validateObject(), Isis::Pvl::validatePvl(), Isis::Blob::Write(), and Isis::Process::WriteHistory().
const PvlObject & Isis::PvlObject::object | ( | const int | index | ) | const |
Return the object at the specified index.
index | The index of the object. |
IException::Programmer |
References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), and Isis::IException::Programmer.
|
inline |
Returns the number of objects.
Referenced by Isis::Cube::copy(), Isis::Cube::deleteBlob(), Isis::KernelDb::findAll(), Isis::Cube::hasBlob(), Isis::RemoveHiBlobs(), Isis::History::ReturnHist(), validateObject(), and Isis::Pvl::validatePvl().
|
inline |
References addGroup(), and group().
|
inline |
References addObject().
|
inline |
When you use the += operator with a PvlKeyword, it will call the addKeyword() method.
keyword | The PvlKeyword to be added. |
|
inlineinherited |
When you use the -= operator with a PvlKeyword object, it will call the deleteKeyword() method.
key | The PvlKeyword object to remove. |
References Isis::PvlContainer::deleteKeyword(), and Isis::PvlKeyword::name().
|
inlineinherited |
When you use the -= operator with a (string) name, it will call the deleteKeyword() method.
name | The name of the keyword to remove. |
References Isis::PvlContainer::deleteKeyword(), and Isis::PvlContainer::name().
This is an assignment operator.
References Isis::PvlContainer::operator=().
Referenced by Isis::Pvl::operator=().
|
inline |
Compares two PvlObjects.
Returns a boolean value based on the StringEqual() method.
object | The PvlObject to compare. |
References Isis::PvlContainer::name(), and Isis::PvlKeyword::stringEqual().
|
inlineinherited |
When you use the [] operator with a (char) name, it will call the findKeyword() method.
name | The name of the keyword to find. |
References Isis::PvlContainer::name(), and Isis::PvlContainer::operator[]().
|
inlineinherited |
When you use the [] operator with a (char) name, it will call the findKeyword() method.
name | The name of the keyword to find. |
References Isis::PvlContainer::name(), and Isis::PvlContainer::operator[]().
|
inherited |
Return the PvlKeyword object at the specified index.
index | The index to use. |
iException::Message | The index is out of bounds. |
References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::PvlContainer::m_keywords, and Isis::IException::Programmer.
|
inherited |
Return the PvlKeyword object at the specified index.
index | The index to use. |
iException::Message | The index is out of bounds. |
References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::PvlContainer::m_keywords, and Isis::IException::Programmer.
|
inlineinherited |
When you use the [] operator with a (string) name, it will call the findKeyword() method.
name | The name of the keyword to find. |
References Isis::PvlContainer::findKeyword(), and Isis::PvlContainer::name().
Referenced by Isis::PvlContainer::operator[](), and Isis::PvlContainer::operator[]().
|
inlineinherited |
When you use the [] operator with a (string) name, it will call the findKeyword() method.
name | The name of the keyword to find. |
References Isis::PvlContainer::findKeyword(), and Isis::PvlContainer::name().
|
inlineprotectedinherited |
Sets the filename to the specified string.
filename | The new filename to use. |
References Isis::PvlContainer::m_filename.
|
inlineinherited |
References Isis::PvlContainer::format(), Isis::PvlContainer::m_name, and Isis::PvlKeyword::setFormat().
Referenced by Isis::Pvl::append(), Isis::ProcessExportPds::StandardPdsLabel(), and Isis::Pvl::write().
|
inlineinherited |
References Isis::PvlContainer::m_formatTemplate.
Referenced by Isis::Pvl::setFormatTemplate().
|
inlineinherited |
|
inlineinherited |
Set the name of the container.
References Isis::PvlContainer::m_name, Isis::PvlContainer::name(), and Isis::PvlKeyword::setValue().
Referenced by Isis::Blob::Blob(), Isis::fitsToJson(), Isis::ProcessImportPds::ProcessImportPds(), Isis::PvlContainer::PvlContainer(), Isis::MosaicSceneWidget::save(), and Isis::MosaicSceneWidget::toPvl().
|
inlineinherited |
Returns the container type.
References Isis::PvlContainer::m_name, and Isis::PvlKeyword::name().
Referenced by deleteGroup(), deleteGroup(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::deleteKeyword(), deleteObject(), deleteObject(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::PvlContainer(), and Isis::PvlContainer::PvlContainer().
|
protectedinherited |
Validate All the Keywords in a Container comparing with the Template.
Validate all the PvlKeywords in this container.
pPvlCont | - Container to be Validated |
References _FILEINFO_, Isis::PvlContainer::findKeyword(), Isis::PvlContainer::hasKeyword(), Isis::PvlContainer::keywords(), Isis::PvlKeyword::name(), Isis::IException::User, and Isis::PvlContainer::validateRepeatOption().
Referenced by Isis::PvlGroup::validateGroup(), validateObject(), and Isis::Pvl::validatePvl().
void Isis::PvlObject::validateObject | ( | PvlObject & | pPvlObj | ) |
Validate Object.
Validate a PvlObject, comparing against corresponding Template PvlObject.
If the Objects are nested, it will recursively validate the PvlObject.
Template PvlObject has the format: Object = (objectName, optional/required)
pvlObj- | PvlObject to be validated |
References _FILEINFO_, findObject(), group(), groups(), object(), objects(), Isis::IException::User, Isis::PvlContainer::validateAllKeywords(), and Isis::PvlGroup::validateGroup().
|
protectedinherited |
Validate the Repeat Option for a Keyword.
Validate Repeat Option in the Template Group.
This option indicates that a particular keyname can be repeated several times
pPvlTmplKwrd | - Template Keyword wit |
pPvlCont | - Container with all the Keywords |
References Isis::PvlContainer::findKeyword(), Isis::PvlContainer::hasKeyword(), and Isis::PvlKeyword::name().
Referenced by Isis::PvlContainer::validateAllKeywords().
|
friend |
|
friend |
This method reads a PvlObject from the input stream.
|
protectedinherited |
This contains the filename used to initialize the pvl object.
If the object was not initialized using a filename the string is empty.
Referenced by deleteGroup(), deleteGroup(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::deleteKeyword(), deleteObject(), deleteObject(), Isis::PvlContainer::fileName(), findGroup(), findGroup(), findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), findObject(), findObject(), Isis::PvlContainer::init(), Isis::PvlContainer::operator=(), Isis::Pvl::read(), and Isis::PvlContainer::setFileName().
|
protectedinherited |
|
protectedinherited |
This is the vector of PvlKeywords the container is holding.
Referenced by Isis::PvlContainer::addKeyword(), Isis::PvlContainer::addKeyword(), Isis::PvlContainer::begin(), Isis::PvlContainer::begin(), Isis::PvlContainer::cleanDuplicateKeywords(), Isis::PvlContainer::clear(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::end(), Isis::PvlContainer::end(), Isis::PvlContainer::keywords(), Isis::PvlContainer::operator=(), Isis::PvlContainer::operator[](), and Isis::PvlContainer::operator[]().
|
protectedinherited |
This is the name keyword.
Referenced by Isis::PvlContainer::addComment(), Isis::PvlContainer::comment(), Isis::PvlContainer::comments(), Isis::PvlContainer::format(), Isis::PvlContainer::indent(), Isis::PvlContainer::isNamed(), Isis::PvlContainer::name(), Isis::PvlContainer::nameKeyword(), Isis::PvlContainer::nameKeyword(), Isis::PvlContainer::operator=(), Isis::PvlContainer::PvlContainer(), Isis::PvlContainer::PvlContainer(), Isis::PvlContainer::setFormat(), Isis::PvlContainer::setIndent(), Isis::PvlContainer::setName(), and Isis::PvlContainer::type().