Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkFEMLoadTest.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFEMLoadTest.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-01-30 21:10:19 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkFEMLoadTest_h
00019 #define __itkFEMLoadTest_h
00020 
00021 #include "itkFEMLoadElementBase.h"
00022 
00023 namespace itk {
00024 namespace fem {
00025 
00034 template<class TClass>
00035 class LoadTest : public LoadElement
00036 {
00037   FEM_CLASS(LoadTest,LoadElement)
00038 public:
00039 
00043   LoadTest() {}
00044 
00048   TClass data;
00049 
00050   virtual void Read( std::istream& f, void* info )
00051     {
00052     Superclass::Read(f,info);
00053     }
00054   void Write( std::ostream& f ) const
00055     {
00056     // call the parent's write function
00057     Superclass::Write(f);
00058     }
00059 
00060 private:
00063   static const int DummyCLID;
00064 
00065 };
00066 
00067 // Provide the templated code for CLID function, that is 
00068 // otherwise generated automaticly with FEM_CLASS_REGISTER
00069 // macro.
00070 template<class TClass>
00071 int LoadTest<TClass>::CLID(void) 
00072 {
00073   static const int CLID_ = FEMOF::Register( LoadTest::NewB, (std::string("LoadTest(")
00074                 +typeid(TClass).name()+")").c_str());
00075   return CLID_;
00076 }
00077 
00078 // Make sure that the class is registered with FEMObjectFactory
00079 // by calling CLID() static member function each time the class
00080 // is instantiated for a specific template parameter TClass.
00081 template<class TClass>
00082 const int LoadTest<TClass>::DummyCLID=LoadTest<TClass>::CLID();
00083 
00084 }} // end namespace itk::fem
00085 
00086 #endif // #ifndef __itkFEMLoadTest_h
00087 

Generated at Fri Apr 16 18:19:17 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000