cpp-mate  0.7
Helpful library for C++.
FileReader.hpp
1 /*
2  * Copyright (C) 2019-2020 Alexander Kornilov (akornilov.82@gmail.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CPP_MATE_FILE_READER_HPP
18 #define CPP_MATE_FILE_READER_HPP
19 
20 #include <CppMate/BinaryData.hpp>
21 
22 #include <string>
23 #include <memory>
24 
25 namespace CppMate {
26 
30 class FileReader: public BinaryData
31 {
32 public:
33 
38  virtual std::string getFilename() const = 0;
39 
46  static std::shared_ptr<FileReader> read(const std::string& filename);
47 };
48 
49 } // namespace CppMate
50 
51 #endif // CPP_MATE_FILE_READER_HPP
Represents interface of abstract binary data.
Definition: BinaryData.hpp:34
Represents fast file reader with platform-dependent implementation.
Definition: FileReader.hpp:31
virtual std::string getFilename() const =0
Returns name of file.
static std::shared_ptr< FileReader > read(const std::string &filename)
Reads file.
Definition: BinaryData.hpp:28