|
Isis Developer Reference
|
Go to the documentation of this file.
60 DbProfile(
const QString &name) : _name(name), _keys() { }
62 const QString &name =
"");
87 return (_keys.
size());
120 void add(
const QString &
key,
const QString &
value =
"");
123 int count(
const QString &
key)
const;
141 QString
key(
int nth)
const {
142 return (_keys.
key(nth).
ToQt());
144 QString
value(
const QString &
key,
int nth = 0)
const;
int size() const
Reports the number of keywords in this user profile.
Definition: DbProfile.h:86
virtual ~DbProfile()
Destructor ensures everything is cleaned up properly.
Definition: DbProfile.h:67
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:104
QString operator()(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
Definition: DbProfile.cpp:172
bool exists(const QString &key) const
Checks for the existance of a keyword.
Definition: DbProfile.h:115
A single keyword-value pair.
Definition: PvlKeyword.h:82
T & getNth(int nth)
Returns the nth value in the collection.
Definition: CollectorMap.h:624
void addValue(QString value, QString unit="")
Adds a value with units.
Definition: PvlKeyword.cpp:252
int count(const QString &key) const
Report number of values in keyword.
Definition: DbProfile.cpp:127
T & get(const K &key)
Returns the value associated with the name provided.
Definition: CollectorMap.h:567
DbProfile(const QString &name)
Definition: DbProfile.h:60
int size() const
Returns the size of the collection.
Definition: CollectorMap.h:512
int remove(const K &key)
Removes and entry from the list.
Definition: CollectorMap.h:694
void replace(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
Definition: DbProfile.cpp:103
void add(const QString &key, const QString &value="")
Adds a keyword and value pair to the profile.
Definition: DbProfile.cpp:82
CollectorMap< IString, PvlKeyword, NoCaseStringCompare > KeyList
Definition: DbProfile.h:55
bool exists(const K &key) const
Checks the existance of a particular key in the list.
Definition: CollectorMap.h:551
const K & key(int nth) const
Returns the nth key in the collection.
Definition: CollectorMap.h:673
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
DbProfile()
Definition: DbProfile.h:59
bool isValid() const
Reports if this is a valid profile.
Definition: DbProfile.h:77
void loadkeys(PvlContainer &pvl)
Loads DbProfile keys from the given Pvl construct.
Definition: DbProfile.cpp:184
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:51
Isis exception class.
Definition: IException.h:91
void add(const K &key, const T &value)
Adds the element to the list.
Definition: CollectorMap.h:540
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Collector/container for arbitrary items.
Definition: CollectorMap.h:419
int size() const
Returns the number of values stored in this keyword.
Definition: PvlKeyword.h:125
QList< PvlKeyword >::iterator PvlKeywordIterator
The keyword iterator.
Definition: PvlContainer.h:157
void remove(const QString &key)
Removes a keyword from the profile.
Definition: DbProfile.cpp:113
PvlKeywordIterator end()
Return the ending iterator.
Definition: PvlContainer.h:194
void setName(const QString &name)
Set the name of this profile.
Definition: DbProfile.h:95
Contains more than one keyword-value pair.
Definition: PvlContainer.h:49
QString value(const QString &key, int nth=0) const
Returns the specified value for the given keyword.
Definition: DbProfile.cpp:146
QString key(int nth) const
Returns the nth key in the profile.
Definition: DbProfile.h:141
const KeyList & getKeyList() const
Returns a reference to the key list.
Definition: DbProfile.h:159
PvlKeywordIterator begin()
Return the beginning iterator.
Definition: PvlContainer.h:178
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:869