Project
Categories.h
Go to the documentation of this file.
1 #ifndef CATEGORIES_H
2 #define CATEGORIES_H
3 
10 #include "Category.h"
11 #include <iostream>
12 #include <vector>
13 
28 class Categories {
29 public:
36  Categories(int number_of_categories = 2, std::string prefix = "cat");
37 
44  Categories(std::vector<std::string> vect_category_ids);
45 
51  Categories(const Categories &categories);
52  ~Categories();
53 
54  // TODO looks like this could be removed as it is never used
60  std::vector<int> getRankCategories();
61 
62  // TODO looks like this could be removed as it is never used
69  void setRankCategories(std::vector<int> &set_ranks);
70 
71  // TODO looks like this could be removed as it is never used
79 
85  std::vector<std::string> getIdCategories();
86 
87  // TODO looks like this could be removed as it is never used
94  void setIdCategories(std::string prefix);
95 
96  // TODO looks like this could be removed as it is never used
103  void setIdCategories(std::vector<std::string> &set_category_ids);
104 
112 
120 
128  friend std::ostream &operator<<(std::ostream &out,
129  const Categories &categories);
130 
138  Category operator[](int index);
139  Category operator[](int index) const;
140 
141 private:
142  std::vector<Category> categories_vector_;
143 };
144 
152 template <typename T>
153 std::ostream &operator<<(std::ostream &out, const std::vector<T> &vec);
154 
155 #endif
std::ostream & operator<<(std::ostream &out, const std::vector< T > &vec)
Definition: utils.h:46
Datastructure representing a category.
Set of Category datastructure.
Definition: Categories.h:28
std::vector< int > getRankCategories()
Category getCategoryOfRank(int rank)
void setIdCategories(std::string prefix)
void setIdCategories(std::vector< std::string > &set_category_ids)
int getNumberCategories()
friend std::ostream & operator<<(std::ostream &out, const Categories &categories)
Categories(std::vector< std::string > vect_category_ids)
void setRankCategories(std::vector< int > &set_ranks)
Category operator[](int index)
std::vector< std::string > getIdCategories()
Categories(const Categories &categories)
Categories(int number_of_categories=2, std::string prefix="cat")
void setRankCategories()
Category datastructure.
Definition: Category.h:20