ASP Documentor Reference

The following things are important in order to create a documentation for your ASP (VBScript) code:

Examples of proper comments which will be recognized by documentor:
'' @DESCRIPTION: some description
'' @RETURN: [string] returns my name
public function getMe()
end function

public property get color ''[bool] gets the color
end property

Keywords for class documentation

@CLASSTITLE Title of the class
@CREATOR Name of the class creator. Also email can be added.
@CREATEDON Date and time of class creation (format up to you)
@CDESCRIPTION Full class description
@STATICNAME Name of the variable which holds already an instance of the class. This simulates the OO concept of static classes like e.g. StringOperations which is available with the staticname str.
@POSTFIX Postfix for SmartSense (intellissense support) plugin in Macromedia Homesite
@VERSION Class version. e.g. 1.0
@COMPATIBLE What browsers are supported by this class. Useful if the class is a control which renders HTML
@REQUIRES List of other classes which are required. Seperated with ","
@FRIENDOF Name of the class this class is friend of. Useful if your component consists of more classes and they are always used as a bundle. e.g. Dropdown and DropdownItem. Both are always used togehter and DropdownItem is loaded automatically with Droddown. Thus DropdownItem is a friend of Dropdown.
Example of a proper class documentation:
'' @CLASSTITLE:		Person
'' @CREATOR:		Jack Johnson
'' @CREATEDON:		2000-01-21 20:30
'' @CDESCRIPTION:	Represents a user which is using the application. A user
''                      can be logged in and has different permissions.
'' @STATICNAME:		usr
'' @VERSION:		0.1
			
class User
end class

Keywords for method documentation

@SDESCRIPTION A one sentence description.
@DESCRIPTION The full description of the method. Includes all the details which short description does not.
@ALIAS Alias names for the same method (comma separated).
@PARAM Documentation of a method's parameter. The parameter should contain one (or more) type definition(s). byRef and byVal are recognized as well.
  • If a parameter cannot be found in the method signature and there is a parameter called option then its assumed as documentation of an option
@RETURN Description about the return value (if function) including its type(s)
Example of a proper method documentation:
'' @SDESCRIPTION:	Gets all users created on a given date and a specified role
'' @DESCRIPTION:	Useful if you want to check who signed up when with what role
'' @PARAM:		creationDate [date]: date when the users been created
'' @PARAM:		role [int], [string]: required role. 1 = admin, 0 = common user.
''			if string then "admin" or "common"
'' @RETURN:		[dictionary] list with users. empty dictionary if no users found
			
public function getAllBy(creationDate, role)
end function

Property/public member variables documentation

Properties (public property) and public member variables are documented immediately after their definition with a description and it's type.

Example of a proper property documentation:
public property get name ''[string] gets the users name
end property

public property set name(val) ''[string] sets the users name
end property

'specifying more types
public property set role ''[int], [string] sets the role of a user
end property

Example of a proper public member documentation:
public ID ''[int] ID of the user. default = 0
public name ''[string] gets/sets the name of the user

Other documentor keywords (Markers)

STATIC! Can be used within the description of methods to mark them as static methods (callable without an instance).
OBSOLETE! Can bee used within the description of methods, properties or public member variables to indicate that a member is obsolete.

Examples:
public ID ''[int] OBSOLETE! ID of the user. default = 0

'' @SDESCRIPTION: OBSOLETE! gets an user by its id.
public function getBy(id)
end function

'' @SDESCRIPTION: STATIC! gets an user by its id.
public function getByID(id)
end function

Initializations

Initializations document the default values of class properties. Those values are assigned within the constructor using the lib.init method. This method tries to get the value from a given variable and if not possible it takes a fallback value (default value). Those default values are documented as well because its a core concept of the ajaxed library which is used for the config vars of /ajaxedConfig/config.asp. With this it's possible to see the name of the config var and its default value.

Within custom applications it's possible to create own config variables which are initialized with the same concept.

Example:
class Document
public location ''[string] gets/sets the documents location

public sub class_initialize()
location = lib.init(DOCUMENT_LOCATION, "/documents/")
end sub
end class

Parsing & other important things

You should know the following things about the parsing of documentation:
Michal Gabrukiewicz, David Rankin. updated July, 2008