@operator(value={"read","get"},category=IOperatorCategory.FILE,concept={IConcept.ATTRIBUTE,IConcept.FILE}) @doc(value="Reads an attribute of the agent. The attribute's name is specified by the operand.",masterDoc=true,examples={@example(var="agent_name",value="read ('name')",equals="reads the 'name' variable of agent then assigns the returned value to the 'agent_name' variable. ",test=false)}) public static Object opRead(final IScope scope,final String s) throws GamaRuntimeException {
  final Map attributes=scope.peekReadAttributes();
  if (attributes != null) {
    return attributes.get(s);
  }
  return opRead(scope,scope.getAgent(),s);
}

@ operator ( value = { "read" , "get" } , category = IOperatorCategory . FILE , concept = { IConcept . ATTRIBUTE , IConcept . FILE } ) @ doc ( value = "Reads an attribute of the agent. The attribute's name is specified by the operand." , masterDoc = true , examples = { @ example ( var = "agent_name" , value = "read ('name')" , equals = "reads the 'name' variable of agent then assigns the returned value to the 'agent_name' variable. " , test = false ) } ) public static Object opRead ( final IScope scope , final String s ) throws GamaRuntimeException { final Map attributes = scope . peekReadAttributes ( ) ; if ( attributes != null ) { return attributes . get ( s ) ; } return opRead ( scope , scope . getAgent ( ) , s ) ; }
allows to read the value of an attribute stored in a gis if the agent has been created from this gis . values are either conserved in a special subclass of gamageometry or available during creation time in the flow of features .
