16#include "PvlKeyword.h"
17#include "PvlContainer.h"
18#include "CollectorMap.h"
19#include "IException.h"
55 typedef CollectorMap<IString, PvlKeyword, NoCaseStringCompare>
KeyList;
62 const QString &name =
"");
120 void add(
const QString &
key,
const QString &
value =
"");
123 int count(
const QString &
key)
const;
141 QString
key(
int nth)
const {
144 QString
value(
const QString &
key,
int nth = 0)
const;
const K & key(int nth) const
Returns the nth key in the collection.
int size() const
Returns the size of the collection.
bool exists(const K &key) const
Checks the existance of a particular key in the list.
A DbProfile is a container for access parameters to a database.
virtual ~DbProfile()
Destructor ensures everything is cleaned up properly.
QString _name
Name of this profile.
void add(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
KeyList _keys
List of keys in profile.
const KeyList & getKeyList() const
Returns a reference to the key list.
int size() const
Reports the number of keywords in this user profile.
void setName(const QString &name)
Set the name of this profile.
QString value(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
bool isValid() const
Reports if this is a valid profile.
QString operator()(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
void remove(const QString &key)
Removes a keyword from the profile.
bool exists(const QString &key) const
Checks for the existance of a keyword.
QString Name() const
Returns the name of this property.
void loadkeys(PvlContainer &pvl)
Loads DbProfile keys from the given Pvl construct.
QString key(int nth) const
Returns the nth key in the profile.
void replace(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
int count(const QString &key) const
Report number of values in keyword.
Contains more than one keyword-value pair.
This is free and unencumbered software released into the public domain.