home *** CD-ROM | disk | FTP | other *** search
- #if !defined( ROLL_INCLUDED )
- #define ROLL_INCLUDED
-
- #include "Student.h"
- #include <vector>
-
- class CRoll {
- public:
- CRoll(const std::string &fname);
- ~CRoll();
- bool Add(const CStudent &s);
- bool Find(unsigned studNo);
- bool Find(unsigned studNo, CStudent &s);
- bool Delete(unsigned studNo);
- private:
- typedef std::vector<CStudent> data_t;
- typedef data_t::iterator data_it;
- const std::string m_fname;
- const std::ios_base::openmode m_openmode;
- data_t m_data;
- bool Read();
- bool Write();
- data_it Get(unsigned studNo);
- };
-
- #endif