USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::SessionLog Class Reference

#include <SessionLog.h>

Inherits Isis::Pvl.

Public Member Functions

void AddResults (Isis::PvlGroup &results)
void Write ()
void AddError (Isis::Pvl &e)
bool TerminalOutput ()

Static Public Member Functions

static SessionLogTheLog (bool restart=false)
static bool HasLog ()

Private 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.

Private Member Functions

void read (const QString &file)
 Loads PVL information from a stream.
void write (const QString &file)
 Opens and writes PVL information to a file and handles the end of line sequence.
void append (const QString &file)
 Appends PVL information to a file and handles the end of line sequence.
void setTerminator (const QString &term)
 Sets the terminator used to signify the end of the PVL informationDefaults to "END".
QString terminator () const
 Returns the terminator used to signify the end of the PVL informationDefaults to "END".
void setFormatTemplate (Isis::Pvl &temp)
void setFormatTemplate (const QString &filename)
void setFormatTemplate (PvlContainer &ref)
void validatePvl (const Pvl &pPvl, Pvl &pPvlResults)
 Validate a Pvl with the Template Pvl.
int groups () const
 Returns the number of groups contained.
PvlGroupgroup (const int index)
 Return the group at the specified index.
const PvlGroupgroup (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.
Isis::PvlGroupfindGroup (const QString &name, FindOptions opts=None)
 Finds a group within the current PvlObject.
const Isis::PvlGroupfindGroup (const QString &name, FindOptions opts=None) const
 Finds a group within the current PvlObject.
PvlKeywordfindKeyword (const QString &kname, FindOptions opts)
 Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this one.
PvlKeywordfindKeyword (const QString &name)
 Find a keyword with a specified name.
const PvlKeywordfindKeyword (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 &kname, FindOptions opts) const
 See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this one.
bool hasKeyword (const QString &name) const
 Check to see if a keyword exists.
void addGroup (const Isis::PvlGroup &group)
 Add a group to the object.
void operator+= (const Isis::PvlGroup &group)
void operator+= (const Isis::PvlObject &obj)
void operator+= (const PvlKeyword &keyword)
 When you use the += operator with a PvlKeyword, it will call the addKeyword() method.
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.
PvlObjectobject (const int index)
 Return the object at the specified index.
const PvlObjectobject (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.
PvlObjectfindObject (const QString &name, FindOptions opts=None)
 Find an object within the current PvlObject.
const PvlObjectfindObject (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.
void validateObject (PvlObject &pPvlObj)
 Validate Object.
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.
PvlKeywordoperator[] (const QString &name)
 When you use the [] operator with a (string) name, it will call the findKeyword() method.
PvlKeywordoperator[] (const int index)
 Return the PvlKeyword object at the specified index.
PvlKeywordoperator[] (const char *name)
 When you use the [] operator with a (char) name, it will call the findKeyword() method.
const PvlKeywordoperator[] (const QString &name) const
 When you use the [] operator with a (string) name, it will call the findKeyword() method.
const PvlKeywordoperator[] (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.
bool hasFormatTemplate ()
PvlContainerformatTemplate ()
PvlFormatformat ()
void setFormat (PvlFormat *format)
int indent ()
void setIndent (int indent)
int comments () const
QString comment (const int index) const
void addComment (const QString &comment)
PvlKeywordnameKeyword ()
const PvlKeywordnameKeyword () const
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.

Private Attributes

QString m_filename
 This contains the filename used to initialize the pvl object.
PvlKeyword m_name
 This is the name keyword.
QList< PvlKeywordm_keywords
 This is the vector of PvlKeywords the container is holding.
PvlContainerm_formatTemplate

Friends

std::ostream & operator<< (std::ostream &os, Isis::SessionLog &log)

Detailed Description

Author
????-??-?? Unknown

Member Function Documentation

void Isis::SessionLog::AddError ( Isis::Pvl e)
void Isis::SessionLog::AddResults ( Isis::PvlGroup results)
static bool Isis::SessionLog::HasLog ( )
inlinestatic
bool Isis::SessionLog::TerminalOutput ( )
inline
SessionLog & Isis::SessionLog::TheLog ( bool  restart = false)
static
void Isis::SessionLog::Write ( )

References Isis::Pvl::write().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Isis::SessionLog log 
)
friend

The documentation for this class was generated from the following files: