Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Rect.hh

Go to the documentation of this file.
00001 /*
00002 
00003     libpdf++: a C++ Free library to generate PDF file
00004     Copyright (C) 2002 Nestal Wan
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2.1 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00027 #ifndef __PDF_CORE_RECT_HEADER_INCLUDED__
00028 #define __PDF_CORE_RECT_HEADER_INCLUDED__
00029 
00030 #ifndef __PDF_CORE_OBJECT_HEADER_INCLUDED__
00031 #include "core/Object.hh"
00032 #endif
00033 
00034 #include <iosfwd>
00035 
00036 namespace pdf { namespace common {
00037 
00038 class CRect : public core::CObject
00039 {
00040 private :
00041     double m_values[4] ;
00042 
00043 public :
00044     CRect( ) ;
00045     CRect( double left, double right, double top, double bottom ) ;
00046     CRect( const CRect& rect ) ;
00047     ~CRect( ) ;
00048     
00049     CRect& operator=( const CRect& rect ) ;
00050     void Swap( CRect& rect ) ;
00051     void Assign( double left, double right, double top, double bottom ) ;
00052     
00053     bool operator==( const CRect& rect ) const ;
00054     bool operator!=( const CRect& rect ) const
00055         { return !operator==( rect ) ; }
00056 
00057     std::ostream& Write( std::ostream& os ) const ;
00058     core::CObject* Dup( ) const ;
00059 } ;
00060 
00061 } } // end of namespace
00062 
00063 namespace std
00064 {
00065     template <typename T>
00066     void swap( T& t1, T& t2 ) ;
00067     
00068     template <>
00069     void swap( pdf::common::CRect& r1, pdf::common::CRect& r2 ) ;
00070 }
00071 
00072 #endif

Generated on Sun Feb 2 09:16:05 2003 for libpdf++ by doxygen1.2.16