00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 // ANAG, LBNL 00012 00013 #ifndef _BASEEBFACEFACTORY_H_ 00014 #define _BASEEBFACEFACTORY_H_ 00015 00016 #include <cmath> 00017 #include <cstdlib> 00018 #include "Vector.H" 00019 #include "EBISLayout.H" 00020 #include "BaseEBFaceFAB.H" 00021 #include "DataIndex.H" 00022 #include "NamespaceHeader.H" 00023 00024 00025 /// Factory class to produce BaseEBFaceFABs. 00026 /** 00027 Factory class to produce BaseEBFaceFABs. 00028 This is needed for LevelData construction. 00029 */ 00030 template <class T> 00031 class BaseEBFaceFactory 00032 : public DataFactory<BaseEBFaceFAB<T> > 00033 { 00034 public: 00035 /// factory function. 00036 /** 00037 Creates a new baseebFacefab object 00038 and returns a pointer to it. Responsiblitly 00039 for calling operator 'delete' on this pointer is passed to the user. 00040 */ 00041 virtual BaseEBFaceFAB<T>* create(const Box& a_box, int a_ncomps, 00042 const DataIndex& a_dit) const; 00043 00044 /// 00045 /** 00046 create the factory with an ispace. calls full define function 00047 */ 00048 BaseEBFaceFactory(const EBISLayout& a_ebisl, int a_idir); 00049 00050 /// 00051 virtual ~BaseEBFaceFactory(); 00052 00053 private: 00054 EBISLayout m_ebisl; 00055 int m_idir; 00056 //disallowed constructors and all that 00057 BaseEBFaceFactory(const BaseEBFaceFactory& a_inputs) 00058 { 00059 MayDay::Error("disallowed constructor"); 00060 } 00061 BaseEBFaceFactory() 00062 { 00063 MayDay::Error("disallowed constructor"); 00064 } 00065 void operator=(const BaseEBFaceFactory& a_inputs) 00066 { 00067 MayDay::Error("disallowed constructor"); 00068 } 00069 00070 }; 00071 00072 #include "NamespaceFooter.H" 00073 #include "BaseEBFaceFactoryI.H" 00074 00075 #endif