#	field.tcl -- field Tcl Command for QeTcl package
#*************************
proc field {c args} {
   upvar #0 $c data
   eval tclInt_CreateCommand $c fieldClass FieldClass $args
   return $c
}

proc fieldClass::CreateClassRec {} {
   global fieldClass
   # OPTIONS
   set fieldClass(rootOptions)   {}
   set fieldClass(options)       {}
   # DEFAULT VALUES
   # METHODS
   set fieldClass(methods)       {name parent ancestor fkey pkey entity relation list_of_constraints domain type flen fdec update ph_type}
}

proc fieldClass::ConstructCommand {c} {
   upvar #0 $c data
   # initialization stuff
}
#*************************
proc fieldClass::parent {c args} {
   upvar  #0 $c data
   return [$data(source)::parent_f $c $args]
}
#*************************
proc fieldClass::ancestor {c args} {
   upvar  #0 $c data
   return [$data(source)::ancestor_f $c]
}
#*************************
proc fieldClass::fkey {c args} {
   upvar  #0 $c data
   return [$data(source)::fkey_f $c]
}
#*************************
proc fieldClass::pkey {c args} {
   upvar  #0 $c data
   return [$data(source)::is_pkey $c]
}
#*************************
proc fieldClass::relation {c args} {
   upvar  #0 $c data
   return [$data(source)::relation_f $c]
}
#*************************
proc fieldClass::list_of_constraints {c args} {
   upvar  #0 $c data
   upvar  #0 $data(class) class
   return [$data(source)::f_constr_list $c]
}
#*************************
proc fieldClass::entity {c args} {
   upvar  #0 $c data
   return [$data(source)::mk_entity_f $c]
}
#*************************
proc fieldClass::domain {c args} {
   upvar  #0 $c data
   return [$data(source)::mk_domain $c]
}
#*************************
proc fieldClass::type {c args} {
   upvar  #0 $c data
   return [$data(source)::fld_type $c]
}
#*************************
proc fieldClass::flen {c args} {
   upvar  #0 $c data
   return [$data(source)::fld_len $c]
}
#*************************
proc fieldClass::fdec {c args} {
   upvar  #0 $c data
   return [$data(source)::fld_dec $c]
}
#*************************
proc fieldClass::name {c args} {
  upvar  #0 $c data
  upvar  #0 $data(class) class
  return [$data(source)::get_name_fld $c]
}
proc fieldClass::ph_type {c args} {
  upvar  #0 $c data
  upvar  #0 $data(class) class
  return [$data(source)::fld_ph_type $c]
}
proc fieldClass::update { c attr_name value } {
  upvar  #0 $c data
  field_$data(source)::update $c $attr_name $value
  update_attribute $c $attr_name $value
}


