|
resonance 1.0.1
|
Ordered list of the remixes queued in the jukebox. More...
#include <jukeboxplaylist.h>
Public Member Functions | |
| JukeboxPlayList () | |
| Construct an empty list. | |
| virtual | ~JukeboxPlayList () |
| Release every entry and the vector. | |
| virtual void | save (OBStream *pStream) |
| Write the list to a stream. | |
| virtual void | load (IBStream *pStream) |
| Read the list back from a stream. | |
| void | clear () |
| Release every entry and empty the list. | |
| void | RemoveStaleEntries () |
| Drop every entry the remix catalogue no longer knows. | |
| JukeboxPlayListEntry * | GetEntry (int nIndex) |
| Return one entry by position. | |
| void | AddEntry (const MetRemixRecord &record) |
| Append an entry for one remix. | |
| void | RemoveEntry (int nIndex) |
| Release and remove the entry at one position. | |
| void | SwapEntries (int nFirst, int nSecond) |
| Exchange the entries at two positions. | |
Public Attributes | |
| std::vector< JukeboxPlayListEntry * > | entries |
| The queued remixes, owned by the list. | |
Ordered list of the remixes queued in the jukebox.
Its RTTI descriptor is at 0x0086f7a0. It is a leaf class with no base. The class name is the RTTI spelling verbatim. Following the g++ 2.x layout for a class with no base, the vptr sits after the data members at +0x0c, and the object is 0x10 bytes. The vector below is the whole state. The four-entry vtable at 0x007e6d90 runs the compiler-generated GetTypeInfo at 0x001e5ca8, the destructor, and the two stream members.
MetRemixManager embeds one at +0xc4, and its constructor expands the inline constructor below. MetJukeboxEditPlaylistScreen addresses that embedded instance through its own +0xc4 and counts its rows from it. Two memcard tasks persist it, LoadJukeboxPlayListMCT and SaveJukeboxPlayListMCT.
The list owns its entries. clear() releases each one with a delete expression before emptying the vector, which is what establishes the element as owned rather than borrowed.
No member name is attested anywhere in the image, so every identifier below follows the required style. The member is public because MetJukeboxEditPlaylistScreen::GetItemCount() reads the vector bounds directly and no accessor for it survives anywhere in the image. A friend declaration fits that access equally well, and the ambiguity is recorded rather than resolved.
|
inline |
Construct an empty list.
Inline. MetRemixManager's constructor expands it, writing the vptr and the empty vector and then running clear(). The one out-of-line copy has no caller.
|
virtual |
Release every entry and the vector.
|
virtual |
Write the list to a stream.
Vtable slot 2. Writes the record version 1, then the entry count, then each entry as its name's length, the name's bytes, and the factory flag. The name is inferred from the stream slot it reaches, which MetPersonaData::Save() settles as OBStream slot 4.
| pStream | The stream to write to. |
|
virtual |
Read the list back from a stream.
Vtable slot 3. The counterpart of save(). A version of zero or less leaves the list as it is. Otherwise the vector is resized to the entry count, and each slot receives a fresh entry. The entries the list held before are not released.
| pStream | The stream to read from. |
| void JukeboxPlayList::clear | ( | ) |
Release every entry and empty the list.
Not virtual, and it occupies no table slot. The destructor runs it first and the MetRemixManager constructor runs it on its embedded instance. The name is inferred from the two things the routine does.
| void JukeboxPlayList::RemoveStaleEntries | ( | ) |
Drop every entry the remix catalogue no longer knows.
Each entry is looked up through MetRemixManager::FindRecord(), and an entry with no record is erased from the vector without being released. The title is inferred.
| JukeboxPlayListEntry * JukeboxPlayList::GetEntry | ( | int | nIndex | ) |
Return one entry by position.
The position is found by walking the vector from its start. The title is inferred.
| nIndex | The position, counted from zero. |
| void JukeboxPlayList::AddEntry | ( | const MetRemixRecord & | record | ) |
Append an entry for one remix.
The entry takes the record's +0x08 string as its name and its +0x24 word as its factory flag. MetJukeboxBaseScreen's slot 19 is the caller. The title is inferred.
| record | The remix to queue. |
| void JukeboxPlayList::RemoveEntry | ( | int | nIndex | ) |
Release and remove the entry at one position.
A position past the end does nothing. MetJukeboxEditPlaylistScreen's slot 19 is the caller. The title is inferred.
| nIndex | The position, counted from zero. |
| void JukeboxPlayList::SwapEntries | ( | int | nFirst, |
| int | nSecond ) |
Exchange the entries at two positions.
Neither position is checked. MetJukeboxEditPlaylistScreen's slot 19 moves an entry up and down through it. The title is inferred.
| nFirst | The first position. |
| nSecond | The second position. |
| std::vector<JukeboxPlayListEntry *> JukeboxPlayList::entries |
The queued remixes, owned by the list.
+0x00