Isis Developer Reference
PvlFormatPds.h
Go to the documentation of this file.
1#ifndef PvlFormatPds_h
2#define PvlFormatPds_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include <map>
10#include <string>
11
12#include "PvlFormat.h"
13
14namespace Isis {
45 class PvlFormatPds : public PvlFormat {
46
47 public:
48
50 PvlFormatPds(const QString &file);
51 PvlFormatPds(Pvl &keymap);
52 virtual ~PvlFormatPds() {};
53
54 virtual QString formatValue(const PvlKeyword &keyword,
55 int valueIndex = 0);
56 virtual QString formatName(const PvlKeyword &keyword);
57 virtual QString formatEnd(const QString name,
58 const PvlKeyword &keyword);
59 virtual QString formatEOL() {
60 return "\015\012";
61 }
62
63 protected:
64 virtual QString addQuotes(const QString value);
65
66 QString formatString(const PvlKeyword &keyword, int num);
67 QString formatInteger(const PvlKeyword &keyword, int num, int bytes);
68 QString formatReal(const PvlKeyword &keyword, int num, int precision);
69 QString formatEnum(const PvlKeyword &keyword, int num);
70 QString formatBinary(const PvlKeyword &keyword, int num, int bytes);
71 QString formatHex(const PvlKeyword &keyword, int num, int bytes);
72 QString formatBool(const PvlKeyword &keyword, int num);
73 QString formatUnknown(const PvlKeyword &keyword, int num);
74
75 private:
76 void init();
77 };
78};
79
80#endif
81
Formats a Pvl name value pair to Isis standards.
Definition PvlFormat.h:108
Formats the value of a PvlKeyword into a PDS complient string.
Definition PvlFormatPds.h:45
QString formatUnknown(const PvlKeyword &keyword, int num)
Definition PvlFormatPds.cpp:319
virtual QString formatEOL()
Definition PvlFormatPds.h:59
QString formatString(const PvlKeyword &keyword, int num)
Definition PvlFormatPds.cpp:128
QString formatBinary(const PvlKeyword &keyword, int num, int bytes)
Definition PvlFormatPds.cpp:439
virtual QString formatName(const PvlKeyword &keyword)
Definition PvlFormatPds.cpp:628
virtual QString formatEnd(const QString name, const PvlKeyword &keyword)
Definition PvlFormatPds.cpp:641
virtual ~PvlFormatPds()
Definition PvlFormatPds.h:52
QString formatEnum(const PvlKeyword &keyword, int num)
Definition PvlFormatPds.cpp:255
virtual QString addQuotes(const QString value)
Definition PvlFormatPds.cpp:661
QString formatReal(const PvlKeyword &keyword, int num, int precision)
Definition PvlFormatPds.cpp:190
virtual QString formatValue(const PvlKeyword &keyword, int valueIndex=0)
Definition PvlFormatPds.cpp:68
QString formatInteger(const PvlKeyword &keyword, int num, int bytes)
Definition PvlFormatPds.cpp:380
QString formatBool(const PvlKeyword &keyword, int num)
Definition PvlFormatPds.cpp:583
PvlFormatPds()
Definition PvlFormatPds.cpp:28
QString formatHex(const PvlKeyword &keyword, int num, int bytes)
Definition PvlFormatPds.cpp:512
Container for cube-like labels.
Definition Pvl.h:119
A single keyword-value pair.
Definition PvlKeyword.h:87
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16