2013-08-10 23:38:57 -04:00
|
|
|
/*
|
|
|
|
* Copyright 2013 (c) Anna Schumaker.
|
|
|
|
*/
|
|
|
|
#ifndef OCARINA_DATABASE_H
|
|
|
|
#define OCARINA_DATABASE_H
|
|
|
|
|
|
|
|
#include <file.h>
|
|
|
|
|
2013-08-11 10:41:22 -04:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
template <class T>
|
2013-08-10 23:38:57 -04:00
|
|
|
class Database {
|
2013-08-11 10:41:22 -04:00
|
|
|
private:
|
|
|
|
std::vector<T> db;
|
|
|
|
unsigned int _size;
|
|
|
|
File file;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Database(std::string);
|
|
|
|
~Database();
|
2013-08-10 23:38:57 -04:00
|
|
|
|
2013-08-11 10:41:22 -04:00
|
|
|
unsigned int insert(T);
|
|
|
|
const unsigned int &size();
|
2013-08-10 23:38:57 -04:00
|
|
|
};
|
|
|
|
|
2013-08-11 10:41:22 -04:00
|
|
|
#include "database.hpp"
|
|
|
|
|
2013-08-10 23:38:57 -04:00
|
|
|
#endif /* OCARINA_DATABASE_H */
|