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

UInt8* Impala::Core::Array::ImageArchiveMapi::GetImageData ( int  idx,
size_t &  blockSize 
) [inline, virtual]

Reimplemented from Impala::Core::Array::ImageArchive.

Definition at line 64 of file ImageArchiveMapi.h.

References Impala::Util::Hex2Bin(), ILOG_ERROR, Impala::MakeString(), mConn, mFrameImageId, mNrImages, and Valid().

Referenced by ReadImage().

00065     {
00066         if (!Valid())
00067         {
00068             ILOG_ERROR("Cannot GetImageData: archive not valid");
00069             return 0;
00070         }
00071         if ((idx < 0) || (idx >= mNrImages))
00072         {
00073             ILOG_ERROR("GetImageData: idx out of range");
00074             return 0;
00075         }
00076 
00077         String query = "select image from frame_image where frame_image_id = "
00078             + MakeString(mFrameImageId[idx]) + ";";
00079 
00080         MapiHdl hdl = mConn->QueryPartStart(query);
00081         if (hdl == 0)
00082             return 0;
00083 
00084         std::vector<String> res;
00085         if (!mConn->QueryPartFetchString(hdl, 0, res))
00086             return 0;
00087 
00088         mConn->QueryPartEnd(hdl);
00089         if (res.size() != 1)
00090         {
00091             ILOG_ERROR("GetImageData: unexpected number of results");
00092             return 0;
00093         }
00094         return Util::Hex2Bin(res[0], blockSize);
00095     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:17:20 2011 for ImpalaSrc by  doxygen 1.5.1