Isis 3 Programmer Reference
|
Formats the value of a PvlKeyword into a PDS complient string. More...
#include <PvlFormatPds.h>
Public Member Functions | |
PvlFormatPds (const QString &file) | |
PvlFormatPds (Pvl &keymap) | |
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... | |
Private Member Functions | |
void | init () |
Clears all PvlFormatPds specific data. More... | |
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.
2006-09-05 Stuart Sides - Original version
2006-12-14 Stuart Sides - Took out the upcaseing of units
2008-09-19 Kris Becker - Put quotes around "N/A", "NULL", "UNK"; ensure units are placed after each element in array instead of one at the end and outside the closing right parenthesis. These changes bring us more in line with PDS compliancy.
2008-09-30 Christopher Austin - added FormatEOL()
2009-09-15 Jeannie Walldren - Fixed bug where code was adding 2 sets of quotes to N/A when formatting value. These changes were made in AddQuotes(), FormatString() and FormatUnknown() methods.
2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable names up to the current Isis 3 coding standards. Fixes #1533.
Definition at line 61 of file PvlFormatPds.h.
|
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.
Definition at line 154 of file PvlFormat.h.
References Isis::PvlFormat::m_charLimit.
Referenced by Isis::PvlKeyword::writeWithWrap().
|
private |
Clears all PvlFormatPds specific data.
Definition at line 74 of file PvlFormatPds.cpp.
|
protectedinherited |
Returns true if the units are the same for all value in the keyword otherwise it returns false.
keyword | The PvlKeyword to be formatted |
Definition at line 323 of file PvlFormat.cpp.
References Isis::PvlKeyword::size(), Isis::PvlKeyword::stringEqual(), and Isis::PvlKeyword::unit().
|
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.
limit | The new character limit. |
Definition at line 143 of file PvlFormat.h.
References Isis::PvlFormat::m_charLimit.
|
protectedinherited |
Maximum number of characters on a single line of a keyword value.
Definition at line 179 of file PvlFormat.h.
Referenced by Isis::PvlFormat::charLimit(), and Isis::PvlFormat::setCharLimit().