library/src/datastructures/BP-DataLists.cc
// This converts an entry type to a heap allocated string.  The
// returned string must be free()d.
This converts an entry type to a heap allocated string.  The
returned string must be free()d.
This converts an entry type to a heap allocated string . The returned string must be free () d .
char *  BP_DataListGetTypeString(BP_DATA_ENTRY_TYPE entry_type)
{
	switch(entry_type)
	{
		case BP_DATA_ENTRY_TYPE_INT8:
			return strdup("BP_DATA_ENTRY_TYPE_INT8");
			break;
		case BP_DATA_ENTRY_TYPE_INT16:
			return strdup("BP_DATA_ENTRY_TYPE_INT16");
			break;
		case BP_DATA_ENTRY_TYPE_INT32:
			return strdup("BP_DATA_ENTRY_TYPE_INT32");
			break;
		case BP_DATA_ENTRY_TYPE_INT64:
			return strdup("BP_DATA_ENTRY_TYPE_INT64");
			break;
		case BP_DATA_ENTRY_TYPE_UINT8:
			return strdup("BP_DATA_ENTRY_TYPE_UINT8");
			break;
		case BP_DATA_ENTRY_TYPE_UINT16:
			return bpstrdup("BP_DATA_ENTRY_TYPE_UINT16");
			break;
		case BP_DATA_ENTRY_TYPE_UINT32:
			return bpstrdup("BP_DATA_ENTRY_TYPE_UINT32");
			break;
		case BP_DATA_ENTRY_TYPE_UINT64:
			return bpstrdup("BP_DATA_ENTRY_TYPE_UINT64");
			break;
		case BP_DATA_ENTRY_TYPE_BINARY:
			return bpstrdup("BP_DATA_ENTRY_TYPE_BINARY");
			break;
		case BP_DATA_ENTRY_TYPE_ASCII:
			return bpstrdup("BP_DATA_ENTRY_TYPE_ASCII");
			break;
		case BP_DATA_ENTRY_TYPE_FORMAT:
			return bpstrdup("BP_DATA_ENTRY_TYPE_FORMAT");
			break;
		case BP_DATA_ENTRY_TYPE_RANDOM:
			return bpstrdup("BP_DATA_ENTRY_TYPE_RANDOM");
			break;
		case BP_DATA_ENTRY_TYPE_SEQUENCE:
			return bpstrdup("BP_DATA_ENTRY_TYPE_SEQUENCE");
			break;
		case BP_DATA_ENTRY_TYPE_READ:
			return bpstrdup("BP_DATA_ENTRY_TYPE_READ");
			break;
		case BP_DATA_ENTRY_TYPE_UNSET:
			return bpstrdup("BP_DATA_ENTRY_TYPE_UNSET");
			break;
		default:
			return bpstrdup("Uknown/Bad entry type");
			break;
	}
	return NULL;
}
char * BP_DataListGetTypeString ( BP_DATA_ENTRY_TYPE entry_type ) { switch ( entry_type ) { case BP_DATA_ENTRY_TYPE_INT8 : return strdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_INT16 : return strdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_INT32 : return strdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_INT64 : return strdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_UINT8 : return strdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_UINT16 : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_UINT32 : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_UINT64 : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_BINARY : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_ASCII : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_FORMAT : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_RANDOM : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_SEQUENCE : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_READ : return bpstrdup ( " " ) ; break ; case BP_DATA_ENTRY_TYPE_UNSET : return bpstrdup ( " " ) ; break ; default : return bpstrdup ( " " ) ; break ; } return NULL ; }
This converts an entry type to a heap allocated string.
This converts an entry type to a heap allocated string .
// switch on the entry type // signed 8 bit integer // signed 16 bit integer // signed 32 bit integer // signed 64 bit integer // unsigned 8 bit integer // unsigned 16bit integer // unsigned 32bit integer // unsigned 64bit integer // arbitrary binary entry // ascii entry // format specifiers // random data // arbitrary sequence data // read entry // if the value is unset, state it here // should never get here