openMSX
CassetteImage.cc
Go to the documentation of this file.
1 #include "CassetteImage.hh"
2 #include <cassert>
3 
4 namespace openmsx {
5 
7 {
8  if (firstFileType == ASCII) {
9  return "ASCII";
10  } else if (firstFileType == BINARY) {
11  return "binary";
12  } else if (firstFileType == BASIC) {
13  return "BASIC";
14  } else {
15  return "unknown";
16  }
17 }
18 
19 void CassetteImage::setSha1Sum(const Sha1Sum& sha1sum_)
20 {
21  assert(sha1sum.empty());
22  sha1sum = sha1sum_;
23 }
24 
26 {
27  assert(!sha1sum.empty());
28  return sha1sum;
29 }
30 
31 } // namespace openmsx
openmsx::CassetteImage::getFirstFileTypeAsString
std::string getFirstFileTypeAsString() const
Definition: CassetteImage.cc:6
openmsx::CassetteImage::BASIC
@ BASIC
Definition: CassetteImage.hh:14
openmsx::CassetteImage::setSha1Sum
void setSha1Sum(const Sha1Sum &sha1sum)
Definition: CassetteImage.cc:19
openmsx::CassetteImage::BINARY
@ BINARY
Definition: CassetteImage.hh:14
CassetteImage.hh
openmsx::Sha1Sum
This class represents the result of a sha1 calculation (a 160-bit value).
Definition: sha1.hh:20
openmsx::CassetteImage::getSha1Sum
const Sha1Sum & getSha1Sum() const
Get sha1sum for this image.
Definition: CassetteImage.cc:25
openmsx::CassetteImage::ASCII
@ ASCII
Definition: CassetteImage.hh:14
openmsx::Sha1Sum::empty
bool empty() const
Definition: utils/sha1.cc:244
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5