uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

errlog.hpp (476B)


      1 #ifndef ERRLOG_HPP
      2 #define ERRLOG_HPP
      3 
      4 #include <fstream>
      5 #include "xstring.hpp"
      6 
      7 class ErrLog
      8 {
      9     private:
     10         static constexpr const char *fpath = "res/errlog.csv";
     11         void fclear() const;
     12 
     13     public:
     14         enum class ErrType {
     15             STUDENT_MISSING,
     16             COURSE_MISSING,
     17             DIFFERENT_GRADES,
     18             RUNTIME_ERR
     19         };
     20 
     21         ErrLog();
     22         void write(ErrType type, const lab::xstring& s) const;
     23 };
     24 
     25 #endif /* ERRLOG_HPP */