00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef LOSR_Surface_hpp
00024 #define LOSR_Surface_hpp
00025
00026 #include <iostream>
00027
00028 namespace LOSR {
00029
00041 class Surface {
00042
00043 public:
00044 Surface(double inCurvature=0, double inIndex=0, double inAperture=0, double inThickness=0);
00045 ~Surface() {}
00046
00047 double getAperture() const {return mAperture;}
00048 double getCurvature() const {return mCurvature;}
00049 double getIndex() const {return mIndex;}
00050 double getThickness() const {return mThickness;}
00051 void read(std::istream& ioIs=std::cin);
00052 void setAperture(double inAperture) {mAperture=inAperture;}
00053 void setCurvature(double inCurvature) {mCurvature=inCurvature;}
00054 void setIndex(double inIndex) {mIndex=inIndex;}
00055 void setThickness(double inThickness) {mThickness=inThickness;}
00056 void write(std::ostream& ioOs=std::cout) const;
00057
00058 protected:
00059 double mCurvature;
00060 double mIndex;
00061 double mAperture;
00062 double mThickness;
00063
00064 };
00065
00066 }
00067
00068
00074 inline std::istream& operator>>(
00075 std::istream& ioIs,
00076 LOSR::Surface& outSurface
00077 )
00078 {
00079 outSurface.read(ioIs);
00080 return ioIs;
00081 }
00082
00088 inline std::ostream& operator<<(
00089 std::ostream& ioOs,
00090 const LOSR::Surface& inSurface
00091 )
00092 {
00093 inSurface.write(ioOs);
00094 return ioOs;
00095 }
00096
00097 #endif // LOSR_Surface_hpp