@DATABASE "Module"
@AUTHOR   "Paul Manias"
@NODE     "Main" "Object: Module"

@{b}@{u}OBJECT DOCUMENTATION@{uu}@{ub}
Name:      @{"MODULE" LINK "Description"} AUTODOC
Version:   0.9 Beta
Date:      December 1997
Author:    Paul Manias
Copyright: DreamWorld Productions, 1996-1997.  All rights reserved.

@{b}@{u}CHANGES VERSION 0.9B@{uu}@{ub}
Added: Module->Name

@EndNode
---------------------------------------------------------------------------
@NODE "Description" "Object: Module"

@{b}@{u}OBJECT@{uu}@{ub}
Name:    Module
Module:  @{"Kernel" LINK "GMSDev:AutoDocs/Kernel.guide/Functions"}
Version: 1
Type:    Complex

@{b}@{u}DESCRIPTION@{uu}@{ub}
The  module  object serves as a launching pad for all module files.  If you
want to write a new module for public use, read the relevant section in the
general documentation.

@{b}@{u}ACTIONS@{uu}@{ub}
The Module object supports the following actions:

     @{"Free()" LINK "GMSDev:AutoDocs/Kernel.guide/Free()"}
     @{"Get() " LINK "GMSDev:AutoDocs/Kernel.guide/Get()"}
   * @{"Init()" LINK "MOD_Init()"}

@{b}@{u}STRUCTURE@{uu}@{ub}
The Module object consists of the following public fields:

     @{"Name     " LINK "MOD_Name"     } Name of the module.
     @{"Number   " LINK "MOD_Number"   } ID of the associated module, if any.
     @{"Functions" LINK "MOD_Functions"} Function jump table.
     @{"Version  " LINK "MOD_Version"  } Version number.
     @{"Revision " LINK "MOD_Revision" } Revision number.

@EndNode
---------------------------------------------------------------------------
@NODE "MOD_Name" "Object: Module"

@{b}@{u}FIELD@{uu}@{ub}
Name:      Name
Type:      BYTE *
On Change: Cannot change after initialisation.
Status:    Read/IWrite

@{b}@{u}DESCRIPTION@{uu}@{ub}
This  field points to a string that specifies the name of the module.  This
name  will  be  used  to  load  the module from the system directory, so it
actually  reflects  the  filename  of  the  module.  It is also possible to
specify sub-directories before the module name itself.

This field is optional, but if you do not know the ID of a module, you will
have to give a Name so that the module can be found.

@EndNode
---------------------------------------------------------------------------
@NODE "MOD_Functions" "Object: Module"

@{b}@{u}FIELD@{uu}@{ub}
Name:      Functions
Type:      APTR
On Change: Cannot change after initialisation.
Status:    Read/IWrite

@{b}@{u}DESCRIPTION@{uu}@{ub}



@EndNode
---------------------------------------------------------------------------
@NODE "MOD_Number" "Object: Module"

@{b}@{u}FIELD@{uu}@{ub}
Name:      Number
Type:      WORD
On Change: Cannot change after initialisation.
Status:    Read/IWrite

@{b}@{u}DESCRIPTION@{uu}@{ub}
This  field  identifies  the  number of the Module.  All modules registered
with  DreamWorld Productions will have an ID and this is the fastest way to
reference them.

@EndNode
---------------------------------------------------------------------------
@NODE "MOD_Revision" "Object: Module"

@{b}@{u}FIELD@{uu}@{ub}
Name:        Revision
Type:        LONG
Inheritance: Init()
On Change:   Cannot change after initialisation.
Status:      Read/IWrite

@{b}@{u}DESCRIPTION@{uu}@{ub}
When  opening  the  Module, the value that you insert here will specify the
minimum  revision of the module that you require.  If the module passes the
revision  criteria,  Init()  will  update  this field to reflect the actual
revision of the initialised module.

Note  that  the  revision  is closely tied to the Version number.  So, when
asking  for  version 1 revision 4 (1.4), when the available version is 2.2,
you  will still open the module successfully even though you have specified
a "lower" revision number.

@{b}@{u}SEE ALSO@{uu}@{ub}
Field: @{"Version" LINK "MOD_Version"}

@EndNode
---------------------------------------------------------------------------
@NODE "MOD_Version" "Object: Module"

@{b}@{u}FIELD@{uu}@{ub}
Name:        Version
Type:        LONG
Inheritance: Init()
On Change:   Cannot change after initialisation.
Status:      Read/IWrite

@{b}@{u}DESCRIPTION@{uu}@{ub}
When  opening  the  Module, the value that you insert here will specify the
minimum  version  of the module that you require.  If the module passes the
version  criteria,  Init()  will  update  this  field to reflect the actual
version of the initialised module.

@{b}@{u}SEE ALSO@{uu}@{ub}
Field: @{"Revision" LINK "MOD_Revision"}

@EndNode
---------------------------------------------------------------------------
@NODE "MOD_Init()" "Module: Init()"

@{b}@{u}ACTION@{uu}@{ub}
Name:    Init()
Object:  Module
Short:   Load in a system module and initialise it for function calls.

@{b}@{u}DESCRIPTION@{uu}@{ub}
Loads  in  a  module  and  initialises  it ready for function calls.  After
successful initialisation you will be able to interface with the module.

@{b}@{u}SEE ALSO@{uu}@{ub}
Kernel: @{"Init()" LINK "Init()"}

@EndNode
-----------------------------------------------------------------------------
