Esempio n. 1
0
// ////////////////////////////////////////////////////////////////////////////
std::string ExcEntry::ToStringDebug(const InsItem *item_list) const
{
	std::ostringstream o_str;

	o_str
		<< std::setw(5) << sequence_number_ << " "
		<< ((item_list[item_index_].IsInSequence())    ? "S" : " ")
		<< ((item_list[item_index_].IsInGroup())       ? "G" : " ")
		<< " "
		<< std::setw(5) << item_list[item_index_].auxiliary_id_ <<
			std::left << " "
		<< std::setw(31) << std::left << item_list[item_index_].field_name_ <<
			" " << std::setw(10) <<
			DataTypeToString(item_list[item_index_].data_type_) << " "
		<< std::setw(13) <<
			InsItemFlagBitsToString(item_list[item_index_].flags_) << " "
		<< std::setw(10) << item_list[item_index_].field_operator_
#ifdef VFAST_DEBUG_EXC_ENTRY
		<< " "
		<< "[PMap=" << pmap_flag_ << "] "
		<< "[Data=" << ToHexStringDebug(begin_ptr_, end_ptr_) << "]"
#else
		<< " "
		<< "[PMap=?] "
		<< "[Data=?? ?? ?? ?? ?? ?? ?? ?? ?? ??]"
#endif // #ifdef VFAST_DEBUG_EXC_ENTRY
		<< std::right << " = [";

	if (item_list[item_index_].IsTypePrimitive()) {
		if (is_null_)
			o_str << "] <*NULL*>";
		else {
			if (item_list[item_index_].IsTypeCharArray())
				o_str << datum_ptr_ << "]";
			else
				o_str << DatumToString(item_list[item_index_].data_type_,
					datum_length_, datum_ptr_) << "]";
		}
	}
	else
		o_str << "] <*N/A*>";

	return(o_str.str());
}
Esempio n. 2
0
// ////////////////////////////////////////////////////////////////////////////
std::string ToHexStringDebug(std::size_t data_length,
	const StreamDatum *data_ptr)
{
	return(ToHexStringDebug(data_ptr, data_ptr + data_length));
}