Isis Developer Reference
|
Formats a Pvl name value pair to Isis standards. More...
#include <PvlFormat.h>
Public Member Functions | |
PvlFormat () | |
PvlFormat (const QString &file) | |
PvlFormat (Pvl &keymap) | |
virtual | ~PvlFormat () |
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 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 () |
virtual KeywordType | type (const PvlKeyword &keyword) |
virtual int | accuracy (const PvlKeyword &keyword) |
Protected Member Functions | |
virtual QString | addQuotes (const QString value) |
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... | |
Formats a Pvl name value pair to Isis standards.
This class is used to format a single PVL keyword-value pair using normal Isis formatting. The class serves as a base class for others to override and implement their own formatting.
This class uses a Pvl or Pvl formatted file to populate its internal data structure. This structure is used to lookup the type of a keyword and/or other information for another Pvl{Object|Group|Keyword}. The format of the file or Pvl is:
Example:
Where NAME is the name of a keyword in the Pvl to be formatted. TYPE is the type of keyword (STRING,BOOL,INTEGER,REAL,OCTAL,HEX,BINARY,ENUM) (see ToKeywordType). PLACES is the number of digits to the right of the decimal place for a keyword of TYPE REAL.
NOTE: The capabilities to use this Pvl are not implemented in this base class. They are provided as a convience for child classes only. This class only implements the normal Isis foramatting, which is not dependent on the type of the keyword. It is dependent on value of the keyword.
Isis::PvlFormat::PvlFormat | ( | ) |
Isis::PvlFormat::PvlFormat | ( | const QString & | file | ) |
Isis::PvlFormat::PvlFormat | ( | Pvl & | keymap | ) |
|
inlinevirtual |
|
virtual |
References Isis::PvlKeyword::name(), Isis::PvlKeyword::size(), and Isis::toInt().
Referenced by Isis::PvlFormatPds::formatValue().
void Isis::PvlFormat::add | ( | const QString & | file | ) |
void Isis::PvlFormat::add | ( | Pvl & | keymap | ) |
|
protectedvirtual |
Reimplemented in Isis::PvlFormatPds.
Referenced by Isis::PvlFormatPds::formatUnknown().
|
inline |
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.
References m_charLimit.
Referenced by Isis::PvlKeyword::writeWithWrap().
|
virtual |
Reimplemented in Isis::PvlFormatPds.
Referenced by Isis::operator<<().
|
inlinevirtual |
Reimplemented in Isis::PvlFormatPds.
Referenced by Isis::Pvl::append(), Isis::operator<<(), Isis::Pvl::write(), and Isis::PvlKeyword::writeWithWrap().
|
virtual |
Reimplemented in Isis::PvlFormatPds.
References Isis::PvlKeyword::name().
Referenced by Isis::operator<<().
|
virtual |
Reimplemented in Isis::PvlFormatPds.
References Isis::PvlKeyword::size(), and Isis::PvlKeyword::unit().
Referenced by Isis::operator<<().
|
protected |
Returns true if the units are the same for all value in the keyword otherwise it returns false.
keyword | The PvlKeyword to be formatted |
References Isis::PvlKeyword::size(), Isis::PvlKeyword::stringEqual(), and Isis::PvlKeyword::unit().
|
inline |
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. |
References m_charLimit.
|
virtual |
References Isis::PvlKeyword::name(), Isis::NoTypeKeyword, and Isis::toKeywordType().
Referenced by Isis::PvlFormatPds::formatValue().
|
protected |
Maximum number of characters on a single line of a keyword value.
Referenced by charLimit(), and setCharLimit().
|
protected |
|
protected |