-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cpp
59 lines (47 loc) · 1.93 KB
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "src/DBManagerInterface.cpp"
using namespace cv;
using namespace cv::xfeatures2d;
using namespace std;
int main()
{
//Example of mat
//Mat M(2, 2, CV_8UC3, Scalar(0, 0, 255));
//------------------ Class Cuatec ---------------------
//Cuatec receives name(string), age(int), matricula(string),
// image from TecId(cv::Mat) and features(cv::Mat)
//Cuatec nuevoCatec("Saul Montes De Oca", 22, "A01025975", M, M);
//Getters
// string nombre = nuevoCatec.getNombre();
// string matricula = nuevoCatec.getMatricula();
// int edad = nuevoCatec.getEdad();
// Mat img = nuevoCatec.getImg();
// Mat features = nuevoCatec.getFeatures();
//Setters
//nuevoCatec.setNombre(string nuevoNombre);
//nuevoCatec.setMatricula(string nuevoMatricula);
//nuevoCatec.setEdad(int nuevaEdad);
//nuevoCatec.setImg(Mat nuevaImagen);
//nuevoCatec.setFeatures(Mat nuevoFeatures);
//You need to instance de class once like this:
//DBManagerInterface dbManager(URI, DATABASE, COLLECTION);
//Methods:
//-------------------- Create ------------------------
//Create method receives a Cuatec object
//dbManager.create(nuevoCatec);
//-------------------- Read ------------------------
//Prints all the data (JSON format)
//dbManager.readAll();
//Returns a Cuatec object found in the DB
//Cuatec nuevoCuatec = dbManager.readOne("A01021111");
//Returns ObjectId (string format) by matricula
//std::string oid = dbManager.readOid("A01021111");
//-------------------- Update ------------------------
//Updates name old(string) -> to new one(string)
//dbManager.updateName("Luis Garcia ","Victor Coeto");
//Updates matricula old(string) -> to new one(string)
//dbManager.updateMatricula("A01021111", "A01025986");
//-------------------- Delete ------------------------
//Delete by name
//dbManager.deleteOne("Victor Coeto");
return 0;
}