Isis 3 Developer Reference
Isis::SessionLog Class Reference

#include <SessionLog.h>

Inheritance diagram for Isis::SessionLog:
Inheritance graph
Collaboration diagram for Isis::SessionLog:
Collaboration graph

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. More...
 
typedef QList< Isis::PvlGroup >::const_iterator ConstPvlGroupIterator
 
typedef QList< PvlObject >::iterator PvlObjectIterator
 The counter for objects. More...
 
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. More...
 
typedef QList< PvlKeyword >::const_iterator ConstPvlKeywordIterator
 The const keyword iterator. More...
 

Private Member Functions

void read (const QString &file)
 Loads PVL information from a stream. More...
 
void write (const QString &file)
 Opens and writes PVL information to a file and handles the end of line sequence. More...
 
void append (const QString &file)
 Appends PVL information to a file and handles the end of line sequence. More...
 
void setTerminator (const QString &term)
 Sets the terminator used to signify the end of the PVL informationDefaults to "END". More...
 
QString terminator () const
 Returns the terminator used to signify the end of the PVL informationDefaults to "END". More...
 
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. More...
 
int groups () const
 Returns the number of groups contained. More...
 
PvlGroupgroup (const int index)
 Return the group at the specified index. More...
 
const PvlGroupgroup (const int index) const
 Return the group at the specified index. More...
 
PvlGroupIterator beginGroup ()
 Returns the beginning group index. More...
 
ConstPvlGroupIterator beginGroup () const
 Returns the beginning group index. More...
 
PvlGroupIterator endGroup ()
 Returns the ending group index. More...
 
ConstPvlGroupIterator endGroup () const
 Returns the const ending group index. More...
 
PvlGroupIterator findGroup (const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
 Find a group with the specified name, within these indexes. More...
 
ConstPvlGroupIterator findGroup (const QString &name, ConstPvlGroupIterator beg, ConstPvlGroupIterator end) const
 Find a group with the specified name, within these indexes. More...
 
Isis::PvlGroupfindGroup (const QString &name, FindOptions opts=None)
 Finds a group within the current PvlObject. More...
 
const Isis::PvlGroupfindGroup (const QString &name, FindOptions opts=None) const
 Finds a group within the current PvlObject. More...
 
PvlKeywordfindKeyword (const QString &kname, FindOptions opts)
 Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this one. More...
 
PvlKeywordfindKeyword (const QString &name)
 Find a keyword with a specified name. More...
 
const PvlKeywordfindKeyword (const QString &name) const
 Find a keyword with a specified name. More...
 
PvlKeywordIterator findKeyword (const QString &name, PvlKeywordIterator beg, PvlKeywordIterator end)
 Find the index of a keyword, using iterators. More...
 
ConstPvlKeywordIterator findKeyword (const QString &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const
 Find the index of a keyword, using iterators. More...
 
PvlKeywordfindKeyword (const QString &name)
 Find a keyword with a specified name. More...
 
const PvlKeywordfindKeyword (const QString &name) const
 Find a keyword with a specified name. More...
 
PvlKeywordIterator findKeyword (const QString &name, PvlKeywordIterator beg, PvlKeywordIterator end)
 Find the index of a keyword, using iterators. More...
 
ConstPvlKeywordIterator findKeyword (const QString &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const
 Find the index of a keyword, using iterators. More...
 
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. More...
 
bool hasKeyword (const QString &name) const
 Check to see if a keyword exists. More...
 
bool hasKeyword (const QString &name) const
 Check to see if a keyword exists. More...
 
void addGroup (const Isis::PvlGroup &group)
 Add a group to the object. More...
 
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. More...
 
void operator+= (const PvlKeyword &keyword)
 When you use the += operator with a PvlKeyword, it will call the addKeyword() method. More...
 
void deleteGroup (const QString &name)
 Remove a group from the current PvlObject. More...
 
void deleteGroup (const int index)
 Remove a group from the current PvlObject. More...
 
bool hasGroup (const QString &name) const
 Returns a boolean value based on whether the object has the specified group or not. More...
 
int objects () const
 Returns the number of objects. More...
 
PvlObjectobject (const int index)
 Return the object at the specified index. More...
 
const PvlObjectobject (const int index) const
 Return the object at the specified index. More...
 
PvlObjectIterator beginObject ()
 Returns the index of the beginning object. More...
 
ConstPvlObjectIterator beginObject () const
 Returns the const index of the beginning object. More...
 
PvlObjectIterator endObject ()
 Returns the index of the ending object. More...
 
ConstPvlObjectIterator endObject () const
 Returns the const index of the ending object. More...
 
PvlObjectIterator findObject (const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
 Find the index of object with a specified name, between two indexes. More...
 
ConstPvlObjectIterator findObject (const QString &name, ConstPvlObjectIterator beg, ConstPvlObjectIterator end) const
 Find the index of object with a specified name, between two indexes. More...
 
PvlObjectfindObject (const QString &name, FindOptions opts=None)
 Find an object within the current PvlObject. More...
 
const PvlObjectfindObject (const QString &name, FindOptions opts=None) const
 Find an object within the current PvlObject. More...
 
void addObject (const PvlObject &object)
 Add a PvlObject. More...
 
void deleteObject (const QString &name)
 Remove an object from the current PvlObject. More...
 
void deleteObject (const int index)
 Remove an object from the current PvlObject. More...
 
bool hasObject (const QString &name) const
 Returns a boolean value based on whether the object exists in the current PvlObject or not. More...
 
bool operator== (const PvlObject &object) const
 Compares two PvlObjects. More...
 
void clear ()
 Remove everything from the current PvlObject. More...
 
void validateObject (PvlObject &pPvlObj)
 Validate Object. More...
 
void setName (const QString &name)
 Set the name of the container. More...
 
QString name () const
 Returns the container name. More...
 
bool isNamed (const QString &match) const
 Returns whether the given string is equal to the container name or not. More...
 
QString type () const
 Returns the container type. More...
 
int keywords () const
 Returns the number of keywords contained in the PvlContainer. More...
 
void addKeyword (const PvlKeyword &keyword, const InsertMode mode=Append)
 Add a keyword to the container. More...
 
PvlKeywordIterator addKeyword (const PvlKeyword &keyword, PvlKeywordIterator pos)
 Insert a keyword at the specified iterator position. More...
 
PvlKeywordoperator[] (const QString &name)
 When you use the [] operator with a (string) name, it will call the findKeyword() method. More...
 
PvlKeywordoperator[] (const int index)
 Return the PvlKeyword object at the specified index. More...
 
PvlKeywordoperator[] (const char *name)
 When you use the [] operator with a (char) name, it will call the findKeyword() method. More...
 
const PvlKeywordoperator[] (const QString &name) const
 When you use the [] operator with a (string) name, it will call the findKeyword() method. More...
 
const PvlKeywordoperator[] (const int index) const
 Return the PvlKeyword object at the specified index. More...
 
PvlKeyword operator[] (const char *name) const
 When you use the [] operator with a (char) name, it will call the findKeyword() method. More...
 
PvlKeywordIterator begin ()
 Return the beginning iterator. More...
 
ConstPvlKeywordIterator begin () const
 Return the const beginning iterator. More...
 
PvlKeywordIterator end ()
 Return the ending iterator. More...
 
ConstPvlKeywordIterator end () const
 Return the const ending iterator. More...
 
void deleteKeyword (const QString &name)
 Remove a specified keyword. More...
 
void deleteKeyword (const int index)
 Remove the specified keyword. More...
 
bool cleanDuplicateKeywords ()
 Removes keywords from the container that have BOTH the same name and value. More...
 
void operator-= (const QString &name)
 When you use the -= operator with a (string) name, it will call the deleteKeyword() method. More...
 
void operator-= (const PvlKeyword &key)
 When you use the -= operator with a PvlKeyword object, it will call the deleteKeyword() method. More...
 
QString fileName () const
 Returns the filename used to initialise the Pvl object. More...
 
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. More...
 
void validateAllKeywords (PvlContainer &pPvlCont)
 Validate All the Keywords in a Container comparing with the Template. More...
 
void validateRepeatOption (PvlKeyword &pPvlTmplKwrd, PvlContainer &pPvlCont)
 Validate the Repeat Option for a Keyword. More...
 

Private Attributes

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

Friends

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

Detailed Description

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

Member Function Documentation

◆ AddError()

void Isis::SessionLog::AddError ( Isis::Pvl e)

◆ AddResults()

void Isis::SessionLog::AddResults ( Isis::PvlGroup results)

◆ HasLog()

static bool Isis::SessionLog::HasLog ( )
inlinestatic

◆ TerminalOutput()

bool Isis::SessionLog::TerminalOutput ( )
inline

◆ TheLog()

SessionLog & Isis::SessionLog::TheLog ( bool  restart = false)
static

◆ Write()

void Isis::SessionLog::Write ( )

References Isis::Pvl::write().

Friends And Related Function Documentation

◆ operator<<

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

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