inLimbo
TUI Music Player that keeps you in Limbo.
 
Loading...
Searching...
No Matches
Song Struct Reference

Represents a song with associated metadata and inode. More...

#include <songmap.hpp>

Public Member Functions

 Song (unsigned int inode, const Metadata &metadata)
 Constructs a Song with the given inode and metadata.
 
 Song ()
 Default constructor for a Song, initializing with default values.
 
template<class Archive>
void serialize (Archive &ar)
 Serializes the Song object.
 

Public Attributes

unsigned int inode
 
Metadata metadata
 

Detailed Description

Represents a song with associated metadata and inode.

The Song struct encapsulates the metadata and inode of a song, including details such as title, artist, album, genre, and track number. It provides methods to initialize, serialize, and deserialize song data.

Constructor & Destructor Documentation

◆ Song() [1/2]

Song::Song ( unsigned int inode,
const Metadata & metadata )
inline

Constructs a Song with the given inode and metadata.

This constructor initializes a song with a unique inode and metadata.

Parameters
inodeThe inode of the song file.
metadataThe metadata associated with the song.

◆ Song() [2/2]

Song::Song ( )
inline

Default constructor for a Song, initializing with default values.

Member Function Documentation

◆ serialize()

template<class Archive>
void Song::serialize ( Archive & ar)
inline

Serializes the Song object.

This function is used by the Cereal library to serialize the Song object for storage or transmission.

Parameters
arThe archive object used for serialization.

Member Data Documentation

◆ inode

unsigned int Song::inode

The inode of the file representing the song

◆ metadata

Metadata Song::metadata

Metadata information for the song


The documentation for this struct was generated from the following file: