/* Example programs from the book Scientific and Engineering Programming in C++: An Introduction with Advanced Techniques and Examples, Addison-Wesley, 1994. (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES CORPORATION 1994. ALL RIGHTS RESERVED. See README file for further details. */ #ifndef FortranArray2dH #define FortranArray2dH #include "Array/ConcreteFortranArray2d.h" #include "Array/InterfacedArray2d.h" template class FortranArray2d : public InterfacedArray2d< ConcreteFortranArray2d > { public: FortranArray2d(Subscript n0, Subscript n1) : InterfacedArray2d< ConcreteFortranArray2d >(n0, n1) {} FortranArray2d(const ConstArray2d& a) : InterfacedArray2d< ConcreteFortranArray2d >(a) {} virtual void reshape(const SubscriptArray<2>& s) { the_concrete.reshape(s); } virtual Array2d& operator=(const ConstArray2d& rhs) { return InterfacedArray2d< ConcreteFortranArray2d >::operator=(rhs); } virtual Array2d& operator=(const T& rhs) { return InterfacedArray2d< ConcreteFortranArray2d >::operator=(rhs); } virtual const T* firstDatum() const { return the_concrete.firstDatum(); } virtual T* firstDatum() { return the_concrete.firstDatum(); } }; #endif