Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
about.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-whitespace: t -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2 
3  This file is part of the Feel library
4 
5  Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
6  Date: 2005-03-17
7 
8  Copyright (C) 2009 Université de Grenoble 1
9  Copyright (C) 2005,2006 EPFL
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 3.0 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 */
30 #ifndef __about_H
31 #define __about_H 1
32 
33 #include <vector>
34 #include <string>
35 
36 #include <feel/feelcore/parameter.hpp>
37 
38 
39 
40 
41 namespace Feel
42 {
43 class AboutPersonPrivate;
44 class AboutDataPrivate;
45 
65 {
66 public:
79  AboutPerson( std::string _name,
80  std::string _task,
81  std::string _emailAddress,
82  std::string _webAddress )
83  :
84  M_Name( _name ),
85  M_Task( _task ),
86  M_EmailAddress( _emailAddress ),
87  M_WebAddress( _webAddress )
88  {
89  }
94  AboutPerson()
95  :
96  M_Name(),
97  M_Task(),
98  M_EmailAddress(),
99  M_WebAddress()
100  {}
101 
106  AboutPerson( AboutPerson const& ap )
107  :
108  M_Name( ap.M_Name ),
109  M_Task( ap.M_Task ),
110  M_EmailAddress( ap.M_EmailAddress ),
111  M_WebAddress( ap.M_WebAddress )
112  {}
113 
114  AboutPerson& operator=( AboutPerson const& __ap )
115  {
116  if ( this != & __ap )
117  {
118  M_Name = __ap.M_Name;
119  M_Task = __ap.M_Task;
120  M_EmailAddress = __ap.M_EmailAddress;
121  M_WebAddress = __ap.M_WebAddress;
122  }
123 
124  return *this;
125  }
131  std::string name() const;
132 
138  std::string task() const;
139 
145  std::string emailAddress() const;
146 
152  std::string webAddress() const;
153 
154 private:
155  std::string M_Name;
156  std::string M_Task;
157  std::string M_EmailAddress;
158  std::string M_WebAddress;
159 
160  AboutPersonPrivate *d;
161 };
162 
174 {
175 public:
180  {
181  License_Custom = -2,
182  License_File = -1,
183  License_Unknown = 0,
184  License_GPL = 1,
185  License_GPL_V2 = 1,
186  License_GPL_V3 = 1,
187  License_LGPL = 2,
188  License_LGPL_V2 = 2,
189  License_LGPL_V3 = 2,
190  License_BSD = 3,
191  License_Artistic = 4,
192  License_QPL = 5,
193  License_QPL_V1_0 = 5
194  };
195 
196 public:
231  AboutData( const char* appName = "feel++",
232  const char* programName = "feel++",
233  const char* version = Info::versionString(),
234  const char* shortDescription = "",
235  int licenseType = License_GPL_V3,
236  const char* copyrightStatement = "",
237  const char* text = "",
238  const char* homePageAddress = "",
239  const char* bugsEmailAddress = "feelpp-devel@feelpp.org"
240  );
241 
242  AboutData( AboutData const& ad );
243 
244  ~AboutData();
245 
265  void addAuthor( std::string const & name,
266  std::string const & task=0,
267  std::string const & emailAddress=0,
268  std::string const & webAddress=0 );
269 
289  void addCredit( std::string const & name,
290  std::string const & task=0,
291  std::string const & emailAddress=0,
292  std::string const & webAddress=0 );
293 
309  void setLicenseText( std::string const & license );
310 
316  void setAppName( std::string const & appName );
317 
325  void setProgramName( const char* programName );
326 
332  void setVersion( const char* version );
333 
341  void setShortDescription( std::string const & shortDescription );
342 
348  void setLicense( LicenseKey licenseKey );
349 
358  void setCopyrightStatement( std::string const & copyrightStatement );
359 
367  void setOtherText( std::string const & otherText );
368 
376  void setHomepage( std::string const & homepage );
377 
384  void setBugAddress( std::string const & bugAddress );
385 
394  void setProductName( std::string const & name );
395 
396 
401  std::string appName() const;
402 
410  std::string productName() const;
415  std::string programName() const;
416 
421  std::string version() const;
422 
428  std::string shortDescription() const;
429 
435  std::string homepage() const;
436 
441  std::string bugAddress() const;
442 
447  const std::vector<AboutPerson>& authors() const;
448 
453  const std::vector<AboutPerson>& credits() const;
454 
459  std::string otherText() const;
460 
468  std::string license() const;
469 
474  std::string copyrightStatement() const;
475 
476 
477 
478 private:
479  std::string M_AppName;
480  std::string M_ProgramName;
481  std::string M_ProductName;
482  std::string M_Version;
483  std::string M_ShortDescription;
484  int M_LicenseKey;
485  std::string M_CopyrightStatement;
486  std::string M_OtherText;
487  std::string M_HomepageAddress;
488  std::string M_BugEmailAddress;
489  std::vector<AboutPerson> M_AuthorList;
490  std::vector<AboutPerson> M_CreditList;
491  std::string M_LicenseText;
492 
493  AboutDataPrivate *d;
494 };
495 
504 std::ostream& operator<<( std::ostream& os, AboutData const& about );
505 
506 BOOST_PARAMETER_FUNCTION(
507  (AboutData), about, tag,
508  ( required (name, * ) )
509  ( optional
510  ( author, *, "Feel++ Consortium" )
511  ( task, *, "developer" )
512  ( email, *, "feelpp-devel@feelpp.org" )
513  ( desc, *, "Feel++ application" )
514  ( license, (int), AboutData::License_GPL_V3 )
515  ( copyright, *, "Copyright (C) Feel++ Consortium" )
516  ( home, *, "http://www.feelpp.org" )
517  ( bugs, *, "feelpp-devel@feelpp.org" )
518  ( version, *, Feel::Info::versionString() )
519  ))
520 {
521  AboutData a( name, name, version, desc,
522  license, copyright, "", home, bugs );
523  a.addAuthor( author, task, email, home );
524  return a;
525 }
526 
527 }
528 #endif /* __about_H */

Generated on Fri Oct 25 2013 14:24:03 for Feel++ by doxygen 1.8.4