aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/song.hpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-01-17 20:18:29 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:44 +0100
commit5009375468b780cfeb0aac7e28425699991c621b (patch)
treed3a5e5f1298859ea0940772e56aa2c1e9f33cb79 /src/base/song.hpp
parent4949504dfaa79e32b9dc24c2937fdad63c8fcff5 (diff)
downloadusdx-5009375468b780cfeb0aac7e28425699991c621b.tar.gz
usdx-5009375468b780cfeb0aac7e28425699991c621b.tar.xz
usdx-5009375468b780cfeb0aac7e28425699991c621b.zip
added complete song structure
added LyricLines for lines of lyrics with some words added LyricWords for single words (notes) of lyrics added construction/deconstruction of lines and words form parsed data changed BPM list to list of pointer
Diffstat (limited to 'src/base/song.hpp')
-rw-r--r--src/base/song.hpp74
1 files changed, 43 insertions, 31 deletions
diff --git a/src/base/song.hpp b/src/base/song.hpp
index 4cdd4c09..af613370 100644
--- a/src/base/song.hpp
+++ b/src/base/song.hpp
@@ -29,7 +29,10 @@
#include <string>
#include <map>
+#include <list>
#include <log4cxx/logger.h>
+#include "bpm.hpp"
+#include "lyric_line.hpp"
namespace usdx
{
@@ -61,48 +64,57 @@ namespace usdx
std::string creator;
int notes_gap;
- float gap; // in miliseconds
+ float gap; ///< in miliseconds
- float start; // in seconds
- int finish; // in miliseconds
+ float start; ///< in seconds
+ int finish; ///< in miliseconds
bool relative;
int resolution;
- // TODO: bpm: array of TBPM
- std::string bpm;
- // TODO: list of LyricLines
+ std::list<BPM*> bpm;
+
+ std::list<LyricLine*> lyrics;
// TODO: Encoding: TEncoding;
+
std::map<std::string, std::string> custom_header_tags;
std::string get_header_tag(const std::string& tag, const bool required = false);
- public:
- const std::string& get_filename(void);
+ LyricLine* get_last_lyric_line(void);
+ LyricLine* create_new_lyric_line(int start);
+ public:
Song(const std::string& filename, const std::map<std::string, std::string>& header);
-
- const std::string& get_title(void);
- const std::string& get_artist(void);
- const std::string& get_mp3(void);
- // TODO: bpm array
- //const bpmarray get_bpm(void);
- //const float get_gap(void);
- const std::string& get_cover(void);
- const std::string& get_background(void);
- const std::string& get_video(void);
- //const float get_videogap(void);
- const std::string& get_genre(void);
- const std::string& get_edition(void);
- const std::string& get_creator(void);
- const std::string& get_language(void);
- //const int get_year(void);
- //const float get_start(void);
- //const int get_end(void);
- //const int get_resolution(void);
- //const int get_notesgap(void);
- //const bool get_relative(void);
- // TODO: encodeing class
- //const std::string& get_encoding(void);
+ virtual ~Song(void);
+
+ const std::string& get_filename(void) const;
+
+ const std::string& get_title(void) const;
+ const std::string& get_artist(void) const;
+ const std::string& get_mp3(void) const;
+ const float get_bpm(int beat) const;
+ // const float get_gap(void) const;
+ const std::string& get_cover(void) const;
+ const std::string& get_background(void) const;
+ const std::string& get_video(void) const;
+ // const float get_videogap(void) const;
+ const std::string& get_genre(void) const;
+ const std::string& get_edition(void) const;
+ const std::string& get_creator(void) const;
+ const std::string& get_language(void) const;
+ // const int get_year(void) const;
+ // const float get_start(void) const;
+ // const int get_end(void) const;
+ // const int get_resolution(void) const;
+ // const int get_notesgap(void) const;
+ // const bool get_relative(void) const;
+
+ // TODO: encoding class
+ // const std::string& get_encoding(void) const;
+
+ void new_bpm(const int beat, const float new_bpm);
+ void new_line(const int line_out, const int line_in);
+ void new_note(const char type, const int beat, const int length, const int height, const std::string& lyric);
};
};