diff options
Diffstat (limited to 'src/base/songloading/songloading_strategy_txt.hpp')
-rw-r--r-- | src/base/songloading/songloading_strategy_txt.hpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/base/songloading/songloading_strategy_txt.hpp b/src/base/songloading/songloading_strategy_txt.hpp index 7a298e41..31a9815a 100644 --- a/src/base/songloading/songloading_strategy_txt.hpp +++ b/src/base/songloading/songloading_strategy_txt.hpp @@ -28,17 +28,42 @@ #define SONGLOADING_STRATEGY_TXT_HPP #include <string> +#include <log4cxx/logger.h> #include "songloading_strategy.hpp" namespace usdx { class SongloadingStrategyTxt : public SongloadingStrategy { + private: + static log4cxx::LoggerPtr log; + + /** + * Split the header field in name and value. + */ + std::pair<std::string, std::string> split_header_field(std::string &line); + + /** + * Removes whitespaces in front of the string. + */ + std::string& ltrim(std::string& line); + + /** + * Removes whitespaces in behind the string. + */ + std::string& rtrim(std::string& line); + + /** + * Removes whitespaces in front of the string and behind it. + */ + std::string& trim(std::string& line); + public: SongloadingStrategyTxt(); virtual ~SongloadingStrategyTxt(); - virtual Song* loadSong(std::string filename); + virtual Song* load_song(Song* song); + virtual Song* load_header(const std::string& filename); }; }; |