PonyPlayer
lrc_parser.h
浏览该文件的文档.
1//******************************************
2// Author : Yuwei Huang
3// Created On : Sat Feb 10 2018
4// File : lrc_parser.h
5//******************************************
6
7#ifndef LIBLRC_LRC_PARSER_H
8#define LIBLRC_LRC_PARSER_H
9
10#include <istream>
11#include <memory>
12
13#include "lyrics.h"
14
15namespace lrc {
16
17class LrcParser {
18 public:
19 LrcParser();
20 ~LrcParser();
21
22 std::unique_ptr<Lyrics> ParseStream(std::istream* stream) const;
23
24 std::unique_ptr<Lyrics> ParseString(const std::string& lrc_string) const;
25
26 // Returns nullptr if there is trouble loading the file.
27 std::unique_ptr<Lyrics> ParseFile(const std::string& filename) const;
28
29 private:
30 LrcParser(const LrcParser&) = delete;
31 LrcParser(LrcParser&&) = delete;
32};
33
34} // namespace lrc
35
36#endif // LIBLRC_LRC_PARSER_H
Definition: lrc_parser.h:17
LrcParser()
Definition: lrc_parser.cc:52
~LrcParser()
Definition: lrc_parser.cc:53
std::unique_ptr< Lyrics > ParseString(const std::string &lrc_string) const
Definition: lrc_parser.cc:95
std::unique_ptr< Lyrics > ParseStream(std::istream *stream) const
Definition: lrc_parser.cc:55
std::unique_ptr< Lyrics > ParseFile(const std::string &filename) const
Definition: lrc_parser.cc:101
Definition: lrc_parser.h:15