2
0

it-reader.inline.h 615 B

12345678910111213141516171819202122
  1. #ifndef AFUN_IT_READER_INLINE_H
  2. #define AFUN_IT_READER_INLINE_H
  3. #include "it-reader.h"
  4. #include "it-exception.h"
  5. namespace aFunit {
  6. inline StringReader::StringReader(std::string str_, const aFuntool::FilePath &path_)
  7. : Reader{path_, 0}, str{std::move(str_)} {
  8. index = 0;
  9. len = str.size();
  10. }
  11. inline FileReader::FileReader(const aFuntool::FilePath &path_)
  12. : Reader{path_, 0} {
  13. file = aFuntool::fileOpen(path_, "rb");
  14. if (file == nullptr)
  15. throw readerFileOpenError(path_);
  16. no_first = false;
  17. }
  18. }
  19. #endif //AFUN_IT_READER_INLINE_H