assignShiftProcessor.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: assignShiftProcessor.h,v 1.24 2005/12/23 17:01:55 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_NMR_ASSIGNSHIFTPROCESSOR_H
00008 #define BALL_NMR_ASSIGNSHIFTPROCESSOR_H
00009 
00010 #ifndef BALL_NMR_SHIFT_MODULE_H
00011 # include <BALL/NMR/shiftModule.h>
00012 #endif
00013 
00014 #ifndef BALL_DATATYPE_STRINGHASHMAP_H
00015 # include <BALL/DATATYPE/stringHashMap.h>
00016 #endif
00017 
00018 #ifndef BALL_FORMAT_NMRSTARFILE_H
00019 # include <BALL/FORMAT/NMRStarFile.h>
00020 #endif
00021 
00022 #include <vector>
00023 
00024 namespace BALL 
00025 {
00026   class FragmentDB;
00027 
00032   class BALL_EXPORT AssignShiftProcessor
00033     : public UnaryProcessor<Composite>
00034   {
00035     public:
00036     
00040 
00041     BALL_CREATE(AssignShiftProcessor)
00042 
00043     
00045     AssignShiftProcessor();
00046 
00049     AssignShiftProcessor(const vector<NMRAtomData>& atom_data);
00050 
00053     AssignShiftProcessor(const AssignShiftProcessor& processor);
00054 
00057     virtual ~AssignShiftProcessor();
00058     
00060 
00063     
00066     virtual bool start();
00067     
00070     virtual Processor::Result operator () (Composite& composite);
00071 
00073 
00076 
00078     void setFragmentDB(const FragmentDB* db);
00079 
00081     const FragmentDB* getFragmentDB();
00082 
00085     bool isValid() const;
00086 
00088     
00089     protected:
00090     
00091     StringHashMap<float> shift_table_;
00092     const std::vector<NMRAtomData>& atom_data_;
00093     const Molecule* molecule_;
00094     Position number_of_fragment_;
00095     FragmentDB* fragment_db_;
00096   };
00097 
00098 # ifndef BALL_NO_INLINE_FUNCTIONS
00099 #   include <BALL/NMR/assignShiftProcessor.iC>
00100 # endif
00101   
00102 } // namespace BALL
00103 
00104 #endif // BALL_NMR_ASSIGNSHIFTPROCESSOR_H