root/src/CatalogItem.h @ 5fa4a398
| 5fa4a398 | david.sorber | #ifndef __CATALOGITEM_H__
|
|
#define __CATALOGITEM_H__
|
|||
#include <cstdint>
|
|||
#include <string>
|
|||
class CatalogItem
|
|||
{
|
|||
public:
|
|||
CatalogItem(const std::string& key, const std::string& value);
|
|||
~CatalogItem();
|
|||
inline const std::string& getKey() const
|
|||
{
|
|||
return m_key;
|
|||
}
|
|||
inline const std::string& getLcKey() const
|
|||
{
|
|||
return m_keyLower;
|
|||
}
|
|||
inline const std::string& getValue() const
|
|||
{
|
|||
return m_value;
|
|||
}
|
|||
/**
|
|||
* Should this CatalogItem be visible
|
|||
* @return
|
|||
*/
|
|||
inline bool visible() const
|
|||
{
|
|||
return m_visible;
|
|||
}
|
|||
/**
|
|||
* Set CatalogItem visibility based on parameter
|
|||
* @param vis
|
|||
*/
|
|||
inline void setVisibilty(bool vis)
|
|||
{
|
|||
m_visible = vis;
|
|||
}
|
|||
/**
|
|||
* Return true if the specified criteria matches the key
|
|||
* @param criteria
|
|||
* @return
|
|||
*/
|
|||
bool match(const std::string& criteria);
|
|||
private:
|
|||
std::string m_key;
|
|||
std::string m_keyLower;
|
|||
std::string m_value;
|
|||
bool m_visible;
|
|||
};
|
|||
#endif // __CATALOGITEM_H__
|