ColumnCreator.h

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

Generated on Thu Jun 28 11:49:08 2007 for CCfits by  doxygen 1.4.7