Item Class Reference

Represents an Item. More...

#include <item.hpp>

Inheritance diagram for Item:

ModelItem

List of all members.

Public Member Functions

 Item ()
 Item (const Item &i)
 Creates a copy of this item based on the passed item.
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.
std::string m_desc
 The item's description.
bool m_checked
 Whether checked/ticked or not.

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::Item (  )  [inline]

Definition at line 42 of file item.hpp.

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

void Item::set_id ( long  id  )  [inline]

Definition at line 45 of file item.hpp.

References m_id.

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

long Item::get_id (  )  [inline]

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

std::string Item::get_description (  )  [inline]

virtual void Item::set_checked ( bool  checked  )  [inline, virtual]

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()().


Friends And Related Function Documentation

friend class ItemCompareName [friend]

Definition at line 51 of file item.hpp.

friend class ItemCompareId [friend]

Definition at line 52 of file item.hpp.

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

Definition at line 53 of file item.hpp.


Member Data Documentation

long Item::m_id [private]

Unique ID.

Definition at line 38 of file item.hpp.

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

std::string Item::m_desc [private]

The item's description.

Definition at line 39 of file item.hpp.

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

bool Item::m_checked [private]

Whether checked/ticked or not.

Definition at line 40 of file item.hpp.

Referenced by get_checked(), and set_checked().


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

Copyright 2008-2010 Frank Dean