|
resonance 1.0.1
|
One gem of the phrase at one song position. More...
#include <phrase.h>

Public Member Functions | |
| bool | operator< (const Gem &other) const |
| Order two gems by position. | |
| bool | operator== (const Gem &other) const |
| Compare two gems member by member, in declaration order. | |
Public Attributes | |
| Sch::Tick | mPosition |
| int | mGem |
| int | mTrans |
One gem of the phrase at one song position.
The record is twelve bytes. PhraseMgr::PostGemMsg() passes a GemPacket's loc, gem, and trans values to AddGem() in member order, and the member names follow the labels Gem::Print() writes for them. The type name is inferred. The record has no descriptor, allocation tag, or literal.
On the wire the position travels as two bytes, mGem as one unsigned byte, and mTrans as one signed byte.
The fill value Load() hands to resize() sets the position alone, which is Sch::Tick's default constructor at work. The inline comparison is recovered from its expansion in the gem search AddGem() performs.
|
inline |
Order two gems by position.
| other | The gem to compare against. |
|
inline |
Compare two gems member by member, in declaration order.
Recovered from its expansion in PhraseMgr::PhrasesMatch().
| other | The gem to compare against. |
| Sch::Tick Phrase::Gem::mPosition |
Song position of the gem. +0x00
| int Phrase::Gem::mGem |
Which gem. +0x04
| int Phrase::Gem::mTrans |
Transposition of the gem. +0x08