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

template<class NativeType>
void Impala::Util::IOBuffer::DoNativeTypeRead ( NativeType *  ptr  )  [inline, protected]

Reimplemented in Impala::Util::IOBufferChannel, and Impala::Util::IOBufferFile.

Definition at line 484 of file IOBuffer.h.

References GetBuffer(), GetPosition(), and SetPosition().

Referenced by Impala::Util::IOBufferFile::DoNativeTypeRead(), and NativeTypeRead().

00485     {
00486         String fs = NativeTypeFormat<NativeType>(0);
00487         /* This seems to copy all of the remaining buffer :-(
00488         const char* start = (const char*) (GetBuffer() + GetPosition());
00489         sscanf(start, fs.c_str(), ptr);
00490         int i = 0;
00491         while (start[i] != ' ')
00492             i++;
00493         */
00494         char buf[1024];
00495         unsigned char* src = GetBuffer() + GetPosition();
00496         Int64 i = 0;
00497         while (src[i] != ' ')
00498             buf[i++] = src[i];
00499         buf[i] = ' ';
00500         sscanf(buf, fs.c_str(), ptr);
00501         SetPosition(GetPosition() + i + 1);
00502     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:40:20 2010 for ImpalaSrc by  doxygen 1.5.1