Project
Public Member Functions | Public Attributes | Friends | List of all members
Category Class Reference

Category datastructure. More...

#include <Category.h>

Public Member Functions

 Category (std::string category_id="", int cat_rank=-1)
 
 Category (const Category &category)
 

Public Attributes

std::string category_id_
 
int rank_
 

Friends

std::ostream & operator<< (std::ostream &out, const Category &category)
 
bool operator== (const Category &cat1, const Category &cat2)
 

Detailed Description

Category datastructure.

The Category datastructure is represented by its name and its rank. The rank represents the order to assume when comparing two categories. The rank 0 is by convention the worst category.

Constructor & Destructor Documentation

◆ Category() [1/2]

Category::Category ( std::string  category_id = "",
int  cat_rank = -1 
)

Category standard constructor

Parameters
category_idCategory id
cat_rankrank of Category

◆ Category() [2/2]

Category::Category ( const Category category)

Category constructor by copy

Parameters
categorybase Category to copy

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Category category 
)
friend

Overloading << operator for Category class

Parameters
outostream
catCategory object

◆ operator==

bool operator== ( const Category cat1,
const Category cat2 
)
friend

Overloading == operator for Category class

Parameters
cat1Category object 1
cat2Category object 2

The documentation for this class was generated from the following file: