Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

paboutdata.h

Go to the documentation of this file.
00001 /*
00002  *   P::Classes - Portable C++ Application Framework
00003  *   Copyright (C) 2000-2003  Christian Prochnow <cproch@seculogix.de>
00004  *
00005  *   This library is free software; you can redistribute it and/or
00006  *   modify it under the terms of the GNU Lesser General Public
00007  *   License as published by the Free Software Foundation; either
00008  *   version 2 of the License, or (at your option) any later version.
00009  *
00010  *   This library is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *   Lesser General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU Lesser General Public
00016  *   License along with this library; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 #ifndef _paboutdata_h_
00021 #define _paboutdata_h_
00022 
00023 #include <pclasses/pexport.h>
00024 #include <utility>
00025 #include <string>
00026 #include <list>
00027 
00032 namespace P {
00033 
00035 
00040 class PCORE_EXPORT AboutData {
00041   public:
00042 
00044     enum license_t {
00045       GPL,      
00046       LGPL,     
00047       QPL,      
00048       Custom    
00049     };
00050 
00052     typedef std::pair<std::string, std::string> author_t;
00053 
00055     typedef std::pair<std::string, std::string> credit_t;
00056 
00058 
00066     AboutData(const std::string& appName, const std::string& appDesc,
00067               const std::string& version, const std::string& copyright, license_t lic);
00068     ~AboutData();
00069 
00071     inline const std::string& name() const
00072     { return m_appName; }
00073 
00075     inline const std::string& description() const
00076     { return m_appDesc; }
00077 
00079     inline const std::string& version() const
00080     { return m_version; }
00081 
00083     inline const std::string& copyright() const
00084     { return m_copyright; }
00085 
00087     inline license_t license() const
00088     { return m_license; }
00089 
00091     void addAuthor(const std::string& name, const std::string& email);
00092 
00094     inline const std::list<author_t>& authors() const
00095     { return m_authors; }
00096 
00098     void addCredit(const std::string& name, const std::string& email);
00099 
00101     inline const std::list<credit_t>& credits() const
00102     { return m_credits; }
00103 
00104   private:
00105     std::string         m_appName;
00106     std::string         m_appDesc;
00107     std::string         m_version;
00108     std::string         m_copyright;
00109     license_t           m_license;
00110     std::list<author_t> m_authors;
00111     std::list<credit_t> m_credits;
00112 };
00113 
00114 }
00115 
00116 #endif

Generated on Fri Mar 12 21:08:30 2004 for P::Classes by doxygen 1.3.3