home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 5
/
amigaformatcd05.iso
/
mui
/
developer
/
oberon
/
txt
/
muisemaphore.mod
< prev
next >
Wrap
Text File
|
1996-08-13
|
3KB
|
93 lines
MODULE MUISemaphore;
(* $StackChk- $NilChk- $RangeChk- $CaseChk- $OvflChk- $ReturnChk- $ClearVars- *)
(* This module is generated by "GenMuiO" © 1995 by Albert Weinert *)
IMPORT
clf := Classface,
e := Exec,
m := Mui,
RootClass,
I := Intuition,
y := SYSTEM;
CONST
name *= m.cSemaphore;
TYPE
Class *= UNTRACED POINTER TO ClassDesc;
ClassDesc *= RECORD( RootClass.RootClass ) END;
VAR
class * : I.IClassPtr;
PROCEDURE ( VAR c:ClassDesc ) CopyClass*( obj : m.Object );
BEGIN
IF obj # NIL THEN
e.CopyMemAPTR(y.ADR(c),clf.InstData(c.class,obj),c.class.instSize); (* copy into boopsi obj *)
END;
END CopyClass;
PROCEDURE ( VAR c:ClassDesc ) Cleanup;
VAR msg : I.Msg;
BEGIN
msg.methodID := m.mCleanup;
IF clf.CoerceMethodA( c.class, c.object, msg ) = NIL THEN END;
END Cleanup;
PROCEDURE ( VAR c : ClassDesc ) mSemaphoreAttempt*( VAR msg : m.pSemaphoreAttempt ):e.APTR;
BEGIN
msg.msg.methodID := m.mSemaphoreAttempt;
RETURN clf.DoSuperMethodA( c.class, c.object, msg )
END mSemaphoreAttempt;
PROCEDURE ( VAR c : ClassDesc ) mSemaphoreAttemptShared*( VAR msg : m.pSemaphoreAttemptShared ):e.APTR;
BEGIN
msg.msg.methodID := m.mSemaphoreAttemptShared;
RETURN clf.DoSuperMethodA( c.class, c.object, msg )
END mSemaphoreAttemptShared;
PROCEDURE ( VAR c : ClassDesc ) mSemaphoreObtain*( VAR msg : m.pSemaphoreObtain ):e.APTR;
BEGIN
msg.msg.methodID := m.mSemaphoreObtain;
RETURN clf.DoSuperMethodA( c.class, c.object, msg )
END mSemaphoreObtain;
PROCEDURE ( VAR c : ClassDesc ) mSemaphoreObtainShared*( VAR msg : m.pSemaphoreObtainShared ):e.APTR;
BEGIN
msg.msg.methodID := m.mSemaphoreObtainShared;
RETURN clf.DoSuperMethodA( c.class, c.object, msg )
END mSemaphoreObtainShared;
PROCEDURE ( VAR c : ClassDesc ) mSemaphoreRelease*( VAR msg : m.pSemaphoreRelease ):e.APTR;
BEGIN
msg.msg.methodID := m.mSemaphoreRelease;
RETURN clf.DoSuperMethodA( c.class, c.object, msg )
END mSemaphoreRelease;
PROCEDURE Dispatch * ( cl : I.IClassPtr; obj : I.ObjectPtr; msg : I.MsgPtr ):e.APTR;
VAR c : Class;
BEGIN
IF msg.methodID # I.new THEN
c := RootClass.BoopsiToObj( cl, obj )(Class);
END;
CASE msg.methodID OF
| m.mSemaphoreAttempt : RETURN c.mSemaphoreAttempt( msg^(m.pSemaphoreAttempt) );
| m.mSemaphoreAttemptShared : RETURN c.mSemaphoreAttemptShared( msg^(m.pSemaphoreAttemptShared) );
| m.mSemaphoreObtain : RETURN c.mSemaphoreObtain( msg^(m.pSemaphoreObtain) );
| m.mSemaphoreObtainShared : RETURN c.mSemaphoreObtainShared( msg^(m.pSemaphoreObtainShared) );
| m.mSemaphoreRelease : RETURN c.mSemaphoreRelease( msg^(m.pSemaphoreRelease) );
ELSE
RETURN RootClass.Dispatch( cl, obj, msg );
END;
END Dispatch;
BEGIN
class := m.GetClass( name );
IF class = NIL THEN HALT( 205 ) END; (* Error : Object not Found *)
CLOSE
IF class # NIL THEN m.FreeClass( class ) END;
END MUISemaphore.