ROOT logo
// $Id: ZHashList.h 2256 2009-11-21 23:24:25Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#ifndef GledCore_ZHashList_H
#define GledCore_ZHashList_H

#include <Glasses/ZList.h>

class ZHashList : public ZList
{
  MAC_RNR_FRIENDS(ZHashList);

private:
  void _init();

protected:
  virtual Int_t remove_references_to(ZGlass* lens);

  virtual void new_element_check(ZGlass* lens);
  virtual void clear_list();

  virtual void on_insert(ZList::iterator it);
  virtual void on_remove(ZList::iterator it);
  virtual void on_rebuild();

  bool	bNerdyListOps;	    // X{GS} 7 Bool()
#ifndef __CINT__
  typedef hash_map<ZGlass*, ZList::iterator>		hpLens2Iter_t;
  typedef hash_map<ZGlass*, ZList::iterator>::iterator	hpLens2Iter_i;

  hpLens2Iter_t mItHash; //!
#endif

public:
  ZHashList(const Text_t* n="ZHashList", const Text_t* t=0) : ZList(n,t)
  { _init(); }

  virtual ElType_e el_type()             { return ET_Lens; }
  virtual bool list_insert_lens_ops()    { return true; }

  virtual Bool_t Has(ZGlass* lens);

  virtual Int_t  RemoveAll(ZGlass* lens);

  virtual void   Insert(ZGlass* lens, ZGlass* before); // X{E} C{1}
  virtual void   Remove(ZGlass* lens);                 // X{E} C{1}

  // For those two, we have no alist-mir-generators and special stamps.
  // Could be added ... either or both.
  virtual void   MoveToFront(ZGlass* lens);            // X{E} C{1}
  virtual void   MoveToBack (ZGlass* lens);            // X{E} C{1}

  ZGlass* ElementAfter (ZGlass* lens);                 // X{E} C{1}
  ZGlass* ElementBefore(ZGlass* lens);                 // X{E} C{1}

#include "ZHashList.h7"
  ClassDef(ZHashList, 1);
}; // endclass ZHashList


#endif
 ZHashList.h:1
 ZHashList.h:2
 ZHashList.h:3
 ZHashList.h:4
 ZHashList.h:5
 ZHashList.h:6
 ZHashList.h:7
 ZHashList.h:8
 ZHashList.h:9
 ZHashList.h:10
 ZHashList.h:11
 ZHashList.h:12
 ZHashList.h:13
 ZHashList.h:14
 ZHashList.h:15
 ZHashList.h:16
 ZHashList.h:17
 ZHashList.h:18
 ZHashList.h:19
 ZHashList.h:20
 ZHashList.h:21
 ZHashList.h:22
 ZHashList.h:23
 ZHashList.h:24
 ZHashList.h:25
 ZHashList.h:26
 ZHashList.h:27
 ZHashList.h:28
 ZHashList.h:29
 ZHashList.h:30
 ZHashList.h:31
 ZHashList.h:32
 ZHashList.h:33
 ZHashList.h:34
 ZHashList.h:35
 ZHashList.h:36
 ZHashList.h:37
 ZHashList.h:38
 ZHashList.h:39
 ZHashList.h:40
 ZHashList.h:41
 ZHashList.h:42
 ZHashList.h:43
 ZHashList.h:44
 ZHashList.h:45
 ZHashList.h:46
 ZHashList.h:47
 ZHashList.h:48
 ZHashList.h:49
 ZHashList.h:50
 ZHashList.h:51
 ZHashList.h:52
 ZHashList.h:53
 ZHashList.h:54
 ZHashList.h:55
 ZHashList.h:56
 ZHashList.h:57
 ZHashList.h:58
 ZHashList.h:59
 ZHashList.h:60
 ZHashList.h:61
 ZHashList.h:62
 ZHashList.h:63
 ZHashList.h:64