# **********************************************************
# name dict::i_list_of_elements
# returns list of elements for given index
# not used list_table from index because of
# special identifier of index element
# The identifier is [lindex $new_elem 0][lindex $new_elem 2]
# **********************************************************
proc dict::i_list_of_elements {element} {
     set index_elements ""
     regsub {idx} $element "" idx_id
     set ind_el_list [idx_elem_list $idx_id]
     set prefix  [lindex [indexelClass::prefix] 0]
     foreach new_elem $ind_el_list {
      set object $prefix[lindex $new_elem 0][lindex $new_elem 2]
      indexel $object dict $new_elem
      lappend index_elements $object
   }


    return $index_elements
}
# *****************************************
# name dict::mk_entity_i
# returns entiry for given index
# *****************************************
proc dict::mk_entity_i {index} {
  upvar #0 $index data
   return [$data(source)::mk_entity $index]
}

proc indexClass::prefix {} {
 return {idx identifier identifier}
}

#***************************************
proc dict::get_ind_name {index} {
 set name [$index attr NAME]
 return $name
}
#***************************************
proc dict::get_ind_unique {index} {
 set unique [$index attr UNIQUE]
 if {$unique == "U"} {
    return [truevalue]
 } else {
    return [falsevalue]
 }
}
proc dict::get_ind_full_name {index} {

 set name [$index attr NAME]
 set ent  [$index ENTITY]
 set ext  [string range [$ent attr INDEX_TYPE] 0 2]
 set path [$ent GET_PATH] 
 return "$path${name}.$ext"
}


