Main Page   Class Hierarchy   Compound List   File List   Compound Members  

barray2d_uchar.cpp

00001 /*=============================================================================
00002         File: barray2d.cpp
00003      Purpose:
00004     Revision: $Id: barray2d_uchar.cpp,v 1.3 2003/05/15 02:34:55 philosophil Exp $
00005   Created by: Philippe Lavoie          (3 Oct, 1996)
00006  Modified by: 
00007 
00008  Copyright notice:
00009           Copyright (C) 1996-1997 Philippe Lavoie
00010  
00011           This library is free software; you can redistribute it and/or
00012           modify it under the terms of the GNU Library General Public
00013           License as published by the Free Software Foundation; either
00014           version 2 of the License, or (at your option) any later version.
00015  
00016           This library is distributed in the hope that it will be useful,
00017           but WITHOUT ANY WARRANTY; without even the implied warranty of
00018           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019           Library General Public License for more details.
00020  
00021           You should have received a copy of the GNU Library General Public
00022           License along with this library; if not, write to the Free
00023           Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024 =============================================================================*/
00025 
00026 #include "barray2d.cpp"
00027 
00028 namespace PLib {
00029 
00030   template <>
00031   inline void initMemory<unsigned char>(unsigned char* pointer, int size){
00032     initMemoryWithMemset(pointer,size);
00033   }
00034 
00035 
00036 ostream& 
00037 Basic2DArray<unsigned char>::print(ostream& os) const
00038 {
00039   int i, j;
00040   const int r = rows() ;
00041   const int c = cols();
00042   
00043   if ( by_columns )
00044     for (j = 0; j < c; j++)
00045       {
00046         for (i = 0; i < r; i++) {
00047           os <<  setw(width) << (int)elem(i,j) << ' ';
00048         }
00049         os << '\n';
00050       }  
00051   else
00052     for (i = 0; i < r; i++)
00053       {
00054         for (j = 0; j < c; j++){
00055           os <<  setw(width) << (int)elem(i,j) << ' ';
00056         }
00057         os << '\n';
00058       }
00059 
00060   return os;
00061 }
00062 
00063 
00064 
00065 #ifdef NO_IMPLICIT_TEMPLATES
00066 
00067 template class Basic2DArray<unsigned char> ;
00068 template void initBasic2DArray<unsigned char>(Basic2DArray<unsigned char>&,const int,const int) ;
00069 template void resizeKeepBasic2DArray<unsigned char>(Basic2DArray<unsigned char>&,const int,const int) ;
00070 template istream& operator>>(istream& is, Basic2DArray<unsigned char>& ary);
00071 template ostream& operator<<(ostream& os, const Basic2DArray<unsigned char>& ary);
00072 
00073 
00074 #endif
00075 
00076 }

Generated on Tue Jun 24 13:26:54 2003 for NURBS++ by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002