74 DbProfile(
const QString &name) : _name(name), _keys() { }
76 const QString &name =
"");
101 return (_keys.
size());
130 return (_keys.
exists(key));
134 void add(
const QString &
key,
const QString &
value =
"");
136 void remove(
const QString &
key);
137 int count(
const QString &
key)
const;
155 QString
key(
int nth)
const {
156 return (_keys.
key(nth).
ToQt());
158 QString
value(
const QString &
key,
int nth = 0)
const;
const K & key(int nth) const
Returns the nth key in the collection.
Definition: CollectorMap.h:683
bool exists(const K &key) const
Checks the existance of a particular key in the list.
Definition: CollectorMap.h:563
Contains more than one keyword-value pair.
Definition: PvlContainer.h:64
QString operator()(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
Definition: DbProfile.cpp:186
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:884
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:118
CollectorMap< IString, PvlKeyword, NoCaseStringCompare > KeyList
Definition: DbProfile.h:69
bool isValid() const
Reports if this is a valid profile.
Definition: DbProfile.h:91
QString value(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
Definition: DbProfile.cpp:160
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:65
void replace(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
Definition: DbProfile.cpp:117
DbProfile(const QString &name)
Definition: DbProfile.h:74
int count(const QString &key) const
Report number of values in keyword.
Definition: DbProfile.cpp:141
DbProfile()
Definition: DbProfile.h:73
const KeyList & getKeyList() const
Returns a reference to the key list.
Definition: DbProfile.h:173
void add(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
Definition: DbProfile.cpp:96
int size() const
Reports the number of keywords in this user profile.
Definition: DbProfile.h:100
void setName(const QString &name)
Set the name of this profile.
Definition: DbProfile.h:109
bool exists(const QString &key) const
Checks for the existance of a keyword.
Definition: DbProfile.h:129
int size() const
Returns the size of the collection.
Definition: CollectorMap.h:524
virtual ~DbProfile()
Destructor ensures everything is cleaned up properly.
Definition: DbProfile.h:81
void loadkeys(PvlContainer &pvl)
Loads DbProfile keys from the given Pvl construct.
Definition: DbProfile.cpp:198
QString key(int nth) const
Returns the nth key in the profile.
Definition: DbProfile.h:155