{$IF not Defined(D_COLLECTION)}
  {$ERROR D_COLLECTION must be defined with collection name}
{$ENDIF}

{$UNDEF D_USE_GENERIC}

{$IF Defined(D_KEY_SIZE_STATIC)}
  // Only with generic we can implement static size
  {$DEFINE D_USE_GENERIC}
{$ELSEIF Defined(D_KEY_SIZE_DYNAMIC)}
{$ELSEIF Defined(D_KEY_SIZE_FIXED)}
{$ELSE}
  {$ERROR one of D_KEY_SIZE_STATIC, D_KEY_SIZE_DYNAMIC or D_KEY_SIZE_FIXED must be defined}
{$ENDIF}

{$IF Defined(D_KEY_RAW)}
{$ELSEIF Defined(D_KEY_MANAGED)}
{$ELSE}
  {$ERROR one of D_KEY_RAW or D_KEY_MANAGED must be defined}
{$ENDIF}

{$IF Defined(D_VALUE_SIZE_STATIC)}
  // Only with generic we can implement static size
  {$DEFINE D_USE_GENERIC}
{$ELSEIF Defined(D_VALUE_SIZE_DYNAMIC)}
{$ELSEIF Defined(D_VALUE_SIZE_FIXED)}
{$ELSE}
  {$ERROR one of D_VALUE_SIZE_STATIC, D_VALUE_SIZE_DYNAMIC or D_VALUE_SIZE_FIXED must be defined}
{$ENDIF}

{$IF Defined(D_VALUE_RAW)}
{$ELSEIF Defined(D_VALUE_MANAGED)}
{$ELSE}
  {$ERROR one of D_VALUE_RAW or D_VALUE_MANAGED must be defined}
{$ENDIF}

{$IF not Defined(D_HASH_TYPE)}
  {$ERROR D_HASH_TYPE must be defined with type of hash value}
{$ENDIF}

{$IF Defined(D_HASH_STATIC)}
  // Only with generic we can pass hash function
  {$DEFINE D_USE_GENERIC}
{$ELSEIF Defined(D_HASH_PARAMETRIC)}
{$ELSEIF Defined(D_HASH_EXTERNAL)}
{$ELSE}
  {$ERROR one of D_HASH_STATIC, D_HASH_PARAMETRIC or D_HASH_EXTERNAL must be defined}
{$ENDIF}
