Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > ecbd8c5b7568e331fe6ea5b9a07a78a0 > files > 18

CCfits-docs-2.2-2.fc13.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>CCfits: HDU.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<h1>HDU.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//   Read the documentation to learn more about C++ code generator</span>
<a name="l00002"></a>00002 <span class="comment">//   versioning.</span>
<a name="l00003"></a>00003 <span class="comment">//      This is version 2.2 release dated Sep 2009</span>
<a name="l00004"></a>00004 <span class="comment">//      Astrophysics Science Division,</span>
<a name="l00005"></a>00005 <span class="comment">//      NASA/ Goddard Space Flight Center</span>
<a name="l00006"></a>00006 <span class="comment">//      HEASARC</span>
<a name="l00007"></a>00007 <span class="comment">//      http://heasarc.gsfc.nasa.gov</span>
<a name="l00008"></a>00008 <span class="comment">//      e-mail: ccfits@legacy.gsfc.nasa.gov</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">//      Original author: Ben Dorman</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="preprocessor">#ifndef HDU_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define HDU_H 1</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="comment">// vector</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00019"></a>00019 <span class="comment">// CCfitsHeader</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;CCfits.h&quot;</span>
<a name="l00021"></a>00021 <span class="comment">// Keyword</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;Keyword.h&quot;</span>
<a name="l00023"></a>00023 <span class="comment">// NewKeyword</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;NewKeyword.h&quot;</span>
<a name="l00025"></a>00025 <span class="comment">// FitsError</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;FitsError.h&quot;</span>
<a name="l00027"></a>00027 <span class="comment">// FITSUtil</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;FITSUtil.h&quot;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">namespace </span>CCfits {
<a name="l00031"></a>00031   <span class="keyword">class </span>FITS;
<a name="l00032"></a>00032   <span class="keyword">class </span>FITSBase;
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 } <span class="comment">// namespace CCfits</span>
<a name="l00035"></a>00035 <span class="keyword">namespace </span>CCfits {
<a name="l00036"></a>00036    <span class="keyword">class </span>HDUCreator; <span class="comment">// Needed for friend declaration</span>
<a name="l00037"></a>00037 }
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#include &quot;MSconfig.h&quot;</span> <span class="comment">// for truncation warning</span>
<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#include &quot;KeywordT.h&quot;</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="keyword">namespace </span>CCfits {
<a name="l00546"></a><a class="code" href="classCCfits_1_1HDU.html">00546</a>   <span class="keyword">class </span><a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a> 
<a name="l00547"></a>00547   {
<a name="l00548"></a>00548 
<a name="l00549"></a>00549     <span class="keyword">public</span>:
<a name="l00550"></a>00550 
<a name="l00551"></a>00551 
<a name="l00552"></a>00552 
<a name="l00553"></a><a class="code" href="classCCfits_1_1HDU_1_1InvalidImageDataType.html">00553</a>       <span class="keyword">class </span><a class="code" href="classCCfits_1_1HDU_1_1InvalidImageDataType.html" title="exception to be thrown if user requests creation of an image of type not supported...">InvalidImageDataType</a> : <span class="keyword">public</span> <a class="code" href="classCCfits_1_1FitsException.html" title="FitsException is the base class for all exceptions thrown by this library.">FitsException</a>  <span class="comment">//## Inherits: &lt;unnamed&gt;%394FBA12005C</span>
<a name="l00554"></a>00554       {
<a name="l00555"></a>00555         <span class="keyword">public</span>:
<a name="l00556"></a>00556             <a class="code" href="classCCfits_1_1HDU_1_1InvalidImageDataType.html#a3096f43465037a2be30e2c99ee9289a4" title="Exception ctor, prefixes the string &amp;quot;Fits Error: Invalid Data Type for Image...">InvalidImageDataType</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; diag, <span class="keywordtype">bool</span> silent = <span class="keyword">true</span>);
<a name="l00557"></a>00557 
<a name="l00558"></a>00558         <span class="keyword">protected</span>:
<a name="l00559"></a>00559         <span class="keyword">private</span>:
<a name="l00560"></a>00560         <span class="keyword">private</span>: <span class="comment">//## implementation</span>
<a name="l00561"></a>00561       };
<a name="l00562"></a>00562 
<a name="l00563"></a>00563 
<a name="l00564"></a>00564 
<a name="l00565"></a><a class="code" href="classCCfits_1_1HDU_1_1InvalidExtensionType.html">00565</a>       <span class="keyword">class </span><a class="code" href="classCCfits_1_1HDU_1_1InvalidExtensionType.html" title="exception to be thrown if user requests extension type that can not be understood...">InvalidExtensionType</a> : <span class="keyword">public</span> <a class="code" href="classCCfits_1_1FitsException.html" title="FitsException is the base class for all exceptions thrown by this library.">FitsException</a>  <span class="comment">//## Inherits: &lt;unnamed&gt;%3964C1D00352</span>
<a name="l00566"></a>00566       {
<a name="l00567"></a>00567         <span class="keyword">public</span>:
<a name="l00568"></a>00568             <a class="code" href="classCCfits_1_1HDU_1_1InvalidExtensionType.html#a3a2ca4ecaf262c22bbe5e75dde9e4c0d" title="Exception ctor, prefixes the string &amp;quot;Fits Error: Extension Type: &amp;quot; before...">InvalidExtensionType</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; diag, <span class="keywordtype">bool</span> silent = <span class="keyword">true</span>);
<a name="l00569"></a>00569 
<a name="l00570"></a>00570         <span class="keyword">protected</span>:
<a name="l00571"></a>00571         <span class="keyword">private</span>:
<a name="l00572"></a>00572         <span class="keyword">private</span>: <span class="comment">//## implementation</span>
<a name="l00573"></a>00573       };
<a name="l00574"></a>00574 
<a name="l00575"></a>00575 
<a name="l00576"></a>00576 
<a name="l00577"></a><a class="code" href="classCCfits_1_1HDU_1_1NoSuchKeyword.html">00577</a>       <span class="keyword">class </span><a class="code" href="classCCfits_1_1HDU_1_1NoSuchKeyword.html" title="exception to be thrown on seek errors for keywords.">NoSuchKeyword</a> : <span class="keyword">public</span> <a class="code" href="classCCfits_1_1FitsException.html" title="FitsException is the base class for all exceptions thrown by this library.">FitsException</a>  <span class="comment">//## Inherits: &lt;unnamed&gt;%398865D10264</span>
<a name="l00578"></a>00578       {
<a name="l00579"></a>00579         <span class="keyword">public</span>:
<a name="l00580"></a>00580             <a class="code" href="classCCfits_1_1HDU_1_1NoSuchKeyword.html#a8f012eff5e0635b5762fe6e13efc3ab5" title="Exception ctor, prefixes the string &amp;quot;Fits Error: Keyword not found:  &amp;quot;...">NoSuchKeyword</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; diag, <span class="keywordtype">bool</span> silent = <span class="keyword">true</span>);
<a name="l00581"></a>00581 
<a name="l00582"></a>00582         <span class="keyword">protected</span>:
<a name="l00583"></a>00583         <span class="keyword">private</span>:
<a name="l00584"></a>00584         <span class="keyword">private</span>: <span class="comment">//## implementation</span>
<a name="l00585"></a>00585       };
<a name="l00586"></a>00586 
<a name="l00587"></a>00587 
<a name="l00588"></a>00588 
<a name="l00589"></a><a class="code" href="classCCfits_1_1HDU_1_1NoNullValue.html">00589</a>       <span class="keyword">class </span><a class="code" href="classCCfits_1_1HDU_1_1NoNullValue.html" title="exception to be thrown on seek errors for keywords.">NoNullValue</a> : <span class="keyword">public</span> <a class="code" href="classCCfits_1_1FitsException.html" title="FitsException is the base class for all exceptions thrown by this library.">FitsException</a>  <span class="comment">//## Inherits: &lt;unnamed&gt;%3B0D58CE0306</span>
<a name="l00590"></a>00590       {
<a name="l00591"></a>00591         <span class="keyword">public</span>:
<a name="l00592"></a>00592             <a class="code" href="classCCfits_1_1HDU_1_1NoNullValue.html#a13c08a23ed54e9e1ef3d16fbbff61301" title="Exception ctor, prefixes the string &amp;quot;Fits Error: No Null Pixel Value specified...">NoNullValue</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; diag, <span class="keywordtype">bool</span> silent = <span class="keyword">true</span>);
<a name="l00593"></a>00593 
<a name="l00594"></a>00594         <span class="keyword">protected</span>:
<a name="l00595"></a>00595         <span class="keyword">private</span>:
<a name="l00596"></a>00596         <span class="keyword">private</span>: <span class="comment">//## implementation</span>
<a name="l00597"></a>00597       };
<a name="l00598"></a>00598         <a class="code" href="classCCfits_1_1HDU.html#a9fed5392151d12c459e5be9e955e1587" title="copy constructor">HDU</a>(<span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a> &amp;right);
<a name="l00599"></a>00599         <span class="keywordtype">bool</span> <a class="code" href="classCCfits_1_1HDU.html#ab574045dcdc383c9d2987850c640e0c1" title="equality operator">operator==</a>(<span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a> &amp;right) <span class="keyword">const</span>;
<a name="l00600"></a>00600 
<a name="l00601"></a>00601         <span class="keywordtype">bool</span> <a class="code" href="classCCfits_1_1HDU.html#a0c4fa124e27d002de1044c1832be5942" title="inequality operator">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a> &amp;right) <span class="keyword">const</span>;
<a name="l00602"></a>00602 
<a name="l00603"></a>00603         <span class="keyword">virtual</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a> * <a class="code" href="classCCfits_1_1HDU.html#a5d4af8d84676f20b1c79b785f1a22cde" title="virtual copy constructor, to be implemented in subclasses.">clone</a> (FITSBase* p) <span class="keyword">const</span> = 0;
<a name="l00604"></a>00604         fitsfile* <a class="code" href="classCCfits_1_1HDU.html#a37bec2db64600e489eb8efa8a001f73d" title="return the fitsfile pointer for the FITS object containing the HDU">fitsPointer</a> () <span class="keyword">const</span>;
<a name="l00605"></a>00605         FITSBase* <a class="code" href="classCCfits_1_1HDU.html#a3b547e893d364ebc570f2998a6b193bd" title="return reference to the pointer representing the FITSBase object containing the HDU...">parent</a> () <span class="keyword">const</span>;
<a name="l00606"></a>00606         <span class="comment">//      By all means necessary, set the fitsfile pointer so that</span>
<a name="l00607"></a>00607         <span class="comment">//      this HDU is the current HDU.</span>
<a name="l00608"></a>00608         <span class="comment">//</span>
<a name="l00609"></a>00609         <span class="comment">//      This would appear to be a good candidate for the public</span>
<a name="l00610"></a>00610         <span class="comment">//      interface.</span>
<a name="l00611"></a>00611         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#af0bbec3fe5f6b41ff4a95feff6600d57" title="move the fitsfile pointer to this current HDU.">makeThisCurrent</a> () <span class="keyword">const</span>;
<a name="l00612"></a>00612         <span class="keyword">const</span> String&amp; <a class="code" href="classCCfits_1_1HDU.html#a6604d7907f4f0353e2821ac6c2506c73" title="read the comments from the HDU and add it to the FITS object.">getComments</a> ();
<a name="l00613"></a>00613         <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <a class="code" href="classCCfits_1_1HDU.html#aecb532b753cd3460568e49e64df19ee5" title="return the comment string previously read by getComment()">comment</a> () <span class="keyword">const</span>;
<a name="l00614"></a>00614         <span class="comment">//      Write a history string. A default value for the string is given</span>
<a name="l00615"></a>00615         <span class="comment">//      &quot;GenericComment&quot; so users can put a placeholder call</span>
<a name="l00616"></a>00616         <span class="comment">//      to this function in their code before knowing quite what should go in it.</span>
<a name="l00617"></a>00617         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a05843eda3c863cf9b580a409b3067c55" title="write a comment string.">writeComment</a> (<span class="keyword">const</span> String&amp; <a class="code" href="classCCfits_1_1HDU.html#aecb532b753cd3460568e49e64df19ee5" title="return the comment string previously read by getComment()">comment</a> = <span class="stringliteral">&quot;Generic Comment&quot;</span>);
<a name="l00618"></a>00618         <span class="keyword">const</span> String&amp; <a class="code" href="classCCfits_1_1HDU.html#a09da0675ae163e98d2d8cf3e2a9c2571" title="read the history information from the HDU and add it to the FITS object.">getHistory</a> ();
<a name="l00619"></a>00619         <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <a class="code" href="classCCfits_1_1HDU.html#a7acddc0c108bc9504a3a342b010ec9a1" title="return the history string previously read by getHistory()">history</a> () <span class="keyword">const</span>;
<a name="l00620"></a>00620         <span class="comment">//      Write a history string. A default value for the string is given</span>
<a name="l00621"></a>00621         <span class="comment">//      &quot;Generic History String&quot; so users can put a placeholder call</span>
<a name="l00622"></a>00622         <span class="comment">//      to this function in their code before knowing quite what should go in it.</span>
<a name="l00623"></a>00623         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#ae33b25a2d52e0e75e13d277e3327d03f" title="write a history string.">writeHistory</a> (<span class="keyword">const</span> String&amp; <a class="code" href="classCCfits_1_1HDU.html#a7acddc0c108bc9504a3a342b010ec9a1" title="return the history string previously read by getHistory()">history</a> = <span class="stringliteral">&quot;Generic History String&quot;</span>);
<a name="l00624"></a>00624         <span class="comment">//      Write a date card.</span>
<a name="l00625"></a>00625         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a4c36394bfe734921404a6882e82be4db" title="write a date string to *this.">writeDate</a> ();
<a name="l00626"></a>00626         <span class="keyword">friend</span> std::ostream&amp; operator &lt;&lt; (std::ostream&amp; s, <span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">CCfits::HDU</a>&amp; right);
<a name="l00627"></a>00627         <span class="keywordtype">long</span> <a class="code" href="classCCfits_1_1HDU.html#a18bd99b5d72ace7e7b353102eb80793a" title="return the number of axes in the HDU data section (always 2 for tables).">axes</a> () <span class="keyword">const</span>;
<a name="l00628"></a>00628         <span class="keywordtype">long</span> <a class="code" href="classCCfits_1_1HDU.html#a9e19372a1a01046420c6ba4393bb5674" title="return the size of axis numbered index [zero based].">axis</a> (<span class="keywordtype">size_t</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">index</a>) <span class="keyword">const</span>;
<a name="l00629"></a>00629         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">index</a> (<span class="keywordtype">int</span> value);
<a name="l00630"></a>00630         <span class="keywordtype">int</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">index</a> () <span class="keyword">const</span>;
<a name="l00631"></a>00631         <span class="keywordtype">long</span> <a class="code" href="classCCfits_1_1HDU.html#a81a2d5b001c0ae7d0a298942940189d8" title="return the data type keyword.">bitpix</a> () <span class="keyword">const</span>;
<a name="l00632"></a>00632         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classCCfits_1_1HDU.html#af1ffd58e00cd8f3a903976df8f91bc0a" title="return the BSCALE keyword value">scale</a> () <span class="keyword">const</span>;
<a name="l00633"></a>00633         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#af1ffd58e00cd8f3a903976df8f91bc0a" title="return the BSCALE keyword value">scale</a> (<span class="keywordtype">double</span> value);
<a name="l00634"></a>00634         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classCCfits_1_1HDU.html#a23317074fa7362c7522c01f3f1756618" title="return the BZERO keyword value">zero</a> () <span class="keyword">const</span>;
<a name="l00635"></a>00635         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a23317074fa7362c7522c01f3f1756618" title="return the BZERO keyword value">zero</a> (<span class="keywordtype">double</span> value);
<a name="l00636"></a>00636         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a6bd0d7eb236211267de480c595b5b631" title="turn off image scaling regardless of the BSCALE and BZERO keyword values">suppressScaling</a> (<span class="keywordtype">bool</span> toggle = <span class="keyword">true</span>);
<a name="l00637"></a>00637         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a3ac4ca8b88fc94552f890154247776c6" title="compute and write the DATASUM and CHECKSUM keyword values">writeChecksum</a> ();
<a name="l00638"></a>00638         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a56ce9ed0864e07a7ef380b18e3be7a79" title="update the CHECKSUM keyword value, assuming DATASUM exists and is correct">updateChecksum</a> ();
<a name="l00639"></a>00639         std::pair&lt;int,int&gt; <a class="code" href="classCCfits_1_1HDU.html#adc1a7ba06b6a113010334320e5268dc6" title="verify the HDU by computing the checksums and comparing them with the CHECKSUM/DATASUM...">verifyChecksum</a> () <span class="keyword">const</span>;
<a name="l00640"></a>00640         std::pair&lt;unsigned long,unsigned long&gt; <a class="code" href="classCCfits_1_1HDU.html#abdfef60e183bb3f3ae0374fccdbc4e45" title="compute and return the checksum values for the HDU without creating or modifying...">getChecksum</a> () <span class="keyword">const</span>;
<a name="l00641"></a>00641         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#aece6e1d7e46ce3370578972a4aeb08ab" title="delete a keyword from the header">deleteKey</a> (<span class="keyword">const</span> String&amp; doomed);
<a name="l00642"></a>00642         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a2dd3930b7e987e0971c494887243a7a2" title="read all of the keys in the header">readAllKeys</a> ();
<a name="l00643"></a>00643         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a317fcf61da35fcf568f7bc3c2df83706" title="copy all keys from another header">copyAllKeys</a> (<span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a>* inHdu);
<a name="l00644"></a>00644         std::map&lt;String, Keyword*&gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">keyWord</a> ();
<a name="l00645"></a>00645         <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">keyWord</a> (<span class="keyword">const</span> String&amp; keyName);
<a name="l00646"></a>00646         <span class="keyword">static</span> std::vector&lt;int&gt; <a class="code" href="classCCfits_1_1HDU.html#a69f296780f7b1e2ff83199d4cffa4c86" title="return the enumerated keyword categories used by readAllKeys() and copyAllKeys()">keywordCategories</a> ();
<a name="l00647"></a>00647         <span class="keyword">const</span> std::map&lt;string,Keyword*&gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">keyWord</a> () <span class="keyword">const</span>;
<a name="l00648"></a>00648         <span class="keyword">const</span> <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">keyWord</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; keyname) <span class="keyword">const</span>;
<a name="l00649"></a>00649 
<a name="l00650"></a>00650     <span class="keyword">public</span>:
<a name="l00651"></a>00651       <span class="comment">// Additional Public Declarations</span>
<a name="l00652"></a>00652       <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00653"></a>00653       <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a14e36d51401c4a0028f71d1398785616" title="read a keyword of specified type from the header of a disk FITS file and return its...">readKey</a>(<span class="keyword">const</span> String&amp; keyName, T&amp; val);
<a name="l00654"></a>00654 
<a name="l00655"></a>00655       <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00656"></a>00656       <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#ad366e9cd9cb0b64995c5c457dfe16e60" title="read a set of specified keywords of the same data type from the header of a disk...">readKeys</a>(std::vector&lt;String&gt;&amp; keyNames, std::vector&lt;T&gt;&amp; vals);
<a name="l00657"></a>00657 
<a name="l00658"></a>00658       <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00659"></a>00659       <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a6c1b83b64794e608f71e2270c74a61d6" title="create a new keyword in the HDU with specified value and comment fields">addKey</a>(<span class="keyword">const</span> String&amp; name, T val,  <span class="keyword">const</span> String&amp; <a class="code" href="classCCfits_1_1HDU.html#aecb532b753cd3460568e49e64df19ee5" title="return the comment string previously read by getComment()">comment</a>);
<a name="l00660"></a>00660 
<a name="l00661"></a>00661       <span class="comment">// This non-template function could be entered with Rose, but</span>
<a name="l00662"></a>00662       <span class="comment">// it&apos;s instead placed with the other addKey function to</span>
<a name="l00663"></a>00663       <span class="comment">// simplify the Doxygen generated doc file output.</span>
<a name="l00664"></a>00664       <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* <a class="code" href="classCCfits_1_1HDU.html#a6c1b83b64794e608f71e2270c74a61d6" title="create a new keyword in the HDU with specified value and comment fields">addKey</a>(<span class="keyword">const</span> <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* inKeyword);
<a name="l00665"></a>00665 
<a name="l00666"></a>00666       <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a6c1b83b64794e608f71e2270c74a61d6" title="create a new keyword in the HDU with specified value and comment fields">addKey</a>(<span class="keyword">const</span> String&amp; name, <span class="keyword">const</span> <span class="keywordtype">char</span>* charString, <span class="keyword">const</span> String&amp; <a class="code" href="classCCfits_1_1HDU.html#aecb532b753cd3460568e49e64df19ee5" title="return the comment string previously read by getComment()">comment</a>);
<a name="l00667"></a>00667 
<a name="l00668"></a>00668 <span class="preprocessor">#ifdef TEMPLATE_AMBIG_DEFECT</span>
<a name="l00669"></a>00669 <span class="preprocessor"></span>      <span class="keyword">inline</span> <span class="keywordtype">void</span> readKeyMS(<span class="keyword">const</span> String&amp; keyName, <span class="keywordtype">int</span> &amp; val);
<a name="l00670"></a>00670       <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#ad366e9cd9cb0b64995c5c457dfe16e60" title="read a set of specified keywords of the same data type from the header of a disk...">readKeys</a>(std::vector&lt;String&gt;&amp; keyNames, std::vector&lt;String&gt;&amp; vals);
<a name="l00671"></a>00671 
<a name="l00672"></a>00672 <span class="preprocessor">#endif</span>
<a name="l00673"></a>00673 <span class="preprocessor"></span>    <span class="keyword">protected</span>:
<a name="l00674"></a>00674         <span class="comment">//      Functions as the default constructor, which is required for</span>
<a name="l00675"></a>00675         <span class="comment">//      the map container class.</span>
<a name="l00676"></a>00676         <a class="code" href="classCCfits_1_1HDU.html#a9fed5392151d12c459e5be9e955e1587" title="copy constructor">HDU</a> (FITSBase* p = 0);
<a name="l00677"></a>00677         <a class="code" href="classCCfits_1_1HDU.html#a9fed5392151d12c459e5be9e955e1587" title="copy constructor">HDU</a> (FITSBase* p, <span class="keywordtype">int</span> <a class="code" href="classCCfits_1_1HDU.html#a81a2d5b001c0ae7d0a298942940189d8" title="return the data type keyword.">bitpix</a>, <span class="keywordtype">int</span> naxis, <span class="keyword">const</span> std::vector&lt;long&gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a18bd99b5d72ace7e7b353102eb80793a" title="return the number of axes in the HDU data section (always 2 for tables).">axes</a>);
<a name="l00678"></a>00678         <span class="keyword">virtual</span> <a class="code" href="classCCfits_1_1HDU.html#ad660a6aee62165b81eb71b85447ab93e" title="destructor">~HDU</a>();
<a name="l00679"></a>00679 
<a name="l00680"></a>00680         <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; readKeyword (<span class="keyword">const</span> String &amp;keyname);
<a name="l00681"></a>00681         <span class="keywordtype">void</span> readKeywords (std::list&lt;String&gt;&amp; keynames);
<a name="l00682"></a>00682         <span class="keyword">virtual</span> std::ostream &amp; put (std::ostream &amp;s) <span class="keyword">const</span> = 0;
<a name="l00683"></a>00683         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a81a2d5b001c0ae7d0a298942940189d8" title="return the data type keyword.">bitpix</a> (<span class="keywordtype">long</span> value);
<a name="l00684"></a>00684         <span class="keywordtype">bool</span> checkImgDataTypeChange (<span class="keywordtype">double</span> <a class="code" href="classCCfits_1_1HDU.html#a23317074fa7362c7522c01f3f1756618" title="return the BZERO keyword value">zero</a>, <span class="keywordtype">double</span> <a class="code" href="classCCfits_1_1HDU.html#af1ffd58e00cd8f3a903976df8f91bc0a" title="return the BSCALE keyword value">scale</a>) <span class="keyword">const</span>;
<a name="l00685"></a>00685         <span class="keywordtype">long</span>&amp; naxis ();
<a name="l00686"></a>00686         <span class="keywordtype">void</span> naxis (<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; value);
<a name="l00687"></a>00687         <span class="comment">//      Flags whether there were any null values found in the</span>
<a name="l00688"></a>00688         <span class="comment">//      last read operation.</span>
<a name="l00689"></a>00689         <span class="keywordtype">bool</span>&amp; anynul ();
<a name="l00690"></a>00690         <span class="keywordtype">void</span> anynul (<span class="keyword">const</span> <span class="keywordtype">bool</span>&amp; value);
<a name="l00691"></a>00691         FITSBase*&amp; <a class="code" href="classCCfits_1_1HDU.html#a3b547e893d364ebc570f2998a6b193bd" title="return reference to the pointer representing the FITSBase object containing the HDU...">parent</a> ();
<a name="l00692"></a>00692         std::vector&lt; long &gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081" title="return the HDU data axis array.">naxes</a> ();
<a name="l00693"></a>00693         <span class="keywordtype">long</span>&amp; <a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081" title="return the HDU data axis array.">naxes</a> (<span class="keywordtype">size_t</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">index</a>);
<a name="l00694"></a>00694         <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081" title="return the HDU data axis array.">naxes</a> (<span class="keywordtype">size_t</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">index</a>, <span class="keyword">const</span> <span class="keywordtype">long</span>&amp; value);
<a name="l00695"></a>00695 
<a name="l00696"></a>00696       <span class="comment">// Additional Protected Declarations</span>
<a name="l00697"></a>00697 
<a name="l00698"></a>00698     <span class="keyword">private</span>:
<a name="l00699"></a>00699         <span class="comment">//      clear the FITS Keyword map. To be called by</span>
<a name="l00700"></a>00700         <span class="comment">//      the dtor and the copy/assignment operations.</span>
<a name="l00701"></a>00701         <span class="keywordtype">void</span> clearKeys ();
<a name="l00702"></a>00702         <span class="keyword">virtual</span> <span class="keywordtype">void</span> initRead () = 0;
<a name="l00703"></a>00703         <span class="keywordtype">void</span> readHduInfo ();
<a name="l00704"></a>00704         <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* addKeyword (<a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* newKey);
<a name="l00705"></a>00705         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> compare (<span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a> &amp;right) <span class="keyword">const</span>;
<a name="l00706"></a>00706         <span class="comment">//      clear the FITS Keyword map. To be called by</span>
<a name="l00707"></a>00707         <span class="comment">//      the dtor and the copy/assignment operations.</span>
<a name="l00708"></a>00708         <span class="keywordtype">void</span> copyKeys (<span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a>&amp; right);
<a name="l00709"></a>00709         String getNamedLines (<span class="keyword">const</span> String&amp; name);
<a name="l00710"></a>00710         <span class="comment">//      save keyword found by read all keys into the array of keywords that have been read.</span>
<a name="l00711"></a>00711         <span class="comment">//      Similar to addKeyword except there&apos;s no write and no returned value. For use by readAllKeys()</span>
<a name="l00712"></a>00712         <span class="keywordtype">void</span> saveReadKeyword (<a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* newKey);
<a name="l00713"></a>00713         <span class="keywordtype">void</span> zeroInit (<span class="keywordtype">double</span> value);
<a name="l00714"></a>00714         <span class="keywordtype">void</span> scaleInit (<span class="keywordtype">double</span> value);
<a name="l00715"></a>00715 
<a name="l00716"></a>00716       <span class="comment">// Additional Private Declarations</span>
<a name="l00717"></a>00717 
<a name="l00718"></a>00718     <span class="keyword">private</span>: <span class="comment">//## implementation</span>
<a name="l00719"></a>00719       <span class="comment">// Data Members for Class Attributes</span>
<a name="l00720"></a>00720         <span class="keywordtype">long</span> m_naxis;
<a name="l00721"></a>00721         <span class="keywordtype">long</span> m_bitpix;
<a name="l00722"></a>00722         <span class="keywordtype">int</span> m_index;
<a name="l00723"></a>00723         <span class="keywordtype">bool</span> m_anynul;
<a name="l00724"></a>00724         <span class="keywordtype">string</span> m_history;
<a name="l00725"></a>00725         <span class="keywordtype">string</span> m_comment;
<a name="l00726"></a>00726         <span class="keywordtype">double</span> m_zero;
<a name="l00727"></a>00727         <span class="comment">//      Floating point scale factor for image data that takes</span>
<a name="l00728"></a>00728         <span class="comment">//      the value of the BSCALE parameter.</span>
<a name="l00729"></a>00729         <span class="keywordtype">double</span> m_scale;
<a name="l00730"></a>00730 
<a name="l00731"></a>00731       <span class="comment">// Data Members for Associations</span>
<a name="l00732"></a>00732         std::map&lt;string,Keyword*&gt; m_keyWord;
<a name="l00733"></a>00733         FITSBase* m_parent;
<a name="l00734"></a>00734         std::vector&lt; long &gt; m_naxes;
<a name="l00735"></a>00735 
<a name="l00736"></a>00736       <span class="comment">// Additional Implementation Declarations</span>
<a name="l00737"></a>00737         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> s_nCategories;
<a name="l00738"></a>00738         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> s_iKeywordCategories[];
<a name="l00739"></a>00739 
<a name="l00740"></a>00740       <span class="keyword">friend</span> <span class="keyword">class </span>HDUCreator;        
<a name="l00741"></a>00741       <span class="keyword">friend</span> <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* KeywordCreator::getKeyword(<span class="keyword">const</span> String&amp; keyname, <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a>* p);
<a name="l00742"></a>00742       <span class="keyword">friend</span> <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* KeywordCreator::getKeyword(<span class="keyword">const</span> String&amp; keyname, ValueType keyType, <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">HDU</a>* p);
<a name="l00743"></a>00743   };
<a name="l00744"></a>00744   <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00745"></a><a class="code" href="classCCfits_1_1HDU.html#a6c1b83b64794e608f71e2270c74a61d6">00745</a>   <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a6c1b83b64794e608f71e2270c74a61d6" title="create a new keyword in the HDU with specified value and comment fields">HDU::addKey</a>(<span class="keyword">const</span> String&amp; name, T value,  <span class="keyword">const</span> String&amp; comment)
<a name="l00746"></a>00746   {
<a name="l00747"></a>00747               <a class="code" href="classCCfits_1_1HDU.html#af0bbec3fe5f6b41ff4a95feff6600d57" title="move the fitsfile pointer to this current HDU.">makeThisCurrent</a>();
<a name="l00748"></a>00748               NewKeyword&lt;T&gt; keyCreator(<span class="keyword">this</span>,value);
<a name="l00749"></a>00749               <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; newKey = *(addKeyword(keyCreator.createKeyword(name,comment)));
<a name="l00750"></a>00750               <span class="keywordflow">return</span> newKey;
<a name="l00751"></a>00751   } 
<a name="l00752"></a>00752 
<a name="l00753"></a>00753   <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00754"></a><a class="code" href="classCCfits_1_1HDU.html#a14e36d51401c4a0028f71d1398785616">00754</a>   <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a14e36d51401c4a0028f71d1398785616" title="read a keyword of specified type from the header of a disk FITS file and return its...">HDU::readKey</a>(<span class="keyword">const</span> String&amp; keyName, T&amp; val)
<a name="l00755"></a>00755   {
<a name="l00756"></a>00756           <a class="code" href="classCCfits_1_1HDU.html#af0bbec3fe5f6b41ff4a95feff6600d57" title="move the fitsfile pointer to this current HDU.">makeThisCurrent</a>();
<a name="l00757"></a>00757           <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; key = readKeyword(keyName);
<a name="l00758"></a>00758           key.<a class="code" href="classCCfits_1_1Keyword.html#a4f064dcdcafe756d21c7af2a97dc2e61" title="get the keyword value">value</a>(val);
<a name="l00759"></a>00759   }
<a name="l00760"></a>00760 
<a name="l00761"></a>00761 
<a name="l00762"></a>00762   <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00763"></a><a class="code" href="classCCfits_1_1HDU.html#ad366e9cd9cb0b64995c5c457dfe16e60">00763</a>   <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#ad366e9cd9cb0b64995c5c457dfe16e60" title="read a set of specified keywords of the same data type from the header of a disk...">HDU::readKeys</a>(std::vector&lt;String&gt;&amp; keyNames, std::vector&lt;T&gt;&amp; vals)
<a name="l00764"></a>00764   {
<a name="l00765"></a>00765           <span class="keywordtype">size_t</span> nRead = keyNames.size();
<a name="l00766"></a>00766 
<a name="l00767"></a>00767           std::list&lt;String&gt; valKeys;
<a name="l00768"></a>00768           std::list&lt;T&gt;      valList;
<a name="l00769"></a>00769           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; nRead; i++) valKeys.push_back(keyNames[i]);
<a name="l00770"></a>00770           <span class="comment">// read all the keys requested, rejecting those that don&apos;t exist.</span>
<a name="l00771"></a>00771 
<a name="l00772"></a>00772           readKeywords(valKeys);
<a name="l00773"></a>00773 
<a name="l00774"></a>00774           <span class="comment">// get the values of all of the requested keys, rejecting those of the</span>
<a name="l00775"></a>00775           <span class="comment">// wrong type.</span>
<a name="l00776"></a>00776 
<a name="l00777"></a>00777           T current;
<a name="l00778"></a>00778           std::list&lt;String&gt;::iterator it = valKeys.begin(); 
<a name="l00779"></a>00779           <span class="keywordflow">while</span> (it != valKeys.end())
<a name="l00780"></a>00780           {
<a name="l00781"></a>00781                   <span class="keywordflow">try</span>
<a name="l00782"></a>00782                   {
<a name="l00783"></a>00783                           m_keyWord[*it]-&gt;value(current);
<a name="l00784"></a>00784                           valList.push_back(current);       
<a name="l00785"></a>00785                           ++it;
<a name="l00786"></a>00786                   }
<a name="l00787"></a>00787                   <span class="keywordflow">catch</span> ( Keyword::WrongKeywordValueType )
<a name="l00788"></a>00788                   {
<a name="l00789"></a>00789                           it = valKeys.erase(it);                         
<a name="l00790"></a>00790                   }
<a name="l00791"></a>00791           }
<a name="l00792"></a>00792 
<a name="l00793"></a>00793           keyNames.erase(keyNames.begin(),keyNames.end());       
<a name="l00794"></a>00794 
<a name="l00795"></a>00795           <span class="keywordflow">if</span> (!valList.empty())
<a name="l00796"></a>00796           {
<a name="l00797"></a>00797                   <span class="keywordflow">if</span> (valList.size() != vals.size()) vals.resize(valList.size());
<a name="l00798"></a>00798 
<a name="l00799"></a>00799                   <span class="keywordtype">size_t</span> i=0;
<a name="l00800"></a>00800                   <span class="keywordflow">for</span> (<span class="keyword">typename</span> std::list&lt;T&gt;::const_iterator it1 
<a name="l00801"></a>00801                                   = valList.begin(); it1 != valList.end(); ++it1,++i)
<a name="l00802"></a>00802                   {
<a name="l00803"></a>00803                           vals[i] = *it1;
<a name="l00804"></a>00804                   }
<a name="l00805"></a>00805                   <span class="keywordflow">for</span> (std::list&lt;String&gt;::const_iterator it1= valKeys.begin(); it1 != valKeys.end(); ++it1)
<a name="l00806"></a>00806                   {
<a name="l00807"></a>00807                           keyNames.push_back(*it1);
<a name="l00808"></a>00808                   }
<a name="l00809"></a>00809           }
<a name="l00810"></a>00810 
<a name="l00811"></a>00811   }
<a name="l00812"></a>00812 
<a name="l00813"></a>00813   <span class="comment">// Class CCfits::HDU::InvalidImageDataType </span>
<a name="l00814"></a>00814 
<a name="l00815"></a>00815   <span class="comment">// Class CCfits::HDU::InvalidExtensionType </span>
<a name="l00816"></a>00816 
<a name="l00817"></a>00817   <span class="comment">// Class CCfits::HDU::NoSuchKeyword </span>
<a name="l00818"></a>00818 
<a name="l00819"></a>00819   <span class="comment">// Class CCfits::HDU::NoNullValue </span>
<a name="l00820"></a>00820 
<a name="l00821"></a>00821   <span class="comment">// Class CCfits::HDU </span>
<a name="l00822"></a>00822 
<a name="l00823"></a><a class="code" href="classCCfits_1_1HDU.html#aecb532b753cd3460568e49e64df19ee5">00823</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <a class="code" href="classCCfits_1_1HDU.html#aecb532b753cd3460568e49e64df19ee5" title="return the comment string previously read by getComment()">HDU::comment</a> ()<span class="keyword"> const</span>
<a name="l00824"></a>00824 <span class="keyword">  </span>{
<a name="l00825"></a>00825     <span class="keywordflow">return</span> m_comment;
<a name="l00826"></a>00826   }
<a name="l00827"></a>00827 
<a name="l00828"></a><a class="code" href="classCCfits_1_1HDU.html#a7acddc0c108bc9504a3a342b010ec9a1">00828</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <a class="code" href="classCCfits_1_1HDU.html#a7acddc0c108bc9504a3a342b010ec9a1" title="return the history string previously read by getHistory()">HDU::history</a> ()<span class="keyword"> const</span>
<a name="l00829"></a>00829 <span class="keyword">  </span>{
<a name="l00830"></a>00830     <span class="keywordflow">return</span> m_history;
<a name="l00831"></a>00831   }
<a name="l00832"></a>00832 
<a name="l00833"></a>00833   <span class="keyword">inline</span> std::ostream&amp; operator &lt;&lt; (std::ostream&amp; s, <span class="keyword">const</span> <a class="code" href="classCCfits_1_1HDU.html" title="Base class for all HDU [Header-Data Unit] objects.">CCfits::HDU</a>&amp; right)
<a name="l00834"></a>00834   {
<a name="l00835"></a>00835      <span class="keywordflow">return</span> right.put(s);
<a name="l00836"></a>00836   }
<a name="l00837"></a>00837 
<a name="l00838"></a><a class="code" href="classCCfits_1_1HDU.html#a18bd99b5d72ace7e7b353102eb80793a">00838</a>   <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classCCfits_1_1HDU.html#a18bd99b5d72ace7e7b353102eb80793a" title="return the number of axes in the HDU data section (always 2 for tables).">HDU::axes</a> ()<span class="keyword"> const</span>
<a name="l00839"></a>00839 <span class="keyword">  </span>{
<a name="l00840"></a>00840 
<a name="l00841"></a>00841     <span class="keywordflow">return</span> m_naxis;
<a name="l00842"></a>00842   }
<a name="l00843"></a>00843 
<a name="l00844"></a><a class="code" href="classCCfits_1_1HDU.html#a9e19372a1a01046420c6ba4393bb5674">00844</a>   <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classCCfits_1_1HDU.html#a9e19372a1a01046420c6ba4393bb5674" title="return the size of axis numbered index [zero based].">HDU::axis</a> (<span class="keywordtype">size_t</span> index)<span class="keyword"> const</span>
<a name="l00845"></a>00845 <span class="keyword">  </span>{
<a name="l00846"></a>00846 
<a name="l00847"></a>00847     <span class="keywordflow">return</span> m_naxes[index];
<a name="l00848"></a>00848   }
<a name="l00849"></a>00849 
<a name="l00850"></a><a class="code" href="classCCfits_1_1HDU.html#ab8bf6e03b7460db9dc81c1e6c4bbb214">00850</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">HDU::index</a> (<span class="keywordtype">int</span> value)
<a name="l00851"></a>00851   {
<a name="l00852"></a>00852 
<a name="l00853"></a>00853     m_index = value;
<a name="l00854"></a>00854   }
<a name="l00855"></a>00855 
<a name="l00856"></a><a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d">00856</a>   <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classCCfits_1_1HDU.html#a111434a1e35e2453237f86b30b3f4a8d" title="return the HDU number">HDU::index</a> ()<span class="keyword"> const</span>
<a name="l00857"></a>00857 <span class="keyword">  </span>{
<a name="l00858"></a>00858     <span class="keywordflow">return</span> m_index;
<a name="l00859"></a>00859   }
<a name="l00860"></a>00860 
<a name="l00861"></a><a class="code" href="classCCfits_1_1HDU.html#a81a2d5b001c0ae7d0a298942940189d8">00861</a>   <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classCCfits_1_1HDU.html#a81a2d5b001c0ae7d0a298942940189d8" title="return the data type keyword.">HDU::bitpix</a> ()<span class="keyword"> const</span>
<a name="l00862"></a>00862 <span class="keyword">  </span>{
<a name="l00863"></a>00863     <span class="keywordflow">return</span> m_bitpix;
<a name="l00864"></a>00864   }
<a name="l00865"></a>00865 
<a name="l00866"></a>00866   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a81a2d5b001c0ae7d0a298942940189d8" title="return the data type keyword.">HDU::bitpix</a> (<span class="keywordtype">long</span> value)
<a name="l00867"></a>00867   {
<a name="l00868"></a>00868     m_bitpix = value;
<a name="l00869"></a>00869   }
<a name="l00870"></a>00870 
<a name="l00871"></a><a class="code" href="classCCfits_1_1HDU.html#af1ffd58e00cd8f3a903976df8f91bc0a">00871</a>   <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classCCfits_1_1HDU.html#af1ffd58e00cd8f3a903976df8f91bc0a" title="return the BSCALE keyword value">HDU::scale</a> ()<span class="keyword"> const</span>
<a name="l00872"></a>00872 <span class="keyword">  </span>{
<a name="l00873"></a>00873     <span class="keywordflow">return</span> m_scale;
<a name="l00874"></a>00874   }
<a name="l00875"></a>00875 
<a name="l00876"></a><a class="code" href="classCCfits_1_1HDU.html#a6c8e0dc188f74f681f6bfe17819b2eb9">00876</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#af1ffd58e00cd8f3a903976df8f91bc0a" title="return the BSCALE keyword value">HDU::scale</a> (<span class="keywordtype">double</span> value)
<a name="l00877"></a>00877   {
<a name="l00878"></a>00878     m_scale = value;
<a name="l00879"></a>00879   }
<a name="l00880"></a>00880 
<a name="l00881"></a><a class="code" href="classCCfits_1_1HDU.html#a23317074fa7362c7522c01f3f1756618">00881</a>   <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classCCfits_1_1HDU.html#a23317074fa7362c7522c01f3f1756618" title="return the BZERO keyword value">HDU::zero</a> ()<span class="keyword"> const</span>
<a name="l00882"></a>00882 <span class="keyword">  </span>{
<a name="l00883"></a>00883     <span class="keywordflow">return</span> m_zero;
<a name="l00884"></a>00884   }
<a name="l00885"></a>00885 
<a name="l00886"></a><a class="code" href="classCCfits_1_1HDU.html#a2fb3adf98e8cc736b200520afed61c13">00886</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a23317074fa7362c7522c01f3f1756618" title="return the BZERO keyword value">HDU::zero</a> (<span class="keywordtype">double</span> value)
<a name="l00887"></a>00887   {
<a name="l00888"></a>00888     m_zero = value;
<a name="l00889"></a>00889   }
<a name="l00890"></a>00890 
<a name="l00891"></a>00891   <span class="keyword">inline</span> <span class="keywordtype">void</span> HDU::saveReadKeyword (<a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>* newKey)
<a name="l00892"></a>00892   {
<a name="l00893"></a>00893     m_keyWord.insert(std::map&lt;String,Keyword*&gt;::value_type(newKey-&gt;<a class="code" href="classCCfits_1_1Keyword.html#ae0f6c4a86159817d3b0cde818d329a25" title="return the name of a keyword">name</a>(),newKey-&gt;<a class="code" href="classCCfits_1_1Keyword.html#ac92a807de0401fa32f6cdbfe96dd3083" title="virtual copy constructor">clone</a>()));
<a name="l00894"></a>00894   }
<a name="l00895"></a>00895 
<a name="l00896"></a><a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17">00896</a>   <span class="keyword">inline</span> std::map&lt;String, Keyword*&gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">HDU::keyWord</a> ()
<a name="l00897"></a>00897   {
<a name="l00898"></a>00898 
<a name="l00899"></a>00899     <span class="keywordflow">return</span> m_keyWord;
<a name="l00900"></a>00900   }
<a name="l00901"></a>00901 
<a name="l00902"></a><a class="code" href="classCCfits_1_1HDU.html#abb274465a32c564e884b69810161078c">00902</a>   <span class="keyword">inline</span> <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">HDU::keyWord</a> (<span class="keyword">const</span> String&amp; keyName)
<a name="l00903"></a>00903   {
<a name="l00904"></a>00904   std::map&lt;String,Keyword*&gt;::iterator key = m_keyWord.find(keyName);
<a name="l00905"></a>00905   <span class="keywordflow">if</span> (key == m_keyWord.end()) <span class="keywordflow">throw</span> <a class="code" href="classCCfits_1_1HDU_1_1NoSuchKeyword.html" title="exception to be thrown on seek errors for keywords.">HDU::NoSuchKeyword</a>(keyName);
<a name="l00906"></a>00906   <span class="keywordflow">return</span> *((*key).second);
<a name="l00907"></a>00907   }
<a name="l00908"></a>00908 
<a name="l00909"></a>00909   <span class="keyword">inline</span> <span class="keywordtype">long</span>&amp; HDU::naxis ()
<a name="l00910"></a>00910   {
<a name="l00911"></a>00911     <span class="keywordflow">return</span> m_naxis;
<a name="l00912"></a>00912   }
<a name="l00913"></a>00913 
<a name="l00914"></a>00914   <span class="keyword">inline</span> <span class="keywordtype">void</span> HDU::naxis (<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; value)
<a name="l00915"></a>00915   {
<a name="l00916"></a>00916     m_naxis = value;
<a name="l00917"></a>00917   }
<a name="l00918"></a>00918 
<a name="l00919"></a>00919   <span class="keyword">inline</span> <span class="keywordtype">bool</span>&amp; HDU::anynul ()
<a name="l00920"></a>00920   {
<a name="l00921"></a>00921     <span class="keywordflow">return</span> m_anynul;
<a name="l00922"></a>00922   }
<a name="l00923"></a>00923 
<a name="l00924"></a>00924   <span class="keyword">inline</span> <span class="keywordtype">void</span> HDU::anynul (<span class="keyword">const</span> <span class="keywordtype">bool</span>&amp; value)
<a name="l00925"></a>00925   {
<a name="l00926"></a>00926     m_anynul = value;
<a name="l00927"></a>00927   }
<a name="l00928"></a>00928 
<a name="l00929"></a><a class="code" href="classCCfits_1_1HDU.html#a674875a76c3fb745b2b35303b42407cc">00929</a>   <span class="keyword">inline</span> <span class="keyword">const</span> std::map&lt;string,Keyword*&gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">HDU::keyWord</a> ()<span class="keyword"> const</span>
<a name="l00930"></a>00930 <span class="keyword">  </span>{
<a name="l00931"></a>00931     <span class="keywordflow">return</span> m_keyWord;
<a name="l00932"></a>00932   }
<a name="l00933"></a>00933 
<a name="l00934"></a><a class="code" href="classCCfits_1_1HDU.html#abd3add56e93046c3a5260f1d227b4892">00934</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classCCfits_1_1Keyword.html" title="Abstract base class defining the interface for Keyword objects.">Keyword</a>&amp; <a class="code" href="classCCfits_1_1HDU.html#a011149805ffb96031218739369863e17" title="return the associative array containing the HDU keywords so far read.">HDU::keyWord</a> (<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; keyname)<span class="keyword"> const</span>
<a name="l00935"></a>00935 <span class="keyword">  </span>{
<a name="l00936"></a>00936   std::map&lt;String,Keyword*&gt;::const_iterator key = m_keyWord.find(keyname);
<a name="l00937"></a>00937   <span class="keywordflow">if</span> (key == m_keyWord.end()) <span class="keywordflow">throw</span> <a class="code" href="classCCfits_1_1HDU_1_1NoSuchKeyword.html" title="exception to be thrown on seek errors for keywords.">HDU::NoSuchKeyword</a>(keyname);
<a name="l00938"></a>00938   <span class="keywordflow">return</span> *((*key).second);
<a name="l00939"></a>00939   }
<a name="l00940"></a>00940 
<a name="l00941"></a>00941   <span class="keyword">inline</span> FITSBase*&amp; <a class="code" href="classCCfits_1_1HDU.html#a3b547e893d364ebc570f2998a6b193bd" title="return reference to the pointer representing the FITSBase object containing the HDU...">HDU::parent</a> ()
<a name="l00942"></a>00942   {
<a name="l00943"></a>00943     <span class="keywordflow">return</span> m_parent;
<a name="l00944"></a>00944   }
<a name="l00945"></a>00945 
<a name="l00946"></a><a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081">00946</a>   <span class="keyword">inline</span> std::vector&lt; long &gt;&amp; <a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081" title="return the HDU data axis array.">HDU::naxes</a> ()
<a name="l00947"></a>00947   {
<a name="l00948"></a>00948     <span class="keywordflow">return</span> m_naxes;
<a name="l00949"></a>00949   }
<a name="l00950"></a>00950 
<a name="l00951"></a>00951   <span class="keyword">inline</span> <span class="keywordtype">long</span>&amp; <a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081" title="return the HDU data axis array.">HDU::naxes</a> (<span class="keywordtype">size_t</span> index)
<a name="l00952"></a>00952   {
<a name="l00953"></a>00953     <span class="keywordflow">return</span> m_naxes[index];
<a name="l00954"></a>00954   }
<a name="l00955"></a>00955 
<a name="l00956"></a>00956   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#a2e02db0df89451736c7863963170a081" title="return the HDU data axis array.">HDU::naxes</a> (<span class="keywordtype">size_t</span> index, <span class="keyword">const</span> <span class="keywordtype">long</span>&amp; value)
<a name="l00957"></a>00957   {
<a name="l00958"></a>00958     m_naxes[index] = value;
<a name="l00959"></a>00959   }
<a name="l00960"></a>00960 
<a name="l00961"></a>00961 } <span class="comment">// namespace CCfits</span>
<a name="l00962"></a>00962 <span class="preprocessor">#ifdef SPEC_TEMPLATE_IMP_DEFECT</span>
<a name="l00963"></a>00963 <span class="preprocessor"></span><span class="keyword">namespace </span>CCfits {
<a name="l00964"></a>00964 
<a name="l00965"></a>00965   <span class="keyword">inline</span> <span class="keywordtype">void</span> HDU::readKeyMS(<span class="keyword">const</span> String&amp; keyName, <span class="keywordtype">int</span> &amp; val)
<a name="l00966"></a>00966   {
<a name="l00967"></a>00967           <a class="code" href="classCCfits_1_1HDU.html#af0bbec3fe5f6b41ff4a95feff6600d57" title="move the fitsfile pointer to this current HDU.">makeThisCurrent</a>();
<a name="l00968"></a>00968           Keyword&amp; key = readKeyword(keyName);
<a name="l00969"></a>00969           key.value(val);
<a name="l00970"></a>00970   }
<a name="l00971"></a>00971 
<a name="l00972"></a>00972   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classCCfits_1_1HDU.html#ad366e9cd9cb0b64995c5c457dfe16e60" title="read a set of specified keywords of the same data type from the header of a disk...">HDU::readKeys</a>(std::vector&lt;String&gt;&amp; keyNames, std::vector&lt;String&gt;&amp; vals)
<a name="l00973"></a>00973   {
<a name="l00974"></a>00974           <span class="keywordtype">size_t</span> nRead = keyNames.size();
<a name="l00975"></a>00975 
<a name="l00976"></a>00976           std::list&lt;String&gt; valKeys;
<a name="l00977"></a>00977           std::list&lt;String&gt;      valList;
<a name="l00978"></a>00978           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; nRead; i++) valKeys.push_back(keyNames[i]);
<a name="l00979"></a>00979           <span class="comment">// read all the keys requested, rejecting those that don&apos;t exist.</span>
<a name="l00980"></a>00980 
<a name="l00981"></a>00981           readKeywords(valKeys);
<a name="l00982"></a>00982 
<a name="l00983"></a>00983           <span class="comment">// get the values of all of the requested keys, rejecting those of the</span>
<a name="l00984"></a>00984           <span class="comment">// wrong type.</span>
<a name="l00985"></a>00985 
<a name="l00986"></a>00986           String current;
<a name="l00987"></a>00987           std::list&lt;String&gt;::iterator it = valKeys.begin(); 
<a name="l00988"></a>00988           <span class="keywordflow">while</span> (it != valKeys.end())
<a name="l00989"></a>00989           {
<a name="l00990"></a>00990                   <span class="keywordflow">try</span>
<a name="l00991"></a>00991                   {
<a name="l00992"></a>00992                           m_keyWord[*it]-&gt;value(current);
<a name="l00993"></a>00993                           valList.push_back(current);       
<a name="l00994"></a>00994                           ++it;
<a name="l00995"></a>00995                   }
<a name="l00996"></a>00996                   <span class="keywordflow">catch</span> ( Keyword::WrongKeywordValueType )
<a name="l00997"></a>00997                   {
<a name="l00998"></a>00998                           it = valKeys.erase(it);                         
<a name="l00999"></a>00999                   }
<a name="l01000"></a>01000           }
<a name="l01001"></a>01001 
<a name="l01002"></a>01002           keyNames.erase(keyNames.begin(),keyNames.end());       
<a name="l01003"></a>01003 
<a name="l01004"></a>01004           <span class="keywordflow">if</span> (!valList.empty())
<a name="l01005"></a>01005           {
<a name="l01006"></a>01006                   <span class="keywordflow">if</span> (valList.size() != vals.size()) vals.resize(valList.size());
<a name="l01007"></a>01007 
<a name="l01008"></a>01008                   <span class="keywordtype">size_t</span> i=0;
<a name="l01009"></a>01009                                   std::list&lt;String&gt;::const_iterator it1 = valList.begin();
<a name="l01010"></a>01010                   <span class="keywordflow">for</span> ( ; it1 != valList.end(); ++it1,++i)
<a name="l01011"></a>01011                   {
<a name="l01012"></a>01012                           vals[i] = *it1;
<a name="l01013"></a>01013                   }
<a name="l01014"></a>01014                   <span class="keywordflow">for</span> ( it1= valKeys.begin(); it1 != valKeys.end(); ++it1)
<a name="l01015"></a>01015                   {
<a name="l01016"></a>01016                           keyNames.push_back(*it1);
<a name="l01017"></a>01017                   }
<a name="l01018"></a>01018           }
<a name="l01019"></a>01019 
<a name="l01020"></a>01020   }
<a name="l01021"></a>01021 }
<a name="l01022"></a>01022 <span class="preprocessor"> #endif</span>
<a name="l01023"></a>01023 <span class="preprocessor"></span>
<a name="l01024"></a>01024 
<a name="l01025"></a>01025 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Sep 9 11:59:41 2009 for CCfits by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>