

#include "src/format_converter.h"
#include <cassert>
#include <string>

namespace sound_feature_extraction {

std::string FormatConverter::Name(const BufferFormat& in,
                                  const BufferFormat& out) {
  return in.Id() + " -> " + out.Id();
}

const std::string& FormatConverter::Name() const noexcept {
  if (name_ == "") {
    name_ = Name(*InputFormat(), *OutputFormat());
  }
  return name_;
}

const std::string& FormatConverter::Description() const noexcept {
  if (description_ == "") {
    description_ = std::string("Converts data format from ") +
        InputFormat()->Id() + " to " + OutputFormat()->Id() + ".";
  }
  return description_;
}

const SupportedParametersMap&
FormatConverter::SupportedParameters() const noexcept {
  static const SupportedParametersMap sp;
  return sp;
}

const ParametersMap&
FormatConverter::GetParameters() const noexcept {
  static const ParametersMap cp;
  return cp;
}

void FormatConverter::SetParameters(
  const ParametersMap&) {
}

void FormatConverter::Initialize() const {
}

}  // namespace sound_feature_extraction
