GCpp general purpose C++ library  version 1.0
GItemList.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GItemList.hh
3  *
4  * Include file for class GItemList.
5  */
6 //======================================================================
7 
8 #ifndef G_ITEM_LIST_HH
9 #define G_ITEM_LIST_HH
10 
11 
12 #include "GItem.hh"
13 #include "GNamedListT.hh"
14 
15 ///! Iterator type definition for list elements
17 
18 //======================================================================
19 /*! \class GItemList
20  *
21  * This class defines a list of GItem objects.
22  *
23  * It should be considered as a list of pointers on objects of any
24  * type, including base types.
25  */
26 class GItemList : protected GNamedListT<GItem>
27 {
28 //----------------------------------------------------------------------
29  /*! \object_doc */
31 //----------------------------------------------------------------------
32 
56 
57  /// Local iterator definition for collection elements
59 
60  protected:
61 
62  //------------------------------------------------------------
63  // Constructors / affectation / destructor
64  public:
65  GItemList ( const u_int fl = 0 );
66  GItemList ( const GItemList &original );
67 
68  virtual ~GItemList ( );
69 
70  GItemList & operator = ( const GItemList &original );
71 
72  //------------------------------------------------------------
73  // Overloaded functions due to protected inheritance
74  // not included with "using" so that all Remove functions are
75  // not accessible
76  inline virtual bool Remove ( );
77 
78  //------------------------------------------------------------
79  virtual GItem * Select ( const u_int n, const bool b = true );
80  virtual void SelectAll ( const bool b = true );
81 
82  virtual GItem * AddItem ( const GItem & item );
83  virtual GItem * AddItem ( GItem * item );
84  virtual GItem * AddItem ( const string &s, void *ptr = NULL );
85 
86  virtual int GetSelectedNumber ( ) const;
87 };
88 
89 //----------------------------------------------------------------------
90 // Inline functions
91 #include "icc/GItemList.icc"
92 
93 //======================================================================
94 #endif
GItemList & operator=(const GItemList &original)
Definition: GItemList.icc:30
GListIterT< GItem > iterator
Local iterator definition for collection elements.
Definition: GItemList.hh:58
Definition: GNamedListT.hh:23
virtual int GetSelectedNumber() const
Definition: GItemList.cpp:29
GItemList(const u_int fl=0)
Definition: GItemList.icc:12
virtual void SelectAll(const bool b=true)
Definition: GItemList.icc:64
virtual bool Remove()
Definition: GItemList.icc:37
#define GObject(T)
Definition: GClassDefine.hh:65
virtual ~GItemList()
Definition: GItemList.icc:24
GListIterT< GItem > GItemListIter
! Iterator type definition for list elements
Definition: GItemList.hh:16
Definition: GItemList.hh:26
Definition: GItem.hh:24
unsigned int u_int
Definition: GTypes.hh:38
virtual GItem * Select(const u_int n, const bool b=true)
Definition: GItemList.cpp:17
virtual GItem * AddItem(const GItem &item)
Definition: GItemList.icc:45