17#include "IException.h"
99 Kernels(
const QString &filename);
108 int size()
const {
return (_kernels.size()); }
112 bool Add(
const QString &kfile);
123 int Load(
const QString &ktype);
126 int UnLoad(
const QString &ktype);
155 typedef std::vector<KernelFile> KernelList;
159 typedef std::vector<KernelFile *> KernelFileList;
160 typedef CollectorMap<QString, KernelFileList> TypeList;
162 bool Load(KernelFile &kfile);
163 bool UnLoad(KernelFile &kfile);
166 QString resolveType(
const QString &kfile)
const;
167 QString resolveTypeByExt(
const QString &kfile,
168 const QString &iktype =
"UNKNOWN")
const;
170 bool IsNaifType(
const QString &ktype)
const;
171 KernelFile examine(
const QString &fname,
const bool &manage =
true)
173 int UpdateManagedStatus();
174 std::vector<KernelFile> findKernels(Pvl &pvl,
const QString &kname,
175 const bool &manage =
true);
176 KernelFile *findByName(
const QString &kfile);
177 TypeList categorizeByType()
const;
179 void addKernels(
const KernelList &klist);
180 QString getKernelType(
const QString &kname)
const;
181 void loadKernel(
const QString &ktype =
"");
182 int getCameraVersion(Pvl &pvl)
const;
IO Handler for Isis Cubes.
Definition Cube.h:168
Determine SPICE kernels defined in an ISIS file.
Definition Kernels.h:94
int CameraVersion() const
Returns the ISIS camera model version number.
Definition Kernels.h:142
void InitializeNaifKernelPool()
Initialize the NAIF kernel keeper pool.
Definition Kernels.cpp:334
bool Add(const QString &kfile)
Add a new kernel to the list.
Definition Kernels.cpp:179
void Manage()
Set each kernels management status to managed.
Definition Kernels.cpp:270
int Discover()
Determine which NAIF kernels are currently loaded in the pool.
Definition Kernels.cpp:236
int UpdateLoadStatus()
Determine the load status of all kernels known to this object.
Definition Kernels.cpp:492
void Init(Pvl &pvl)
Determine Spice kernels in an ISIS label.
Definition Kernels.cpp:143
Kernels()
Default Constructor.
Definition Kernels.cpp:33
QStringList getKernelList(const QString &ktype="") const
Provide a list of all the kernels found.
Definition Kernels.cpp:673
void Clear()
Remove all kernel files from internal list.
Definition Kernels.cpp:196
QStringList getLoadedList(const QString &ktypes="") const
Returns list of kernel currently loaded according to status.
Definition Kernels.cpp:721
int Missing() const
Return count of missing kernel files.
Definition Kernels.cpp:121
virtual ~Kernels()
Destructor always unloads the kernels from the pool.
Definition Kernels.h:103
int size() const
Returns the number of kernels found and/or loaded.
Definition Kernels.h:108
bool IsManaged() const
Determine if all kernels are managed by this object.
Definition Kernels.cpp:309
int UnLoad()
Unloads all kernels from the NAIF pool.
Definition Kernels.cpp:426
QStringList getMissingList() const
Returns list of kernels that were not found to exist.
Definition Kernels.cpp:753
int Merge(const Kernels &other)
Merge the contents of another Kernels object.
Definition Kernels.cpp:600
int Load()
Load all kernels in list.
Definition Kernels.cpp:406
QStringList getKernelTypes() const
Return list of types in kernel list.
Definition Kernels.cpp:651
Kernels & operator=(const Kernels &kernels)
Copy constructor for existing Kernels objecr.
Definition Kernels.cpp:77
void UnManage()
Set each kernels' management state to unmanaged.
Definition Kernels.cpp:289
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16