RemoteObjectDefaultType :=
NewType( RemoteObjectsFamily,
IsRemoteObjectRep and IsRemoteObject);
############################################################################# ## ## RemoteObject( <identifier>, <hostname>, <port> ) ## ## RemoteObject should contain all information that is necessary ## to retrieve it from the remote system ##
InstallGlobalFunction( RemoteObject, function( identifier, hostname, port )
local pos; if IsString(identifier) and IsString(hostname) and IsPosInt(port) then
pos := PositionNthOccurrence( identifier, '/', 3); if pos <> fail then
identifier := identifier{[pos+1..Length(identifier)]}; fi;
return Objectify( RemoteObjectDefaultType,
[ identifier, hostname, port ] ); else
Error( "RemoteObject( <identifier>, <hostname>, <port> ) : \n", "1st and 2nd argument must be strings, and 3rd a positive integer \n" ); fi; end);
############################################################################# ## #M \=( <x>, <y> ) . . . . . . . . . . . . . . . . . for two remote objects ## ## We decide that two remote objects are equal if they have the same ## internal representation (variable name, server and port). ##
InstallMethod( \=, "for two remote objects",
IsIdenticalObj,
[ IsRemoteObjectRep and IsRemoteObject, IsRemoteObjectRep and IsRemoteObject ], function( a, b )
return a![1] = b![1] and a![2] = b![2] and a![3] = b![3]; end );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.