31 #include <QVarLengthArray> 
  133       void setUnits(QString value, QString units);
 
  142         return m_values.size();
 
  144       bool isNull(
const int index = 0) 
const;
 
  148       friend std::ostream &
operator<<(std::ostream &os,
 
  152       operator double()
 const {
 
  156       operator int()
 const {
 
  157         return toInt(
operator[](0));
 
  164       operator QString() 
const;
 
  168       QString 
unit(
const int index = 0) 
const;
 
  177         return (m_comments ? m_comments->size() : 0);
 
  179       QString 
comment(
const int index) 
const;
 
  188         if(!m_name && !key.m_name) 
return true;
 
  189         if(!m_name || !key.m_name) 
return false;
 
  200         return !(*
this == key);
 
  203       bool isEquivalent(QString string1, 
int index = 0) 
const;
 
  239                               const QString &string2);
 
  242       static QString 
readLine(std::istream &is, 
bool insideComment);
 
  245                                    std::vector< QString > &keywordComments,
 
  246                                    QString &keywordName,
 
  247                                    std::vector< std::pair<QString, QString> >
 
  250       static QString 
readValue(QString &keyword, 
bool "eProblem);
 
  251       static QString 
readValue(QString &keyword, 
bool "eProblem,
 
  252                                    const std::vector< std::pair<char, char> > &
 
  261       QString 
reform(
const QString &value) 
const;
 
  262       QString 
toPvl(
const QString &value) 
const;
 
  263       QString 
toIPvl(
const QString &value) 
const;
 
  265                                   const QString &textToWrite,
 
  284       QVarLengthArray<QString, 1> m_values;
 
  287       std::vector<QString> *m_units;
 
  290       std::vector<QString> *m_comments;
 
  294       void writeSpaces(std::ostream &, 
int) 
const;
 
long long int BigInt
Definition: Constants.h:63
 
PvlKeyword & operator+=(QString value)
Adds a value. 
Definition: PvlKeyword.cpp:301
 
int comments() const 
Returns the number of lines of comments associated with this keyword. 
Definition: PvlKeyword.h:176
 
Parse and return elements of a Pvl sequence. 
Definition: PvlSequence.h:64
 
int size() const 
Returns the number of values stored in this keyword. 
Definition: PvlKeyword.h:141
 
void clear()
Clears all values and units for this PvlKeyword object. 
Definition: PvlKeyword.cpp:307
 
const QString & operator[](int index) const 
Gets value for this object at specified index. 
Definition: PvlKeyword.cpp:356
 
bool isNamed(QString name) const 
Determines whether two PvlKeywords have the same name or not. 
Definition: PvlKeyword.h:126
 
std::ostream & writeWithWrap(std::ostream &os, const QString &textToWrite, int startColumn, PvlFormat &format) const 
Wraps output so that length doesn't exceed the character limit. 
Definition: PvlKeyword.cpp:627
 
void setIndent(int indent)
Sets the indent level when outputted(for formatting) 
Definition: PvlKeyword.h:219
 
PvlKeyword()
Constructs a blank PvlKeyword object. 
Definition: PvlKeyword.cpp:38
 
int toInt(const QString &string)
Global function to convert from a string to an integer. 
Definition: IString.cpp:108
 
void setName(QString name)
Sets the keyword name. 
Definition: PvlKeyword.cpp:136
 
static QString readLine(std::istream &is, bool insideComment)
This method reads one line of data from the input stream. 
Definition: PvlKeyword.cpp:1719
 
void validateKeyword(PvlKeyword &pvlKwrd, QString psValueType="", PvlKeyword *pvlKwrdRange=NULL)
Validate Keyword for type and required values. 
Definition: PvlKeyword.cpp:1889
 
void setWidth(int width)
The width of the longest keyword name (for formatting) 
Definition: PvlKeyword.h:210
 
static bool stringEqual(const QString &string1, const QString &string2)
Checks to see if two QStrings are equal. 
Definition: PvlKeyword.cpp:551
 
BigInt toBigInt(const QString &string)
Global function to convert from a string to a "big" integer. 
Definition: IString.cpp:130
 
double toDouble(const QString &string)
Global function to convert from a string to a double. 
Definition: IString.cpp:164
 
QString reform(const QString &value) const 
Checks if the value needs to be converted to PVL or iPVL and returns it in the correct format...
Definition: PvlKeyword.cpp:474
 
QString comment(const int index) const 
Return a comment at the specified index. 
Definition: PvlKeyword.cpp:457
 
int indent() const 
Returns the current indent level. 
Definition: PvlKeyword.h:229
 
void addComments(const std::vector< QString > &comments)
This method adds multiple comments at once by calling AddComments on each element in the vector...
Definition: PvlKeyword.cpp:1118
 
void addComment(QString comment)
Add a comment to the PvlKeyword. 
Definition: PvlKeyword.cpp:392
 
QString toIPvl(const QString &value) const 
Converts a value to iPVL format. 
Definition: PvlKeyword.cpp:498
 
bool isEquivalent(QString string1, int index=0) const 
Checks to see if a value with a specified index is equivalent to another QString. ...
Definition: PvlKeyword.cpp:578
 
PvlFormat * format()
Get the current PvlFormat or create one. 
Definition: PvlKeyword.cpp:912
 
void clearComment()
Clears the current comments. 
Definition: PvlKeyword.cpp:444
 
static QString readValue(QString &keyword, bool "eProblem)
Definition: PvlKeyword.cpp:1562
 
QString name() const 
Returns the keyword name. 
Definition: PvlKeyword.h:114
 
QString toPvl(const QString &value) const 
Converts a value to PVL format. 
Definition: PvlKeyword.cpp:526
 
A single keyword-value pair. 
Definition: PvlKeyword.h:98
 
QString unit(const int index=0) const 
Returns the units of measurement of the element of the array of values for the object at the specifie...
Definition: PvlKeyword.cpp:373
 
int width() const 
Returns the current set longest keyword name. 
Definition: PvlKeyword.h:224
 
friend std::istream & operator>>(std::istream &is, PvlKeyword &result)
Read in a keyword. 
Definition: PvlKeyword.cpp:925
 
static bool readCleanKeyword(QString keyword, std::vector< QString > &keywordComments, QString &keywordName, std::vector< std::pair< QString, QString > > &keywordValues)
This reads a keyword compressed back to 1 line of data (excluding comments, which are included on sep...
Definition: PvlKeyword.cpp:1139
 
void setUnits(QString units)
Sets the unit of measure for all current values if any exist. 
Definition: PvlKeyword.cpp:182
 
friend std::ostream & operator<<(std::ostream &os, const PvlKeyword &keyword)
Write out the keyword. 
Definition: PvlKeyword.cpp:1781
 
bool isNull(const int index=0) const 
Decides whether a value is null or not at a given index. 
Definition: PvlKeyword.cpp:118
 
PvlFormat * m_formatter
Formatter object. 
Definition: PvlKeyword.h:270
 
bool operator!=(const PvlKeyword &key) const 
Returns true of the keyword names do not match. 
Definition: PvlKeyword.h:199
 
~PvlKeyword()
Destructs a PvlKeyword object. 
Definition: PvlKeyword.cpp:80
 
PvlKeyword & operator=(QString value)
Sets new values. 
Definition: PvlKeyword.cpp:247
 
void setValue(QString value, QString unit="")
Sets new values. 
Definition: PvlKeyword.cpp:171
 
bool operator==(const PvlKeyword &key) const 
Returns true of the keyword names match. 
Definition: PvlKeyword.h:187
 
void addCommentWrapped(QString comment)
Automatically wraps and adds long comments to the PvlKeyword. 
Definition: PvlKeyword.cpp:426
 
void setFormat(PvlFormat *formatter)
Set the PvlFormatter used to format the keyword name and value(s) 
Definition: PvlKeyword.cpp:901
 
void addValue(QString value, QString unit="")
Adds a value with units. 
Definition: PvlKeyword.cpp:268