class BitFieldDataType extends AbstractDataType {

	@Override
	public String getRepresentation(MemBuffer buf, Settings settings, int length) {
		if (bitSize == 0) {
			return "";
		}
		BigInteger big = getBigIntegerValue(buf, settings);
		if (big == null) {
			return "??";
		}
		DataType dt = baseDataType;
		if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getBaseDataType();
		}
		if (dt instanceof Enum) {
			return ((Enum) dt).getRepresentation(big, settings, effectiveBitSize);
		}
		AbstractIntegerDataType intDT = (AbstractIntegerDataType) dt;
		if (intDT.getFormatSettingsDefinition().getFormat(
			settings) == FormatSettingsDefinition.CHAR) {
			if (big.signum() < 0) {
				big = big.add(BigInteger.valueOf(2).pow(effectiveBitSize));
			}
			int bytesLen = BitFieldDataType.getMinimumStorageSize(effectiveBitSize);
			byte[] bytes = DataConverter.getInstance(buf.isBigEndian()).getBytes(big, bytesLen);

			return StringDataInstance.getCharRepresentation(this, bytes, settings);
		}

		return intDT.getRepresentation(big, settings, effectiveBitSize);
	}

	protected  BitFieldDataType(DataType baseDataType, int bitSize, int bitOffset);
	protected  BitFieldDataType(DataType baseDataType, int bitSize);

}