resonance 1.0.1
Loading...
Searching...
No Matches
riffset.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <iostream>
5
6#include "os/mem.h"
7
8class Riff;
9
11constexpr int kRiffSetLevelCount = 4;
12
23class RiffSet {
24public:
33 void *operator new(size_t nSize) {
34 return AllocateTaggedMemory(nSize, "RiffSet");
35 }
36
44 void operator delete(void *pBlock) {
45 OperatorDeleteOverride(pBlock, "RiffSet");
46 }
47
55
63
71 void Print(std::ostream &stream);
72
74};
~RiffSet()
Give back the reference to every riff the set has.
Riff * mRiffs[kRiffSetLevelCount]
Definition riffset.h:73
void Print(std::ostream &stream)
Write every level to a diagnostic stream, one line each, with [empty] for a missing riff.
RiffSet()
Construct a set with no riff at any level.
One riff of a track at one difficulty level, as a sequence of MIDI messages.
Definition riff.h:25
void OperatorDeleteOverride(void *pBlock, const char *pszClass)
Release a block that AllocateTaggedMemory() handed out.
void * AllocateTaggedMemory(size_t nSize, const char *pszClass)
Allocate a block for one object of a named class.
constexpr int kRiffSetLevelCount
Difficulty levels a RiffSet stores a riff for.
Definition riffset.h:11