Esempio n. 1
0
void Continue::readFields(CFRecord& record)
{
	m_iDataSize = record.getDataSize();
	m_pData		= new char[m_iDataSize];	
	memcpy(m_pData, record.getData(), m_iDataSize);

	record.skipNunBytes(m_iDataSize);
}
Esempio n. 2
0
void Pls::readFields(CFRecord& record)
{
	record.skipNunBytes(2); // reserved
	
	if (record.loadAnyData(rgb) == false) return;

	if (continue_records.size() > 0)
	{
		std::list<CFRecordPtr>& recs = continue_records[rt_Continue];

		if (recs.size())
		{
			while( !recs.empty() )
			{
				record.appendRawData(recs.front()->getData(), recs.front()->getDataSize());
				recs.pop_front();
			}
		}
	}

	int size			= record.getDataSize() - 2;
	const BYTE* data	= (BYTE*)record.getData() + 2;
	
	boost::shared_array<BYTE> buffer(new BYTE[size]);
    memcpy(buffer.get(), data, size);
	
	bin_data_id = -1;

	GlobalWorkbookInfo* globla_info = record.getGlobalWorkbookInfo().get();
	if (globla_info)
	{
		globla_info->bin_data.push_back(std::pair<boost::shared_array<BYTE>, size_t>(buffer, size));

		bin_data_id = globla_info->bin_data.size() - 1;
	}

	record.skipNunBytes(record.getDataSize() - record.getRdPtr()); // avoid size inconsistency warning
}