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
void setSha1Sum(const Sha1Sum &sha1sum)
std::string getFirstFileTypeAsString() const
Definition: CassetteImage.cc:6
const Sha1Sum & getSha1Sum() const
Get sha1sum for this image.
This class represents the result of a sha1 calculation (a 160-bit value).
Definition: sha1.hh:22
bool empty() const
Definition: utils/sha1.cc:242
This file implemented 3 utility functions:
Definition: Autofire.cc:9