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

boss_duration.h

Go to the documentation of this file.
00001 /* boss_duration.h    $Revision: 1.4 $ $Date: 2005/12/10 20:33:54 $
00002    Copyright (C) 2001 University of Bonn.
00003    http://www.ikp.uni-bonn.de/boss
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009 
00010    This program 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
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA  02111-1307, USA.
00019 */
00020 
00021 #ifndef BOSS_DURATION_H
00022 #define BOSS_DURATION_H
00023 
00024 #include "boss_utility/boss_module.h"
00025 #include "boss_utility/boss_config.h"
00026 #include "boss_utility/dom_tools.h"
00027 #include "boss_cartreader/boss_cartreader.h"
00028 #include <sstream>
00029 #include <math.h>
00030 
00031 
00042 
00043 struct Duration {
00044   unsigned pdur;
00045   unsigned hdur1;
00046   unsigned hdur2;
00047   Duration() : pdur(0), hdur1(0), hdur2(0) {};
00048 };
00049 
00054 class BOSS_Duration : public BOSS::Module {
00055  protected:
00056   BOSS_CartReader * tree;
00057 //  BOSS::DOMNodeVector wlist;
00058 //   BOSS::DOMNodeVector stmp;
00059 //   BOSS::DOMNodeVector ptmp;
00060 //   BOSS::DOMNodeVector htmp;
00061   virtual void set_features(xercesc::DOMNode* sentence) const=0;
00062   void add_durations(xercesc::DOMNode* sentence) const;
00063   virtual Duration find_dur(const xercesc::DOMElement* element,
00064                             BOSS::DOMNodeVector & wlist,
00065                             BOSS::DOMNodeVector & stmp,
00066                             BOSS::DOMNodeVector & ptmp,
00067                             BOSS::DOMNodeVector & htmp,
00068                             unsigned w, unsigned s, unsigned p) const=0;
00069 //   { 
00070 //     Duration dur; return dur; 
00071 //   };
00072         
00073  public:
00074   BOSS_Duration(BOSS::Config & __cl, MySQL_Handler * __data_base);
00075   virtual ~BOSS_Duration();
00076   virtual void operator () (xercesc::DOMNode* sentence);
00077 };
00078 
00079  // end of boss_duration group
00081 #endif
00082 
00083 

Generated on Tue Dec 20 23:14:37 2005 for BOSS by doxygen 1.3.6