USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::PvlFormatPds Class Reference
[Parsing]

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

#include <PvlFormatPds.h>

Inherits Isis::PvlFormat.

List of all members.

Public Member Functions

 PvlFormatPds ()
 PvlFormatPds (const std::string &file)
 PvlFormatPds (Pvl &keymap)
virtual ~PvlFormatPds ()
virtual std::string FormatValue (const PvlKeyword &keyword, int valueIndex=0)
virtual std::string FormatName (const PvlKeyword &keyword)
virtual std::string FormatEnd (const std::string name, const PvlKeyword &keyword)
virtual std::string FormatEOL ()
void Add (const std::string &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.
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.
virtual KeywordType Type (const PvlKeyword &keyword)
virtual int Accuracy (const PvlKeyword &keyword)

Protected Member Functions

virtual std::string AddQuotes (const std::string value)
std::string FormatString (const PvlKeyword &keyword, int num)
std::string FormatInteger (const PvlKeyword &keyword, int num, int bytes)
std::string FormatReal (const PvlKeyword &keyword, int num, int precision)
std::string FormatEnum (const PvlKeyword &keyword, int num)
std::string FormatBinary (const PvlKeyword &keyword, int num, int bytes)
std::string FormatHex (const PvlKeyword &keyword, int num, int bytes)
std::string FormatBool (const PvlKeyword &keyword, int num)
std::string 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.

Protected Attributes

std::string p_keywordMapFile
Pvl p_keywordMap
unsigned int p_charLimit
 Maximum number of characters on a single line of a keyword value.

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

Isis::PvlFormatPds::PvlFormatPds (  ) 
Isis::PvlFormatPds::PvlFormatPds ( const std::string &  file  ) 
Isis::PvlFormatPds::PvlFormatPds ( Pvl keymap  ) 
virtual Isis::PvlFormatPds::~PvlFormatPds (  )  [inline, virtual]

Member Function Documentation

int Isis::PvlFormat::Accuracy ( const PvlKeyword keyword  )  [virtual, inherited]
void Isis::PvlFormat::Add ( Pvl keymap  )  [inherited]
void Isis::PvlFormat::Add ( const std::string &  file  )  [inherited]
std::string Isis::PvlFormatPds::AddQuotes ( const std::string  value  )  [protected, virtual]

Reimplemented from Isis::PvlFormat.

Referenced by FormatString(), and FormatUnknown().

unsigned int Isis::PvlFormat::CharLimit (  )  const [inline, inherited]

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::p_charLimit.

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

std::string Isis::PvlFormatPds::FormatBinary ( const PvlKeyword keyword,
int  num,
int  bytes 
) [protected]
std::string Isis::PvlFormatPds::FormatBool ( const PvlKeyword keyword,
int  num 
) [protected]
std::string Isis::PvlFormatPds::FormatEnd ( const std::string  name,
const PvlKeyword keyword 
) [virtual]

Reimplemented from Isis::PvlFormat.

References left, right, and Isis::iString::UpCase().

std::string Isis::PvlFormatPds::FormatEnum ( const PvlKeyword keyword,
int  num 
) [protected]
virtual std::string Isis::PvlFormatPds::FormatEOL (  )  [inline, virtual]

Reimplemented from Isis::PvlFormat.

std::string Isis::PvlFormatPds::FormatHex ( const PvlKeyword keyword,
int  num,
int  bytes 
) [protected]
std::string Isis::PvlFormatPds::FormatInteger ( const PvlKeyword keyword,
int  num,
int  bytes 
) [protected]
std::string Isis::PvlFormatPds::FormatName ( const PvlKeyword keyword  )  [virtual]
std::string Isis::PvlFormatPds::FormatReal ( const PvlKeyword keyword,
int  num,
int  precision 
) [protected]
std::string Isis::PvlFormatPds::FormatString ( const PvlKeyword keyword,
int  num 
) [protected]
std::string Isis::PvlFormatPds::FormatUnknown ( const PvlKeyword keyword,
int  num 
) [protected]
std::string Isis::PvlFormatPds::FormatValue ( const PvlKeyword keyword,
int  valueIndex = 0 
) [virtual]
bool Isis::PvlFormat::IsSingleUnit ( const PvlKeyword keyword  )  [protected, inherited]

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

Parameters:
keyword The PvlKeyword to be formatted

References Isis::PvlKeyword::Size(), Isis::PvlKeyword::StringEqual(), and Isis::PvlKeyword::Unit().

Referenced by Isis::PvlFormat::FormatValue().

void Isis::PvlFormat::SetCharLimit ( const unsigned int  limit  )  [inline, inherited]

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:
limit The new character limit.

References Isis::PvlFormat::p_charLimit.

KeywordType Isis::PvlFormat::Type ( const PvlKeyword keyword  )  [virtual, inherited]

Member Data Documentation

unsigned int Isis::PvlFormat::p_charLimit [protected, inherited]

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

Referenced by Isis::PvlFormat::CharLimit(), and Isis::PvlFormat::SetCharLimit().

Pvl Isis::PvlFormat::p_keywordMap [protected, inherited]
std::string Isis::PvlFormat::p_keywordMapFile [protected, inherited]

Referenced by Isis::PvlFormat::Add().


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