|
Isis 3.0 Application Source Code Reference |
Home |
Support writing of SPK kernels to NAIF SPICE files. More...
#include <SpkKernelWriter.h>
Classes | |
| struct | WriteSpk13 |
| struct | WriteSpk9 |
Public Member Functions | |
| SpkKernelWriter () | |
| SpkKernelWriter (const int ktype) | |
| virtual | ~SpkKernelWriter () |
| int | Type () const |
| Return the SPK kernel type to write. | |
| void | setType (const int spktype) |
| Set the kernel type to write. | |
Protected Member Functions | |
| int | k_open (const QString &kfile, const int &comsize=512) |
| These virtual methods must be provided by the K class. | |
| QString | k_header () const |
| Provide general comments for an SPK kernel header. | |
| void | k_write (const SpiceInt &handle, const SpkKernel &kernels) |
| void | k_close (SpiceInt &handle) |
Support writing of SPK kernels to NAIF SPICE files.
This class is designed to support the fundamentals of opening/creating a NAIF SPK kernel file for writing of SPK segments. There are currently up to 5 different types of SPK kernels that NAIF supports in its toolkit. We are mainly concerned with creation of type 9 and 13 SPK kernels.
As such, this object provides the ability to create general SPK files, specify comment section size, get the I/O handle associated with the output file, write comments to the kernel and then close the file when you are done.
The thing you may see as missing is the write method. Due to the structure of the NAIF SPK writing procedure, each SPK type has its own routine that has different arguments. This makes it "messy" to try and support writing of all SPK types directly in this class. It makes more sense, to me anyway, that the environment that contains the data to write can better provide the data required to properly write the SPK segment. See the implementation of SpkSegment which provides this procedure. It will have a method that looks like SpkSegment::write(SpkKernelWriter &writer). This class exposes the handle need to write the segment and the addComment() method to add details in the kernel file regarding the segment being written.
Definition at line 66 of file SpkKernelWriter.h.
| SpkKernelWriter | ( | ) | [inline] |
Definition at line 68 of file SpkKernelWriter.h.
| SpkKernelWriter | ( | const int | ktype | ) | [inline] |
Definition at line 69 of file SpkKernelWriter.h.
| virtual ~SpkKernelWriter | ( | ) | [inline, virtual] |
Definition at line 70 of file SpkKernelWriter.h.
| int Type | ( | ) | const [inline] |
Return the SPK kernel type to write.
Definition at line 73 of file SpkKernelWriter.h.
| void setType | ( | const int | spktype | ) | [inline] |
Set the kernel type to write.
Validation on the type will be performed.
| spktype | Type of NAIF SPK kernel to write |
Definition at line 82 of file SpkKernelWriter.h.
| int k_open | ( | const QString & | kfile, | |
| const int & | comsize = 512 | |||
| ) | [inline, protected, virtual] |
These virtual methods must be provided by the K class.
Implements KernelWriter< SpkKernel >.
Definition at line 93 of file SpkKernelWriter.h.
| QString k_header | ( | ) | const [protected, virtual] |
Provide general comments for an SPK kernel header.
Implements KernelWriter< SpkKernel >.
Definition at line 53 of file SpkKernelWriter.cpp.
Implements KernelWriter< SpkKernel >.
Definition at line 109 of file SpkKernelWriter.h.
| void k_close | ( | SpiceInt & | handle | ) | [inline, protected, virtual] |
Implements KernelWriter< SpkKernel >.
Definition at line 122 of file SpkKernelWriter.h.