74 DbProfile(
const QString &name) : _name(name), _keys() { }
76 const QString &name =
"");
101 return (_keys.
size());
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;
QString operator()(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
Definition: DbProfile.cpp:186
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
int size() const
Reports the number of keywords in this user profile.
Definition: DbProfile.h:100
Contains more than one keyword-value pair.
Definition: PvlContainer.h:63
int count(const QString &key) const
Report number of values in keyword.
Definition: DbProfile.cpp:141
CollectorMap< IString, PvlKeyword, NoCaseStringCompare > KeyList
Definition: DbProfile.h:69
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:528
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
const K & key(int nth) const
Returns the nth key in the collection.
Definition: CollectorMap.h:689
DbProfile()
Definition: DbProfile.h:73
bool exists(const K &key) const
Checks the existance of a particular key in the list.
Definition: CollectorMap.h:567
void add(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
Definition: DbProfile.cpp:96
QString value(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
Definition: DbProfile.cpp:160
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:884
void setName(const QString &name)
Set the name of this profile.
Definition: DbProfile.h:109
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool isValid() const
Reports if this is a valid profile.
Definition: DbProfile.h:91
virtual ~DbProfile()
Destructor ensures everything is cleaned up properly.
Definition: DbProfile.h:81
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:118
void loadkeys(PvlContainer &pvl)
Loads DbProfile keys from the given Pvl construct.
Definition: DbProfile.cpp:198
const KeyList & getKeyList() const
Returns a reference to the key list.
Definition: DbProfile.h:173
QString key(int nth) const
Returns the nth key in the profile.
Definition: DbProfile.h:155