Isis 3 Developer Reference
Isis::PvlFormatPds Class Reference

Formats the value of a PvlKeyword into a PDS complient string. More...

#include <PvlFormatPds.h>

Inheritance diagram for Isis::PvlFormatPds:
Inheritance graph
Collaboration diagram for Isis::PvlFormatPds:
Collaboration graph

Public Member Functions

 PvlFormatPds ()
 
 PvlFormatPds (const QString &file)
 
 PvlFormatPds (Pvl &keymap)
 
virtual ~PvlFormatPds ()
 
virtual QString formatValue (const PvlKeyword &keyword, int valueIndex=0)
 
virtual QString formatName (const PvlKeyword &keyword)
 
virtual QString formatEnd (const QString name, const PvlKeyword &keyword)
 
virtual QString formatEOL ()
 
void add (const QString &file)
 
void add (Pvl &keymap)
 
void setCharLimit (const unsigned int limit)
 Sets the maximum number of characters in a keyword value that can be printed to a line before it wraps to the next line. More...
 
unsigned int charLimit () const
 Retrieves the maximum number of characters in a keyword value that can be printed to a line before it wraps to the next line. More...
 
virtual KeywordType type (const PvlKeyword &keyword)
 
virtual int accuracy (const PvlKeyword &keyword)
 

Protected Member Functions

virtual QString addQuotes (const QString value)
 
QString formatString (const PvlKeyword &keyword, int num)
 
QString formatInteger (const PvlKeyword &keyword, int num, int bytes)
 
QString formatReal (const PvlKeyword &keyword, int num, int precision)
 
QString formatEnum (const PvlKeyword &keyword, int num)
 
QString formatBinary (const PvlKeyword &keyword, int num, int bytes)
 
QString formatHex (const PvlKeyword &keyword, int num, int bytes)
 
QString formatBool (const PvlKeyword &keyword, int num)
 
QString formatUnknown (const PvlKeyword &keyword, int num)
 
bool isSingleUnit (const PvlKeyword &keyword)
 Returns true if the units are the same for all value in the keyword otherwise it returns false. More...
 

Protected Attributes

QString m_keywordMapFile
 
Pvl m_keywordMap
 
unsigned int m_charLimit
 Maximum number of characters on a single line of a keyword value. More...
 

Detailed Description

Formats the value of a PvlKeyword into a PDS complient string.

This class is used to format a single PVL keyword-value pair. The supported formats are Normal and PDS. The keyword to type mapping is not defined until a Pvl or Pvl formatted file is supplied.

Author
2006-09-05 Stuart Sides

Constructor & Destructor Documentation

◆ PvlFormatPds() [1/3]

Isis::PvlFormatPds::PvlFormatPds ( )

◆ PvlFormatPds() [2/3]

Isis::PvlFormatPds::PvlFormatPds ( const QString &  file)

◆ PvlFormatPds() [3/3]

Isis::PvlFormatPds::PvlFormatPds ( Pvl keymap)

◆ ~PvlFormatPds()

virtual Isis::PvlFormatPds::~PvlFormatPds ( )
inlinevirtual

Member Function Documentation

◆ accuracy()

int Isis::PvlFormat::accuracy ( const PvlKeyword keyword)
virtualinherited

◆ add() [1/2]

◆ add() [2/2]

void Isis::PvlFormat::add ( Pvl keymap)
inherited

◆ addQuotes()

QString Isis::PvlFormatPds::addQuotes ( const QString  value)
protectedvirtual

Reimplemented from Isis::PvlFormat.

Referenced by formatString().

◆ charLimit()

unsigned int Isis::PvlFormat::charLimit ( ) const
inlineinherited

Retrieves the maximum number of characters in a keyword value that can be printed to a line before it wraps to the next line.

By default, the limit is set to 80 characters.

Returns
unsigned int Maximum number of characters.

References Isis::PvlFormat::m_charLimit.

Referenced by Isis::PvlKeyword::writeWithWrap().

◆ formatBinary()

QString Isis::PvlFormatPds::formatBinary ( const PvlKeyword keyword,
int  num,
int  bytes 
)
protected

◆ formatBool()

QString Isis::PvlFormatPds::formatBool ( const PvlKeyword keyword,
int  num 
)
protected

References Isis::PvlKeyword::size().

Referenced by formatValue().

◆ formatEnd()

QString Isis::PvlFormatPds::formatEnd ( const QString  name,
const PvlKeyword keyword 
)
virtual

Reimplemented from Isis::PvlFormat.

◆ formatEnum()

QString Isis::PvlFormatPds::formatEnum ( const PvlKeyword keyword,
int  num 
)
protected

◆ formatEOL()

virtual QString Isis::PvlFormatPds::formatEOL ( )
inlinevirtual

Reimplemented from Isis::PvlFormat.

◆ formatHex()

QString Isis::PvlFormatPds::formatHex ( const PvlKeyword keyword,
int  num,
int  bytes 
)
protected

◆ formatInteger()

QString Isis::PvlFormatPds::formatInteger ( const PvlKeyword keyword,
int  num,
int  bytes 
)
protected

◆ formatName()

QString Isis::PvlFormatPds::formatName ( const PvlKeyword keyword)
virtual

Reimplemented from Isis::PvlFormat.

References Isis::PvlKeyword::name().

◆ formatReal()

QString Isis::PvlFormatPds::formatReal ( const PvlKeyword keyword,
int  num,
int  precision 
)
protected

◆ formatString()

QString Isis::PvlFormatPds::formatString ( const PvlKeyword keyword,
int  num 
)
protected

◆ formatUnknown()

QString Isis::PvlFormatPds::formatUnknown ( const PvlKeyword keyword,
int  num 
)
protected

◆ formatValue()

◆ isSingleUnit()

bool Isis::PvlFormat::isSingleUnit ( const PvlKeyword keyword)
protectedinherited

Returns true if the units are the same for all value in the keyword otherwise it returns false.

Parameters
keywordThe PvlKeyword to be formatted

References Isis::PvlKeyword::size(), Isis::PvlKeyword::stringEqual(), and Isis::PvlKeyword::unit().

◆ setCharLimit()

void Isis::PvlFormat::setCharLimit ( const unsigned int  limit)
inlineinherited

Sets the maximum number of characters in a keyword value that can be printed to a line before it wraps to the next line.

By default, the limit is set to 80 characters.

Parameters
limitThe new character limit.

References Isis::PvlFormat::m_charLimit.

◆ type()

KeywordType Isis::PvlFormat::type ( const PvlKeyword keyword)
virtualinherited

Member Data Documentation

◆ m_charLimit

unsigned int Isis::PvlFormat::m_charLimit
protectedinherited

Maximum number of characters on a single line of a keyword value.

Referenced by Isis::PvlFormat::charLimit(), and Isis::PvlFormat::setCharLimit().

◆ m_keywordMap

Pvl Isis::PvlFormat::m_keywordMap
protectedinherited

◆ m_keywordMapFile

QString Isis::PvlFormat::m_keywordMapFile
protectedinherited

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