71 lines
3.0 KiB
C++

#include <iostream>
#include "Gallery.h"
#include "Functions.h"
int main() {
Gallery slo("galer");
std::shared_ptr<Artist> artist1 = std::make_shared<Artist>("Leonardo da Vinci", "biografi", 15, 4, 1452);
std::shared_ptr<Artwork> art1 = std::make_shared<Artwork>("Mona Lisa", "desc", 60, 1797, artist1, 32, 56, 94);
slo.addArtwork(art1);
std::shared_ptr<Artist> artist2 = std::make_shared<Artist>("Vincent van Goth", "bio", 30, 3, 1853);
std::shared_ptr<Artwork> art2 = std::make_shared<Artwork>("The starry Night", "desc", 256, 1889, artist2, 56, 86, 15);
slo.addArtwork(art2);
std::shared_ptr<Artist> artist3 = std::make_shared<Artist>("Jahannes Vermeer", "biog", 1, 10, 1632);
std::shared_ptr<Artwork> art3 = std::make_shared<Artwork>("Girl with a Pearl Erring", "desc", 568, 700, artist3, 59, 56, 1);
slo.addArtwork(art3);
std::shared_ptr<Artist> artist4 = std::make_shared<Artist>("Gustav Klimt", "biog", 14, 7, 1862);
std::shared_ptr<Artwork> art4 = std::make_shared<Artwork>("The kiss", "desc", 465, 1907, artist4, 47, 56, 2);
slo.addArtwork(art4);
std::shared_ptr<Artist> artist5 = std::make_shared<Artist>("Sandro Botticelli", "biog", 17, 5, 1510);
std::shared_ptr<Artwork> art5 = std::make_shared<Artwork>("The birth of Venus", "desc", 573, 1458, artist5, 56, 89, 3.56);
slo.addArtwork(art5);
std::shared_ptr<Painting> painting1 = std::make_shared<Painting>("itoao", "desc", 1598, 789, artist3, 43, 4, 7, PaintingTechnique::Oil);
slo.addArtwork(painting1);
std::shared_ptr<Painting> painting2 = std::make_shared<Painting>("ito", "de", 1598, 999, artist3, 43, 4, 7, PaintingTechnique::Acrylic);
slo.addArtwork(painting2);
std::shared_ptr<Literature> Liter = std::make_shared<Literature>("liter", "description", 597, 1590, artist2, 56, 86, 15, LiteratureType::Biography);
slo.addArtwork(Liter);
std::cout << slo.getSize() << "\n";
slo.printArtworks();
//std::cout << slo.toString();
std::cout << "--------------Sort-----------------\n";
std::cout << slo.getSize() << "\n";
slo.sort(ascendingPrice);
slo.printArtworks();
std::cout << "------------FindRenaissance-------------------\n";
std::cout << slo.find(isRenaissanceArt)->toString();
std::cout << "------------Print paint-------------------\n";
PrintIfPainting paint;
slo.printArtworks(paint);
std::cout << "------------filter older-------------------\n";
slo.filterOut(isOlderThan2000);
std::cout << slo.getSize() << "\n";
slo.printArtworks();
std::cout << "------------filter chip-------------------\n";
slo.filterOut([](std::shared_ptr<Artwork> i) {
return i->getPrice() < 100;
});
std::cout << slo.getSize() << "\n";
slo.printArtworks();
std::cout << "------------dedovanje-------------------\n";
PaintingLiterature ha("title", "descp", 44455, 544, artist1, 55, 56, 89, PaintingTechnique::Oil, LiteratureType::Biography);
std::cout << ha.toString();
return 0;
}