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

DocInfo.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_DOC_INFO_HEADER_INCLUDED__
00028 #define __PDF_DOC_INFO_HEADER_INCLUDED__
00029 
00030 #include <string>
00031 
00032 namespace pdf {
00033 
00034 namespace core
00035 {
00036     class CDictionary ;
00037 }
00038 
00045 class CDocInfo
00046 {
00047 private :
00048     std::string     m_title ;
00049     std::string     m_author ;
00050     std::string     m_subject ;
00051     std::string     m_keywords ;
00052     std::string     m_creator ;
00053     std::string     m_producer ;
00054 
00055 public :
00056     explicit CDocInfo( const std::string& title = std::string( ),
00057                        const std::string& author = std::string( ),
00058                        const std::string& subject = std::string( ),
00059                        const std::string& keywords = std::string( ),
00060                        const std::string& creator = std::string( ),
00061                        const std::string& producer = std::string( ) ) ;
00062     ~CDocInfo( ) ;
00063     
00064     // attributes
00065     const std::string& Title( ) const { return m_title ; }
00066     const std::string& Author( ) const { return m_author ; }
00067     const std::string& Subject( ) const { return m_subject ; }
00068     const std::string& Keywords( ) const { return m_keywords ; }
00069     const std::string& Creator( ) const { return m_creator ; }
00070     const std::string& Producer( ) const { return m_producer ; }
00071     void Title( const std::string& title ) { m_title = title ; }
00072     void Author( const std::string& author ) { m_author = author ; }
00073     void Subject( const std::string& subject ) { m_subject = subject ; }
00074     void Keywords( const std::string& keywords ) { m_keywords = keywords ; }
00075     void Creator( const std::string& creator ) { m_creator = creator ; }
00076     void Producer( const std::string& producer ) { m_producer = producer ; }    
00077     
00078     bool Empty( ) const ;
00079     
00080     // operations
00081     CDocInfo& operator=( const CDocInfo& info ) ;
00082     void Swap( CDocInfo& info ) ;
00083     void Write( core::CDictionary *dict ) const ;
00084 } ;
00085 
00086 } // end of namespace
00087 
00088 #endif

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