Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
smear.h
Go to the documentation of this file.
1 
15 #ifndef SMEAR_INCLUDED
16 #define SMEAR_INCLUDED
17 
18 #include "defs.h"
19 #include "parameters.h"
20 #include "commonParameters.h"
21 #include "field_G.h"
22 #include "projection.h"
23 #include "bridgeIO.h"
24 
25 #ifdef USE_FACTORY
26 #include "factory.h"
27 #endif
28 
29 
31 
36 class Smear
37 {
38  protected:
40 
41  public:
43  : m_vl(CommonParameters::Vlevel()) {}
44 
45  virtual ~Smear() {}
46 
47  virtual void smear(Field_G&, const Field_G&) = 0;
48 
49  virtual void set_parameters(const Parameters&) = 0;
50 
52 
53 #ifdef USE_FACTORY
54  public:
55  typedef Smear *(*ProductCreator)(Projection *);
57 
58  static Smear *New(const IdentifierType& subtype, Projection *proj)
59  {
60  ProductCreator p = Factory::Find(subtype);
61 
62  return p ? (*p)(proj) : 0;
63  }
64 #endif
65 };
66 #endif