Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

MeshWriter.h

Go to the documentation of this file.
00001 #ifndef MESHWRITER_H
00002 #define MESHWRITER_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "Mesh.h"
00007 #include "TSFSmartPtr.h"
00008 
00009 
00010 namespace Sundance
00011 {
00012 
00013   using namespace TSF;
00014   using std::string;
00015 
00016   using std::ostream;
00017 
00018   /**
00019    * \ingroup LowLevelGeometry
00020    * Base class for MeshWriters
00021    */
00022 
00023   class MeshWriterBase
00024     {
00025     public:
00026       /** */
00027       MeshWriterBase() {;}
00028       /** */
00029       virtual ~MeshWriterBase() {;}
00030 
00031       /** */
00032       virtual void write(const string& filename,
00033                          const Mesh& mesh) const = 0;
00034 
00035     protected:
00036     };
00037 
00038   /**
00039    * \ingroup UserLevelGeometry
00040    * Objects that can write a mesh to a stream; define a subtype
00041    * for different output formats.
00042    */
00043 
00044   class MeshWriter
00045     {
00046     public:
00047       /** */
00048       MeshWriter() : ptr_(0){;}
00049       /** */
00050       MeshWriter(MeshWriterBase* ptr) : ptr_(ptr){;}
00051 
00052       /** */
00053       void write(const string& filename,
00054                  const Mesh& mesh) const {ptr_->write(filename, mesh);}
00055 
00056     private:
00057       TSFSmartPtr<MeshWriterBase> ptr_;
00058     };
00059 
00060 
00061 
00062 
00063 
00064 }
00065 #endif

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by