21 #include <tjutils/tjutils.h>
31 static const char* get_compName();
36 class ListItemBase {};
42 virtual ~ListBase() {}
43 virtual void objlist_remove(ListItemBase* item) = 0;
51 class ListItem :
public ListItemBase {
59 ListItem(
const ListItem&) {}
60 ListItem& operator = (
const ListItem&) {
return *
this;}
63 unsigned int numof_references()
const {
return objhandlers.size();}
65 const ListItemBase& append_objhandler(ListBase& objhandler)
const;
66 const ListItemBase& remove_objhandler(ListBase& objhandler)
const;
70 mutable STD_list<ListBase*> objhandlers;
105 template<
class I,
class P,
class R>
class List :
public ListBase {
145 unsigned int size()
const {
return objlist.size();}
151 typedef typename STD_list<P>::iterator
iter;
181 void objlist_remove(ListItemBase* item);
183 void link_item(P ptr);
184 void unlink_item(P ptr);
STD_list< P >::iterator iter
unsigned int size() const
constiter get_const_end() const
STD_list< P >::const_iterator constiter
constiter get_const_begin() const
List & operator=(const List &l)