36            template <
typename S, 
typename T> 
 
   38            fill(std::vector<S>& outArray, 
const std::vector<T>& inArray, 
size_t first, 
size_t last)
 
   41                        int range = last - first + 1;
 
   42                        if (outArray.size() != 
static_cast<size_t>(range)) outArray.resize(range);
 
   43                        for (
size_t j = first - 1; j < last; ++j)
 
   45                                outArray[j - first + 1] = 
static_cast<S
>(inArray[j]);
 
   51            template <
typename S, 
typename T> 
 
   52            void fill(std::valarray<S>& outArray, 
const std::vector<T>& inArray, 
size_t first, 
size_t last)
 
   55                    int range = last - first + 1;
 
   56                    if (outArray.size() != 
static_cast<size_t>(range)) outArray.resize(range); 
 
   57                        for (
size_t j = first - 1; j < last; ++j)
 
   59                                outArray[j - first + 1] = 
static_cast<S
>(inArray[j]);
 
   65            template <
typename S, 
typename T> 
 
   66            void fill(std::valarray<S>& outArray, 
const std::valarray<T>& inArray)
 
   68                         size_t n = inArray.size();
 
   69                     if (outArray.size() !=  n) outArray.resize(n);           
 
   70                         for (
size_t j = 0;j < n; ++j) outArray[j] 
 
   71                                 = 
static_cast<S
>(inArray[j]);
 
   74#ifdef TEMPLATE_AMBIG7_DEFECT 
   75            template <
typename S, 
typename T> 
 
   76            void fillMSva(std::vector<S>& outArray, 
const std::valarray<T>& inArray)
 
   78                         size_t n = inArray.size();
 
   79                     if (outArray.size() !=  n) outArray.resize(n);           
 
   80                         for (
size_t j = 0;j < n; ++j) outArray[j] 
 
   81                                 = 
static_cast<S
>(inArray[j]);
 
   85            template <
typename S, 
typename T> 
 
   86            void fill(std::vector<S>& outArray, 
const std::valarray<T>& inArray)
 
   88                         size_t n = inArray.size();
 
   89                     if (outArray.size() !=  n) outArray.resize(n);           
 
   90                         for (
size_t j = 0;j < n; ++j) outArray[j] 
 
   91                                 = 
static_cast<S
>(inArray[j]);
 
  100            fill(std::vector<string>& outArray, 
const std::vector<T>& inArray, 
size_t first, 
size_t last)
 
  104                        throw InvalidConversion(errorMessage(outArray,inArray),
false);
 
  108            template <
typename T> 
 
  109            void fill(std::vector<T>& outArray, 
const std::vector<string>& inArray, 
size_t first, 
size_t last)
 
  113                        throw InvalidConversion(errorMessage(outArray,inArray),
false);
 
  119                template<
typename S, 
typename T>
 
  120                string errorMessage( 
const S& out, 
const T& in)
 
  123                    std::ostrstream errMsg;
 
  125                        std::ostringstream errMsg;
 
  127                        errMsg << 
" Error: no conversion from " << 
typeid(in).name() << 
" to " 
  128                               << 
typeid(out).name() << std::endl;
 
Namespace enclosing all CCfits classes and globals definitions.
Definition AsciiTable.cxx:26
 
FITSUtil is a namespace containing functions used internally by CCfits, but which might be of use for...