Example #1
0
        /**
         * Add a mapping
         * @param key the key
         * @param state the state
         */
        public void add(SafraTree key, DA_State state)
        {
            AbstractedKeyType akey = new AbstractedKeyType(key);
            ValueList list = new ValueList();

            list._key = key;
            list._state = state;
            list._next = null;

            //typename map_type::value_type value (akey, list);

            //std::pair<typename  map_type:: iterator,bool > result = _map.insert(value);

            if (_map.ContainsKey(akey))
            {
                // there is already an element with this structure
                // -> insert list into current list

                ValueList head = _map[akey];
                list._next = head._next;
                head._next = list;

                _map[akey] = head;
            }
            else
            {
                _map.Add(akey, list);
            }

            _count++;
        }
Example #2
0
 public ValueList()
 {
     _state = null;
       _next = null;
       _key = null;
 }
Example #3
0
 public ValueList()
 {
     _state = null;
     _next  = null;
     _key   = null;
 }