Skip to content

Instantly share code, notes, and snippets.

@calindotgabriel
Created June 14, 2015 12:53
Show Gist options
  • Save calindotgabriel/27e12088ae67a11dbb13 to your computer and use it in GitHub Desktop.
Save calindotgabriel/27e12088ae67a11dbb13 to your computer and use it in GitHub Desktop.
#ifndef PRODUCTREPO_H
#define PRODUCTREPO_H
#include <string>
#include <vector>
#include <mutex>
#include <thread>
#include "product.h"
class ProductRepo
{
private:
std::string fIdName;
std::string fNameQty;
std::vector<Product> products;
void _load();
void _save();
public:
ProductRepo(std::string fIdName, std::string fNameQty);
ProductRepo();
std::string& getFileNameIdName();
std::string& getFileNameIdQty();
std::vector<Product> getProducts();
Product& findByID(int id);
};
#endif // PRODUCTREPO_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment