WoSentry.h

Go to the documentation of this file.
00001 /* WoSentry.h */
00002 /* entries in a web-of-science file */
00003 
00004 /* Copyright (C) 2002, Bernd Speiser */
00005 /* This file is part of WoStransform.
00006 
00007 WoStransform is free software; you can redistribute it and/or
00008 modify it under the terms of the GNU General Public License
00009 as published by the Free Software Foundation; either version 2
00010 of the License, or (at your option) any later version.
00011 
00012 WoStransform 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
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with this program; if not, write to the Free Software
00019 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00020 02111-1307, USA.
00021 */
00022 
00023 #ifndef _WoSentry_h
00024 #define _WoSentry_h
00025 
00026 #include <cstring>
00027 #include <iostream>
00028 #include <fstream>
00029 
00030 /* declaration of WoSentry base class */
00031 
00032 namespace WoStransform {
00033   class WoSentry
00034     {
00035       protected:
00036         std::string text;
00037 
00038         std::string title;
00039         std::string begin_page;
00040         std::string end_page;
00041         std::string printing_year;
00042         std::string authors;
00043 
00044         std::string key;
00045   
00046       public:
00047         WoSentry ();
00048   
00049         WoSentry (std::string);
00050   
00051         virtual ~WoSentry ();
00052   
00053         virtual WoSentry & operator<< (const std::string);
00054   
00055         virtual void print (void) const;
00056 
00057         virtual void deconstruct (void);
00058   
00059         virtual std::ofstream & output (std::ofstream &);
00060 
00061         void format_authors (void);
00062   
00063     };
00064   
00065   /* definition of inline functions for WoSentry */
00066   
00067   inline WoSentry::WoSentry (void) {text = "";}
00068   
00069   inline WoSentry::WoSentry (std::string textstring) {text = textstring;}
00070   
00071   inline WoSentry::~WoSentry (void) {};
00072   
00073   inline WoSentry & WoSentry::operator<< (const std::string newstring) 
00074                                        {text = newstring; return *this;}
00075   
00076   inline void WoSentry::print (void) const 
00077                                  {std::cout << "`" << text << "´" << std::endl;}
00078   
00079   void WoSentry::deconstruct (void) {};
00080 
00081   std::ofstream & WoSentry::output (std::ofstream &) {};
00082 
00083   /* declaration of classes derived from WoSentry base class */
00084   
00085   class JournalWoSentry : public WoSentry
00086     {
00087       private:
00088         std::string journal;
00089         std::string volume;
00090 
00091       public:
00092         JournalWoSentry ();
00093   
00094         JournalWoSentry (std::string);
00095   
00096         ~JournalWoSentry ();
00097   
00098         JournalWoSentry & operator<< (const std::string);
00099 
00100         void deconstruct (void);
00101 
00102         std::ofstream & output (std::ofstream &);
00103        
00104     };
00105   
00106   /* definition of inline functions for JournalWoSentry */
00107   
00108   inline JournalWoSentry::JournalWoSentry (void) {text = "";}
00109   
00110   inline JournalWoSentry::JournalWoSentry (std::string textstring) 
00111     : WoSentry (textstring) {};
00112   
00113   inline JournalWoSentry::~JournalWoSentry (void) {};
00114   
00115   inline JournalWoSentry & JournalWoSentry::operator<< 
00116                                                 (const std::string newstring)
00117                                        {text = newstring; return *this;}
00118 
00119   class BookinseriesWoSentry : public WoSentry
00120     {
00121       private:
00122         std::string series;
00123         std::string volume;
00124 
00125       public:
00126         BookinseriesWoSentry ();
00127   
00128         BookinseriesWoSentry (std::string);
00129   
00130         ~BookinseriesWoSentry ();
00131   
00132         BookinseriesWoSentry & operator<< (const std::string);
00133 
00134         void deconstruct (void);
00135 
00136         std::ofstream & output (std::ofstream &);
00137        
00138     };
00139   
00140   /* definition of inline functions for BookinseriesWoSentry */
00141   
00142   inline BookinseriesWoSentry::BookinseriesWoSentry (void) {text = "";}
00143   
00144   inline BookinseriesWoSentry::BookinseriesWoSentry (std::string textstring) 
00145     : WoSentry (textstring) {};
00146   
00147   inline BookinseriesWoSentry::~BookinseriesWoSentry (void) {};
00148   
00149   inline BookinseriesWoSentry & BookinseriesWoSentry::operator<< 
00150                                                 (const std::string newstring)
00151                                        {text = newstring; return *this;}
00152 
00153 }
00154 
00155 #endif /* _WoSentry_h */

Generated on Tue Mar 24 20:31:33 2009 for WoStransform by  doxygen 1.5.3