1class EIdent { };
2class Cstring { };
3template < class KEY, class VALUE, class HASHER > class HashMapIterator
4{
5public:
6  virtual ~ HashMapIterator () { }
7};
8
9class ECell;
10class ECell_ptr
11{
12  ECell *mp_element;
13public:
14    ECell * operator -> () const
15  {
16    return (mp_element);
17  }
18}
19sicat_cmd_status;
20class CellListIterator;
21class ECellList
22{
23public:
24  virtual CellListIterator * createIterator () const = 0;
25  virtual ECell_ptr Find (const EIdent & anIdent) = 0;
26};
27class Foobar_Out
28{
29  virtual int get_channel () { }
30public:
31    Foobar_Out & operator << (const char *str);
32  Foobar_Out & operator << (const Cstring & cstring);
33};
34
35class Foobar_Log:public Foobar_Out { };
36extern Foobar_Log Foobar_LOG;
37template < class KEY > class BagIterator
38{
39public:
40  inline const KEY & operator * () const;
41  inline int atEnd () const;
42};
43
44class EMaskView;
45class ECell
46{
47public:
48  virtual const EMaskView & getMaskView () const = 0;
49};
50class FoobarDatabase
51{
52public:
53  const Cstring & getName (const EIdent & id) const;
54  ECellList *getCellList ();
55};
56inline FoobarDatabase &
57DB () { }
58
59class EMaskView
60{
61public:
62  inline BagIterator < EIdent > getCallerIterator () const;
63};
64struct DBHashFunctions
65{
66};
67class CellListIterator:public HashMapIterator < EIdent, ECell *,
68  DBHashFunctions >
69{
70};
71class IdentSet
72{
73public:
74  unsigned int getSize () const { }
75  int isEmpty () const { }
76};
77class IdentSetIterator
78{
79public:
80  IdentSetIterator (const IdentSet * p_source) { }
81  int atEnd () const { }
82  EIdent operator* () const { }
83};
84void
85validate ()
86{
87  IdentSet complete_cell_ids;
88  IdentSet incomplete_cell_ids;
89  CellListIterator *p_cl_it = DB ().getCellList ()->createIterator ();
90  delete p_cl_it;
91  while (!incomplete_cell_ids.isEmpty ())
92    {
93      if (incomplete_cell_ids.getSize () < complete_cell_ids.getSize ())
94	{
95	  IdentSetIterator complete_cell_it (&complete_cell_ids);
96	  while (!complete_cell_it.atEnd ())
97	    {
98	      BagIterator < EIdent > caller_it =
99		DB ().getCellList ()->Find (*complete_cell_it)->
100		getMaskView ().getCallerIterator ();
101	      while (!caller_it.atEnd ())
102		{
103		  Foobar_LOG << DB ().getName (*caller_it) << " ";
104		}
105	    }
106	}
107    }
108}
109