ColumnCreator.h

00001 //      This is version 1.6 release dated Nov 2006
00002 //      Astrophysics Science Division,
00003 //      NASA/ Goddard Space Flight Center
00004 //      HEASARC
00005 //      http://heasarc.gsfc.nasa.gov
00006 //      e-mail: ccfits@legacy.gsfc.nasa.gov
00007 //
00008 //      Original author: Ben Dorman, L3-Communications EER Systems Inc.
00009 
00010 #ifndef COLUMNCREATOR_H
00011 #define COLUMNCREATOR_H 1
00012 #include <iostream>
00013 
00014 // ColumnVectorData
00015 #include "ColumnVectorData.h"
00016 // ColumnData
00017 #include "ColumnData.h"
00018 
00019 namespace CCfits {
00020   class Table;
00021   class Column;
00022 
00023 } // namespace CCfits
00024 #include <string>
00025 #include <vector>
00026 
00027 
00028 namespace CCfits {
00029 
00030 
00031 
00032   class ColumnCreator 
00033   {
00034 
00035     public:
00036         ColumnCreator (Table* p);
00037         virtual ~ColumnCreator();
00038 
00039         void reset ();
00040         //      getColumn is a calling function for MakeColumn, i.e.
00041         //      it specifies a column in an existing file to be  "got"
00042         Column * getColumn (int number, const String& name, const String& format, const String& unit = "");
00043         //      createColumn is for specifying input data for creating
00044         //      new columns in tables.
00045         Column * createColumn (int number, ValueType type, const String &name, const String &format, const String &unit, long repeat = 1, long width = 1, double scaleFactor = 1., double offset = 0, const String &comment = "");
00046 
00047       // Additional Public Declarations
00048 
00049     protected:
00050         //      MakeColumn is a virtual function that makes a Column
00051         //      object with appropriate data member from an existing
00052         //      column in a file.
00053         virtual Column * MakeColumn (const int index, const String &name, const String &format, const String &unit, const long repeat, const long width, const String &comment = "", const int decimals = 0);
00054 
00055       // Additional Protected Declarations
00056 
00057     private:
00058         void getScaling (int index, int& type, long& repeat, long& width, double& tscale, double& tzero);
00059         const Table* parent () const;
00060         void parent (Table* value);
00061 
00062       // Additional Private Declarations
00063 
00064     private: //## implementation
00065       // Data Members for Class Attributes
00066         Column *m_column;
00067         Table* m_parent;
00068 
00069       // Additional Implementation Declarations
00070 
00071   };
00072 
00073   // Class CCfits::ColumnCreator 
00074 
00075   inline void ColumnCreator::reset ()
00076   {
00077     m_column = 0;
00078   }
00079 
00080   inline const Table* ColumnCreator::parent () const
00081   {
00082     return m_parent;
00083   }
00084 
00085   inline void ColumnCreator::parent (Table* value)
00086   {
00087     m_parent = value;
00088   }
00089 
00090 } // namespace CCfits
00091 
00092 
00093 #endif

Generated on Fri Nov 3 17:09:04 2006 for CCfits by  doxygen 1.4.7