Definition at line 124 of file Read.h. References Impala::Core::Column::ColumnTem< ElemT >::GetData(), Impala::Util::IOBuffer::Read(), Impala::Util::IOBuffer::ReadLine(), Impala::Core::Column::ColumnTem< ElemT >::Reserve(), and Impala::Util::IOBuffer::Valid(). 00125 { 00126 if (! (buffer && buffer->Valid())) 00127 { 00128 return; 00129 } 00130 int nrElem; 00131 int byteSize; 00132 //fscanf(f.Fp(), "nr strings : %d\n", &nrElem); 00133 std::istringstream iss(buffer->ReadLine() + " 0"); 00134 String dummy; 00135 iss >> dummy >> dummy >> dummy >> nrElem >> byteSize; 00136 col->Reserve(nrElem, false); 00137 String* data = col->GetData(); 00138 if(byteSize > 0) 00139 { 00140 char* binaryData = new char[byteSize]; 00141 buffer->Read(binaryData, byteSize); 00142 int j = 0; 00143 for (int i=0 ; i<nrElem ; i++) 00144 { 00145 int start = j; 00146 while((j<byteSize) && (binaryData[j] != '\n')) 00147 j++; 00148 data[i] = String(&(binaryData[start]), j - start); 00149 j++; 00150 } 00151 delete binaryData; 00152 } 00153 else 00154 { 00155 for (int i=0 ; i<nrElem ; i++) 00156 data[i] = buffer->ReadLine(); 00157 } 00158 }
Here is the call graph for this function:
|