Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

DatabaseWriteNative.h

Go to the documentation of this file.
00001 #ifndef Impala_Util_DatabaseWriteNative_h
00002 #define Impala_Util_DatabaseWriteNative_h
00003 
00004 #include "Util/Database.h"
00005 #include "Basis/Endian.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Util
00010 {
00011 
00012 
00013 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00014     // replaced with File::WriteNative
00015 template <class Iterator>
00016 void
00017 DatabaseWriteNative(String fileName, Database* db, Iterator begin, Iterator end)
00018 {
00019     typedef typename Iterator::value_type elem_type;
00020 
00021     IOBuffer* buf = db->GetIOBuffer(fileName, false, false, "tmp");
00022     for (Iterator it=begin ; it!=end ; it++)
00023     {
00024         elem_type d = *it;
00025         EndianSwap(&d);
00026         buf->Write(&d, sizeof(d));
00027     }
00028     delete buf;
00029 }
00030 #endif // REPOSITORY_USED
00031 
00032 } // namespace Util
00033 } // namespace Impala
00034 
00035 #endif

Generated on Fri Mar 19 09:31:46 2010 for ImpalaSrc by  doxygen 1.5.1