KiCad PCB EDA Suite
PNS::ITEM_SET::ENTRY Struct Reference

#include <pns_itemset.h>

Public Member Functions

 ENTRY (ITEM *aItem, bool aOwned=false)
 
 ENTRY (const ENTRY &aOther)
 
 ~ENTRY ()
 
bool operator== (const ENTRY &b) const
 
bool operator< (const ENTRY &b) const
 
ENTRYoperator= (const ENTRY &aOther)
 
 operator ITEM * () const
 

Public Attributes

ITEMitem
 
bool owned
 

Detailed Description

Definition at line 42 of file pns_itemset.h.

Constructor & Destructor Documentation

PNS::ITEM_SET::ENTRY::ENTRY ( ITEM aItem,
bool  aOwned = false 
)
inline

Definition at line 44 of file pns_itemset.h.

44  :
45  item( aItem ),
46  owned( aOwned )
47  {}
PNS::ITEM_SET::ENTRY::ENTRY ( const ENTRY aOther)
inline

Definition at line 49 of file pns_itemset.h.

References PNS::ITEM::Clone(), item, and owned.

50  {
51  owned = aOther.owned;
52 
53  if( aOther.owned )
54  item = aOther.item->Clone();
55  else
56  item = aOther.item;
57  }
virtual ITEM * Clone() const =0
Function Clone()
PNS::ITEM_SET::ENTRY::~ENTRY ( )
inline

Definition at line 59 of file pns_itemset.h.

References item, and owned.

60  {
61  if( owned )
62  delete item;
63  }

Member Function Documentation

PNS::ITEM_SET::ENTRY::operator ITEM * ( ) const
inline

Definition at line 87 of file pns_itemset.h.

References item.

88  {
89  return item;
90  }
bool PNS::ITEM_SET::ENTRY::operator< ( const ENTRY b) const
inline

Definition at line 70 of file pns_itemset.h.

References item.

71  {
72  return item < b.item;
73  }
ENTRY& PNS::ITEM_SET::ENTRY::operator= ( const ENTRY aOther)
inline

Definition at line 75 of file pns_itemset.h.

References PNS::ITEM::Clone(), item, and owned.

76  {
77  owned = aOther.owned;
78 
79  if( aOther.owned )
80  item = aOther.item->Clone();
81  else
82  item = aOther.item;
83 
84  return *this;
85  }
virtual ITEM * Clone() const =0
Function Clone()
bool PNS::ITEM_SET::ENTRY::operator== ( const ENTRY b) const
inline

Definition at line 65 of file pns_itemset.h.

References item.

66  {
67  return item == b.item;
68  }

Member Data Documentation

ITEM* PNS::ITEM_SET::ENTRY::item

Definition at line 92 of file pns_itemset.h.

Referenced by ENTRY(), operator ITEM *(), operator<(), operator=(), operator==(), and ~ENTRY().

bool PNS::ITEM_SET::ENTRY::owned

Definition at line 93 of file pns_itemset.h.

Referenced by ENTRY(), operator=(), and ~ENTRY().


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