00001 /*
00002 * $Id: OpticalSystem_8hpp-source.html,v 1.1.1.1 2002/06/12 22:58:44 cgagne Exp $
00003 *
00004 * LOSR -- Library for Optical Systems Raytracing
00005 * Copyright (C) 2001 by Christian Gagné and Julie Beaulieu
00006 *
00007 * This library is free software; you can redistribute it and/or
00008 * modify it under the terms of the GNU Lesser General Public
00009 * License as published by the Free Software Foundation; either
00010 * version 2.1 of the License, or (at your option) any later version.
00011 *
00012 * This library is distributed in the hope that it will be useful,
00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015 * Lesser General Public License for more details.
00016 *
00017 * You should have received a copy of the GNU Lesser General Public
00018 * License along with this library; if not, write to the Free Software
00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00020 *
00021 */
00022
00023 #ifndef LOSR_OpticalSystem_hpp
00024 #define LOSR_OpticalSystem_hpp
00025
00026 #include <iostream>
00027 #include <vector>
00028
00029 #include "losr/Surface.hpp"
00030
00031 namespace LOSR {
00032
00042 class OpticalSystem : public std::vector<Surface> {
00043
00044 public:
00045 OpticalSystem(unsigned int inSize=0);
00046 ~OpticalSystem() { }
00047
00048 void read(std::istream& ioIs=std::cin);
00049 void write(std::ostream& ioOs=std::cout) const;
00050 bool validate();
00051
00052 };
00053
00054 }
00055
00056
00063 inline std::istream& operator>>(
00064 std::istream& ioIs,
00065 LOSR::OpticalSystem& outOpSystem
00066 )
00067 {
00068 outOpSystem.read(ioIs);
00069 return ioIs;
00070 }
00071
00078 inline std::ostream& operator<<(
00079 std::ostream& ioOs,
00080 const LOSR::OpticalSystem& inOpSystem
00081 )
00082 {
00083 inOpSystem.write(ioOs);
00084 return ioOs;
00085 }
00086
00087 #endif // LOSR_OpticalSystem_hpp
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001