Skip to content

Instantly share code, notes, and snippets.

@calindotgabriel
Created June 14, 2015 11:32
Show Gist options
  • Save calindotgabriel/60e2e210f978f0d64fe3 to your computer and use it in GitHub Desktop.
Save calindotgabriel/60e2e210f978f0d64fe3 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();
std::mutex mtx;
public:
ProductRepo(std::string fIdName, std::string fNameQty);
ProductRepo();
std::string& getFileNameIdName();
std::string& getFileNameQty();
std::vector<Product> getProducts();
};
#endif // PRODUCTREPO_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment