Old/mp3_InfoManager/field_binary.cpp
/** Copies the supplied unicode string to the field.
 **
 ** Again, like the string types, the binary Set() function copies the data
 ** so you may dispose of the source data after a call to this method.
 **/
Copies the supplied unicode string to the field.
Again, like the string types, the binary Set() function copies the data
so you may dispose of the source data after a call to this method.
Copies the supplied unicode string to the field . Again like the string types the binary Set () function copies the data so you may dispose of the source data after a call to this method .
size_t ID3_FieldImpl::SetBinary(BString data) 
{
  size_t size = 0;
  if (this->GetType() == ID3FTY_BINARY)
  {
    this->Clear();
    size_t fixed = _fixed_size;
    size = data.size();
    if (fixed == 0)
    {
      _binary = data;
    }
    else
    {
      _binary.assign(data, 0, dami::min(size, fixed));
      if (size < fixed)
      {
        _binary.append(fixed - size, '\0');
      }
    }
    size = _binary.size();
    _changed = true;
  }
  return size;
}
size_t ID3_FieldImpl :: SetBinary ( BString data ) { size_t size = 0 ; if ( this -> GetType ( ) == ID3FTY_BINARY ) { this -> Clear ( ) ; size_t fixed = _fixed_size ; size = data . size ( ) ; if ( fixed == 0 ) { _binary = data ; } else { _binary . assign ( data , 0 , dami :: min ( size , fixed ) ) ; if ( size < fixed ) { _binary . append ( fixed - size , ' \0 ' ) ; } } size = _binary . size ( ) ; _changed = true ; } return size ; }
Copies the supplied unicode string to the field.
Copies the supplied unicode string to the field .
//< data to assign to this field.