rl_DielectricPODArray.h

00001 #ifndef rl_DielectricPODArray_h_INCLUDED
00002 #define rl_DielectricPODArray_h_INCLUDED
00003 
00004 // File:   rl_DielectricPODArray.h
00005 // Author: Terry Gaetz
00006 
00007 /* --8<--8<--8<--8<--
00008  *
00009  * Copyright (C) 2006, 2007 Smithsonian Astrophysical Observatory
00010  *
00011  * This file is part of rl_raylib
00012  *
00013  * rl_raylib is free software; you can redistribute it and/or
00014  * modify it under the terms of the GNU General Public License
00015  * as published by the Free Software Foundation; either version 2
00016  * of the License, or (at your option) any later version.
00017  *
00018  * rl_raylib is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program; if not, write to the 
00025  *       Free Software Foundation, Inc. 
00026  *       51 Franklin Street, Fifth Floor
00027  *       Boston, MA  02110-1301, USA
00028  *
00029  * -->8-->8-->8-->8-- */
00030 
00031 /****************************************************************************
00032  * Note       : (1-alpha) is real part of complex dielectric constant
00033  *              (-gamma)  is imag part of complex dielectric constant
00034  */
00035 
00036 #include <cstddef>                   // size_t
00037 #include <rl_raylib/rl_Traits.h>     // rl_Traits::rl_DielectricPOD
00038 #include <rl_raylib/rl_Exception.h>  // rl_Exception
00039 
00040 //########################################################################
00041 // rl_DielectricPODArray
00042 //########################################################################
00043 //
00057 class rl_DielectricPODArray
00058 {
00059 protected:
00060  
00062   size_t                       nelts_;
00064   rl_Traits::rl_DielectricPOD* data_;
00065 
00066 public:
00067 
00071  ~rl_DielectricPODArray();
00072 
00079   rl_DielectricPODArray();
00080 
00089   rl_DielectricPODArray( size_t        nelts, 
00090                          double const* energy,
00091                          double const* alpha,
00092                          double const* gamma )
00093     throw ( rl_Exception );
00094 
00101   rl_DielectricPODArray( size_t                       nelts, 
00102                          rl_Traits::rl_DielectricPOD* diel
00103                        )
00104     throw ( rl_Exception );
00105 
00118   void
00119   init( size_t        nelts, 
00120         double const* energy,
00121         double const* alpha,
00122         double const* gamma );
00123 
00134   void
00135   init( size_t                       nelts, 
00136         rl_Traits::rl_DielectricPOD* diel );
00137 
00143   size_t num_elts() const;
00144 
00150   rl_Traits::rl_DielectricPOD const* const_data_ptr() const;
00151 
00165   void cprint_on( std::FILE* of, char const pre[] = "",
00166                                  char const pst[] = "" ) const;
00167 };
00168 
00169 inline size_t rl_DielectricPODArray::
00170 num_elts() const
00171 { return nelts_; }
00172 
00173 inline rl_Traits::rl_DielectricPOD const* rl_DielectricPODArray::
00174 const_data_ptr() const
00175 { return data_; }
00176 
00177 // rl_DielectricPODArray_h_INCLUDED
00178 #endif

Generated on Mon Nov 3 18:15:05 2008 for rl_raylib by  doxygen 1.5.6