VectorRegistry.hpp

00001 
00002 //
00003 // $Id: VectorRegistry.hpp,v 1.5 2007/11/22 10:32:36 werner Exp $
00004 //
00006 #ifndef __FIBER_VECTORREGISTRY_HPP
00007 #define __FIBER_VECTORREGISTRY_HPP "Created 28.08.2006"
00008 
00009 #include <vector/MultiArray.hpp>
00010 #include "MemArray.hpp"
00011 
00012 namespace Fiber
00013 {
00014 
00015 template <class T>
00016 struct  VectorRegistry
00017 {
00018         template <int N>
00019         struct  MultiplicityRegistry
00020         {
00021         static  int RegisterVectorTypes()
00022                 {
00023                 int     nTypes = 0; 
00024                         nTypes += MemArrayAllocator<FixedArray<T,N> >::isRegistered() ; 
00025                         nTypes += MemArrayAllocator<Eagle::Vector<T,N> >::isRegistered() ; 
00026         //              nTypes += MemArrayAllocator<VVector<N,T> >::isRegistered() ; 
00027                         return nTypes;
00028                 }
00029         };
00030 
00031 static  int RegisterVectorTypes()
00032         {
00033         int     nTypes = 0; 
00034                 nTypes += MemArrayAllocator<T >::isRegistered() ; 
00035                 nTypes += MultiplicityRegistry<2>::RegisterVectorTypes(); 
00036                 nTypes += MultiplicityRegistry<3>::RegisterVectorTypes(); 
00037                 nTypes += MultiplicityRegistry<4>::RegisterVectorTypes(); 
00038         //      nTypes += MultiplicityRegistry<5>::RegisterVectorTypes(); 
00039                 nTypes += MultiplicityRegistry<6>::RegisterVectorTypes();
00040 
00041                 return nTypes;
00042         }
00043 };
00044 
00045 extern FIELD_API int RegisterStandardMemArrayTypes();
00046 
00047 }
00048 
00049 #endif /* __FIBER_VECTORREGISTRY_HPP */