File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
KernelDb.h
Go to the documentation of this file.
1 #ifndef KernelDb_h
2 #define KernelDb_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 
13 #include <iostream>
14 #include <queue>
15 
16 #include <QList>
17 #include <QString>
18 #include <QStringList>
19 
20 #include "iTime.h"//???
21 #include "Kernel.h"
22 #include "Pvl.h"
23 
24 namespace Isis {
25  class FileName;
26  class iTime;
100  class KernelDb {
101 
102  public:
103  // constructor
104  KernelDb(const unsigned int allowedKernelTypes);
105  KernelDb(const QString &dbName, const unsigned int allowedKernelTypes);
106  KernelDb(std::istream &dbStream, const unsigned int allowedKernelTypes);
107 
108  // destructor
109  ~KernelDb();
110 
111  // Members for getting kernels
112  Kernel leapSecond(Pvl &lab);
114  Kernel targetPosition(Pvl &lab);
116  Kernel spacecraftClock(Pvl &lab);
118  Kernel instrument(Pvl &lab);
119  Kernel frame(Pvl &lab);
121  Kernel dem(Pvl &lab);
122 
123  Kernel findLast(const QString &entry, Pvl &lab);
124  QList< std::priority_queue<Kernel> > findAll(const QString &entry,
125  Pvl &lab);
126 
127  void loadSystemDb(const QString &mission, const Pvl &lab);
129 
130  static bool matches(const Pvl &lab, PvlGroup &kernelDbGrp,
131  iTime timeToMatch, int cameraVersion);
132  private:
133  void loadKernelDbFiles(PvlGroup &dataDir,
134  QString directory,
135  const Pvl &lab);
136  void readKernelDbFiles();
137 
138  QStringList files(PvlGroup &grp);
139  QString m_filename;
141  QList<FileName> m_kernelDbFiles;
144  unsigned int m_allowedKernelTypes;
152  Pvl m_kernelData;
155  };
156 };
157 
158 #endif
Isis::PvlKeyword::name
QString name() const
Returns the keyword name.
Definition: PvlKeyword.h:98
FileName.h
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::PvlObject::group
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:452
CameraFactory.h
Isis::KernelDb::targetAttitudeShape
Kernel targetAttitudeShape(Pvl &lab)
This method finds the highest version of all Target Attitude Shape kernels (pck) identified by the da...
Definition: KernelDb.cpp:155
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::KernelDb::KernelDb
KernelDb(const unsigned int allowedKernelTypes)
Constructs a new KernelDb object with a given integer value representing the Kernel::Type enumeration...
Definition: KernelDb.cpp:48
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::iTime
Parse and return pieces of a time string.
Definition: iTime.h:65
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
PvlGroup.h
Isis::PvlObject::groups
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
Isis::FileName::fileExists
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
Isis::KernelDb::instrument
Kernel instrument(Pvl &lab)
This method finds the last Instrument kernel found that matches the (ik) criteria in the database and...
Definition: KernelDb.cpp:259
Isis::PvlObject::hasGroup
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::PvlObject::objects
int objects() const
Returns the number of objects.
Definition: PvlObject.h:219
Isis::KernelDb::targetPosition
Kernel targetPosition(Pvl &lab)
This method finds the highest version of all Target Position kernels (tspk) identified by the databas...
Definition: KernelDb.cpp:176
Isis::KernelDb::~KernelDb
~KernelDb()
Destructs KernelDb object.
Definition: KernelDb.cpp:115
Isis::IString::ToInteger
int ToInteger() const
Returns the object string as an integer.
Definition: IString.cpp:718
Isis::KernelDb::loadSystemDb
void loadSystemDb(const QString &mission, const Pvl &lab)
Loads the appropriate kernel database files with the defined BASE and MISSION info for each type of k...
Definition: KernelDb.cpp:706
Isis::PvlObject::object
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:489
QStringList
Preference.h
Isis::KernelDb::dem
Kernel dem(Pvl &lab)
This method finds the highest version of all Digital Terrain Models (DEMs) found that match the crite...
Definition: KernelDb.cpp:321
IString.h
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::KernelDb::instrumentAddendum
Kernel instrumentAddendum(Pvl &lab)
This method finds the highest version of all Instrument Addendum kernels (iak) identified by the data...
Definition: KernelDb.cpp:300
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Pvl::read
void read(const QString &file)
Loads PVL information from a stream.
Definition: Pvl.cpp:90
Isis::CameraFactory::CameraVersion
static int CameraVersion(Cube &cube)
This looks up the current camera model version from the cube.
Definition: CameraFactory.cpp:161
Isis::PvlContainer::isNamed
bool isNamed(const QString &match) const
Returns whether the given string is equal to the container name or not.
Definition: PvlContainer.h:72
Isis::KernelDb::spacecraftClock
Kernel spacecraftClock(Pvl &lab)
This method finds the highest version of all Spacecraft Clock kernels (sclk) identified by the databa...
Definition: KernelDb.cpp:217
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::KernelDb
KernelDb class.
Definition: KernelDb.h:100
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::PvlKeyword::isNamed
bool isNamed(QString name) const
Determines whether two PvlKeywords have the same name or not.
Definition: PvlKeyword.h:110
Isis::KernelDb::kernelDbFiles
QList< FileName > kernelDbFiles()
Accessor method to retrieve the list of kernel database files that were read in when loadSystemDb() i...
Definition: KernelDb.cpp:860
Isis::PvlObject::hasObject
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
Definition: PvlObject.h:323
Isis::KernelDb::matches
static bool matches(const Pvl &lab, PvlGroup &kernelDbGrp, iTime timeToMatch, int cameraVersion)
This static method determines whether the given cube label matches the given criteria.
Definition: KernelDb.cpp:570
IException.h
KernelDb.h
std
Namespace for the standard library.
Kernel.h
Isis::KernelDb::findLast
Kernel findLast(const QString &entry, Pvl &lab)
Finds the highest priority Kernel object for the given entry based on the allowed Kernel types.
Definition: KernelDb.cpp:338
PvlKeyword.h
Isis::IString::Token
IString Token(const IString &separator)
Returns the first token in the IString.
Definition: IString.cpp:897
Isis::PvlKeyword::size
int size() const
Returns the number of values stored in this keyword.
Definition: PvlKeyword.h:125
Isis::KernelDb::findAll
QList< std::priority_queue< Kernel > > findAll(const QString &entry, Pvl &lab)
Finds all of the Kernel objects for the given entry value based on the allowed Kernel types.
Definition: KernelDb.cpp:365
PvlObject.h
Isis::Kernel
This class stores Kernel information, including Type and kernel file names.
Definition: Kernel.h:36
Isis::PvlContainer::keywords
int keywords() const
Returns the number of keywords contained in the PvlContainer.
Definition: PvlContainer.h:86
Isis::KernelDb::frame
Kernel frame(Pvl &lab)
This method finds the highest version of all Frame kernels (fk) identified by the database and the al...
Definition: KernelDb.cpp:280
iTime.h
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::Preference::Preferences
static Preference & Preferences(bool unitTest=false)
Definition: Preference.cpp:86
Isis::FileName::highestVersion
FileName highestVersion() const
Searches the directory specified in the file name for the highest version of the file name.
Definition: FileName.cpp:313
Isis::KernelDb::spacecraftPosition
Kernel spacecraftPosition(Pvl &lab)
This method finds the highest version of all Spacecraft Position kernels (spk) identified by the data...
Definition: KernelDb.cpp:238
Isis::Kernel::typeEnum
static Type typeEnum(const QString &type)
Converts the given string to a character as follows.
Definition: Kernel.cpp:57
Isis::KernelDb::spacecraftPointing
QList< std::priority_queue< Kernel > > spacecraftPointing(Pvl &lab)
This method finds a list of the highest versions of all Spacecraft Pointing kernels (ck) identified b...
Definition: KernelDb.cpp:197
Isis::KernelDb::leapSecond
Kernel leapSecond(Pvl &lab)
This method finds the top priority of all Leap Second kernels (lsk) identified by the database and th...
Definition: KernelDb.cpp:134
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:11:31