Isis 3.0 Application Source Code Reference
Support writing of SPK kernels to NAIF SPICE files. More...
Public Member Functions
|SpkKernelWriter (const int ktype)|
|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.
|int Type||(||)|| const
|void setType||(||const int||spktype||)||
|int k_open||(||const QString &||kfile,|
|const int &|| comsize = |
|QString k_header||(||)|| const
|void k_close||(||SpiceInt &||handle||)||