Kitlist  1.1.0
Public Member Functions | Private Attributes | Friends | List of all members
Item Class Reference

Represents an Item. More...

#include <item.hpp>

Inheritance diagram for Item:
ModelItem

Public Member Functions

 Item ()
 
 Item (const Item &i)
 Creates a copy of this item based on the passed item. More...
 
void set_id (long id)
 
long get_id ()
 
void set_description (const std::string description)
 
std::string get_description ()
 
virtual void set_checked (bool checked)
 
bool get_checked ()
 

Private Attributes

long m_id
 Unique ID. More...
 
std::string m_desc
 The item's description. More...
 
bool m_checked
 Whether checked/ticked or not. More...
 

Friends

class ItemCompareName
 
class ItemCompareId
 
std::ostream & operator<< (std::ostream &os, const Item &i)
 

Detailed Description

Represents an Item.

Definition at line 37 of file item.hpp.

Constructor & Destructor Documentation

◆ Item() [1/2]

Item::Item ( )
inline

Definition at line 42 of file item.hpp.

◆ Item() [2/2]

Item::Item ( const Item i)
inline

Creates a copy of this item based on the passed item.

Definition at line 44 of file item.hpp.

Member Function Documentation

◆ get_checked()

bool Item::get_checked ( )
inline

Definition at line 50 of file item.hpp.

References m_checked.

Referenced by XmlDao::add_item_to_dom(), FilterItem::operator()(), and TickItem::operator()().

◆ get_description()

std::string Item::get_description ( )
inline

◆ get_id()

long Item::get_id ( )
inline

◆ set_checked()

virtual void Item::set_checked ( bool  checked)
inlinevirtual

Reimplemented in ModelItem.

Definition at line 49 of file item.hpp.

Referenced by KitListGui::close_add_item_window(), TickItem::operator()(), and ModelItem::set_checked().

◆ set_description()

void Item::set_description ( const std::string  description)
inline

◆ set_id()

void Item::set_id ( long  id)
inline

Definition at line 45 of file item.hpp.

Referenced by Service::create_item(), and KitParser::process_item().

Friends And Related Function Documentation

◆ ItemCompareId

friend class ItemCompareId
friend

Definition at line 52 of file item.hpp.

◆ ItemCompareName

friend class ItemCompareName
friend

Definition at line 51 of file item.hpp.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Item i 
)
friend

Definition at line 53 of file item.hpp.

Member Data Documentation

◆ m_checked

bool Item::m_checked
private

Whether checked/ticked or not.

Definition at line 40 of file item.hpp.

Referenced by get_checked().

◆ m_desc

std::string Item::m_desc
private

The item's description.

Definition at line 39 of file item.hpp.

Referenced by get_description(), and ItemCompareName::operator()().

◆ m_id

long Item::m_id
private

Unique ID.

Definition at line 38 of file item.hpp.

Referenced by get_id(), and ItemCompareId::operator()().


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

Copyright 2008-2021 Frank Dean