Isis 3 Programmer Reference
Isis::Kernel Class Reference

This class stores Kernel information, including Type and kernel file names. More...

#include <Kernel.h>

Collaboration diagram for Isis::Kernel:
Collaboration graph

Public Types

enum  Type { Predicted = 1, Nadir = 2, Reconstructed = 4, Smithed = 8 }
 Enumeration for type of kernel. More...
 

Public Member Functions

 Kernel ()
 Constructs a Kernel object with "Unknown" Type. More...
 
 Kernel (Type type, const QStringList &data)
 Constructs a Kernel object with given Type and kernels data. More...
 
 ~Kernel ()
 Destructs Kernel object. More...
 
QStringList kernels ()
 Returns the list of kernel data file names. More...
 
Type type ()
 Returns the stored Kernel::Type. More...
 
void setKernels (QStringList data)
 Sets the kernel data file names to the given list. More...
 
void setType (const Type &type)
 Sets the Kernel type. More...
 
int size ()
 Accessor method to determine the number of kernel files. More...
 
void push_back (const QString &str)
 Adds the string (file name) to the kernel data file list. More...
 
QString & operator[] (const int index)
 Returns the value (file name) in the kernel data list at the given index value. More...
 
QString operator[] (const int index) const
 A constant method that returns the value of the kernel data list at the given index value. More...
 
bool operator< (const Kernel &other) const
 Compares which Kernel object has a higher quality Type, i.e. More...
 

Static Public Member Functions

static Type typeEnum (const QString &type)
 Converts the given string to a character as follows. More...
 
static const char * typeEnum (const Type &type)
 Converts the given Type to a character as follows. More...
 

Private Attributes

QStringList m_kernels
 List of kernel file names. More...
 
Type m_kernelType
 Enumeration value indicating the kernel type. More...
 

Detailed Description

This class stores Kernel information, including Type and kernel file names.

Author
????-??-?? Unknown
History:
2013-02-26 Jeannie Backer - Moved this class from the KernelDb header file into it's own directory. Moved method implementation into a cpp file. Moved the KernelType enumeration from a global "spiceInit" namespace into the Kernel class and renamed it Type. Added accessor and mutator methods. Changed method names to lower camel case and changed member variable prefix to m_ to comply with Isis3 standards. Documented enumeration, methods, member variables. Created unitTest.References #924.

Definition at line 49 of file Kernel.h.

Member Enumeration Documentation

◆ Type

Enumeration for type of kernel.

Enumerator
Predicted 

Predicted Kernels are based on predicted location of the spacecraft.

Nadir 

Nadir Kernels mimic spacecraft pointing.

Reconstructed 

Reconstructed Kernels are supplemented with information on the actual position of targets and/or spacecrafts.

Smithed 

Smithed Kernels are generally reconstructed kernels that have been corrected.

Definition at line 54 of file Kernel.h.

Constructor & Destructor Documentation

◆ Kernel() [1/2]

Isis::Kernel::Kernel ( )

Constructs a Kernel object with "Unknown" Type.

Definition at line 32 of file Kernel.cpp.

◆ Kernel() [2/2]

Isis::Kernel::Kernel ( Type  type,
const QStringList data 
)

Constructs a Kernel object with given Type and kernels data.

Parameters
typeType of kernel to be constructed, see Kernel::Type enumerations
dataVector containing kernel file name(s)

Definition at line 50 of file Kernel.cpp.

◆ ~Kernel()

Isis::Kernel::~Kernel ( )

Destructs Kernel object.

Definition at line 40 of file Kernel.cpp.

Member Function Documentation

◆ kernels()

QStringList Isis::Kernel::kernels ( )

Returns the list of kernel data file names.

Returns
QStringList List of file names for the kernel

Definition at line 106 of file Kernel.cpp.

◆ operator<()

bool Isis::Kernel::operator< ( const Kernel other) const

Compares which Kernel object has a higher quality Type, i.e.

which type has a higher enumeration value.

Parameters
otherThe Kernel whose type value will be compared
Returns
bool Indicates whether the Kernel object to the left of the operator has a larger Type enumeration than the object on the right of the operator.

Definition at line 181 of file Kernel.cpp.

References m_kernelType.

◆ operator[]() [1/2]

QString & Isis::Kernel::operator[] ( const int  index)

Returns the value (file name) in the kernel data list at the given index value.

Parameters
indexThe index value of the kernel data list
Returns
QString The kernel file name stored in the given index

Definition at line 157 of file Kernel.cpp.

◆ operator[]() [2/2]

QString Isis::Kernel::operator[] ( const int  index) const

A constant method that returns the value of the kernel data list at the given index value.

Parameters
indexThe index value of the kernel data list
Returns
QString The kernel data stored in the given index

Definition at line 169 of file Kernel.cpp.

◆ push_back()

void Isis::Kernel::push_back ( const QString &  str)

Adds the string (file name) to the kernel data file list.

Parameters
strString containing kernel file name to be added.

Definition at line 146 of file Kernel.cpp.

◆ setKernels()

void Isis::Kernel::setKernels ( QStringList  data)

Sets the kernel data file names to the given list.

Parameters
dataA list containing kernel data (file names)

Definition at line 122 of file Kernel.cpp.

◆ setType()

void Isis::Kernel::setType ( const Type type)

Sets the Kernel type.

Parameters
typeThe Kernel type enumeration value to be set.

Definition at line 130 of file Kernel.cpp.

◆ size()

int Isis::Kernel::size ( )

Accessor method to determine the number of kernel files.

Returns
const int Number of items in the kernel data list

Definition at line 138 of file Kernel.cpp.

◆ type()

Kernel::Type Isis::Kernel::type ( )

Returns the stored Kernel::Type.

Returns
Type Enumerated kernel type value

Definition at line 114 of file Kernel.cpp.

◆ typeEnum() [1/2]

Kernel::Type Isis::Kernel::typeEnum ( const QString &  type)
static

Converts the given string to a character as follows.

  • "Predicted" = 1
  • "Nadir" = 2
  • "Reconstructed" = 4
  • "Smithed" = 8
  • Anything else = 0
Parameters
typeA QString containing a Kernel Type. These strings are not case dependent (the type maybe written all caps, all lower, camel).
Returns
Type The Kernel type enumeration value

Definition at line 70 of file Kernel.cpp.

Referenced by Isis::KernelDb::findAll().

◆ typeEnum() [2/2]

const char * Isis::Kernel::typeEnum ( const Type type)
static

Converts the given Type to a character as follows.

  • 1 = Predicted
  • 2 = Nadir
  • 4 = Reconstructed
  • 8 = Smithed
  • Anything else = Unknown
Parameters
typeThe Kernel type enumeration value
Returns
const char* A character array corresponding to the passed in Kernel::Type.

Definition at line 93 of file Kernel.cpp.

Member Data Documentation

◆ m_kernels

QStringList Isis::Kernel::m_kernels
private

List of kernel file names.

Definition at line 87 of file Kernel.h.

◆ m_kernelType

Type Isis::Kernel::m_kernelType
private

Enumeration value indicating the kernel type.

Definition at line 88 of file Kernel.h.

Referenced by operator<().


The documentation for this class was generated from the following files: