ChartRegistry.hpp

00001 #ifndef __FIBER_CHARTREGISTRY_HPP
00002 #define __FIBER_CHARTREGISTRY_HPP "Created 28.08.2006"
00003 
00004 #include <vector/MultiArray.hpp>
00005 #include "MemArray.hpp"
00006 
00007 namespace Fiber
00008 {
00009 
00010 template <class ChartType>
00011 struct  ChartRegistry
00012 {
00013 
00014 static  int RegisterTypes()
00015         {
00016         int     nTypes = 0;
00017                 nTypes += MemArrayAllocator<typename ChartType::point>::isRegistered() ; 
00018                 nTypes += MemArrayAllocator<typename ChartType::vector>::isRegistered() ; 
00019                 nTypes += MemArrayAllocator<typename ChartType::bivector>::isRegistered() ; 
00020                 nTypes += MemArrayAllocator<typename ChartType::trivector>::isRegistered() ; 
00021                 nTypes += MemArrayAllocator<typename ChartType::Metric>::isRegistered() ; 
00022 
00023                 return nTypes;
00024         }
00025 };
00026 
00027 extern FIELD_API int RegisterStandardCharts();
00028 
00029 }
00030 
00031 #endif /* __FIBER_CHARTREGISTRY_HPP */