Main Page | Packages | Help

com.as2doc.examples

class CTest

Object
  |
  +--com.as2doc.CTestSuperClass
        |
        +--com.as2doc.examples.CTest

Implemented Interfaces: ITest

dynamic class CTest
extends CTestSuperClass

Testclass used as an example for AS2Doc tag documentation.

This testclass, once generated, validates if

Code is shown correctly test code. HTML Tags work like they are supposed to:

And more code:

var myTest: CTest = new CTest("this is a test");

In-line picture:
Documentation Root Directory: ../../../
Some inline links: com.as2doc.CTestSuperClass
Another one links to the returnOne member.

Usage:
myTest = new CTest(p1[, p2]);
trace(CTest.ClassName);
trace(myTest.aProperty);
 
function test()
{
	// Some code in here
	trace(CTest.ClassName);
}
test();


Author:
Mirell Development (spam0@as2doc.com), Second author

Version:
1.0.0, Special build version line spanning multiple lines

Since:
Test API 1.0

See also:
"The Book about API 1.0", AS2Doc, Label for methodOne, ITest, InputVariations, some.other.UnknownClass, returnOne, com.as2doc.examples, CTest, com.as2doc, UnknownClass


Field Summary

public static
_maxPosition: Number
The maximum position to index into a string.

public static
_newPosition: Number
Position which may appear in the future.

public
x: Number
Documentation generates two fields entries with this comment.

public
y: Number
Documentation generates two fields entries with this comment.

Fields inherited from class com.as2doc.CTestSuperClass

_inheritedString

Fields inherited from class Object

__proto__, constructor, prototype

Property Summary

public
aProperty: String (read-only)
This property will display as read-only as there is no set method defined

static
ClassName: String (read)
This is defined as a property. It's read value type is a String.

static
ClassName: Number (write)
The read,write types of this property differ.

Properties inherited from class com.as2doc.CTestSuperClass

inheritedProperty

Constructor

public
CTest ( p1: String, p2: String)
First line is the short description.

Method Summary

public
implementThisMethod ( Parameter1: String, Parameter2: Object ): String
This method implements the ITest interface method and shows comment inheritance

public
methodOne ( p1: Number, p2: Number, p3: String ): CTest
Method with return type and parameters.

public
methodTwo ( delim: String, p2: Number ): String
Method which is excluded from documentation and throws an error.

public
returnOne ( ): Number
Also supported documentation style using // only.

Methods inherited from class com.as2doc.CTestSuperClass

getValue, inheritedMethod

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toLocaleString, toString, unwatch, valueOf, watch



Field Documentation

_maxPosition

public static var _maxPosition: Number
The maximum position to index into a string.

_newPosition

public static var _newPosition: Number
Position which may appear in the future.

x

public var x: Number
Documentation generates two fields entries with this comment.

y

public var y: Number
Documentation generates two fields entries with this comment.


Property Documentation

aProperty

public aProperty: String (read-only)
This property will display as read-only as there is no set method defined

A description is still possible on property access level

ClassName

static ClassName: String (read)
This is defined as a property. It's read value type is a String.

Usage:
trace(CTest.ClassName); // traces value of _maxPosition field

ClassName

static ClassName: Number (write)
The read,write types of this property differ.

Usage:
myTest = new CTest("1","2");
myTest.ClassName = 5552346;


Constructor Documentation

CTest

public function CTest(p1: String,
 p2: String)
First line is the short description.

This is a sample constructor.

Usage:
myTest = new CTest(p1[, p2]);

Parameters:
p1
Parameter One needs no type information, Order is important.
p2
Parameter Two needs no type information, Order is important.

Method Documentation

implementThisMethod

public function implementThisMethod(Parameter1: String,
 Parameter2: Object): String
This method implements the ITest interface method and shows comment inheritance

Any class which implements this method and is missing comments (@param) which are available in the interface, inherit these in the final documentation.

Specified by:

Parameters:
Parameter1
The first part of the combined string
Parameter2
Converts to a string and gets combined with first parameter
Returns:
Returns string combination of both parameters

methodOne

public function methodOne(p1: Number,
 p2: Number,
 p3: String): CTest
Method with return type and parameters.

If this method returns true, everything is alright. The parameter order of p1, p2 and p3 is random within the documentation and the parameter names have been added.

Usage:
myTest.methodOne(0);

Parameters:
p1
Another unused parameter.
p2
An unused parameter.
p3
This is the third parameter.
Returns:
A new CTest instance.

methodTwo

public function methodTwo(delim: String,
 p2: Number): String
Method which is excluded from documentation and throws an error.

Usage:
myString: String = myTest.methodTwo("Hallo");

Parameters:
delim
A delimiter.
p2
The index into the string
Returns:
The string "test".

Throws:
Error if "new String" did not work.

See also:

returnOne

public function returnOne(): Number
Also supported documentation style using // only.

Testing simple // commenting in multiple lines

Usage:
myNumber: Number = myTest.returnOne();

Returns:
Always 1.

Author:
Mr. Wind

Version:
1.0.0


The documentation was generated from the following file:


Generated on 27.08.2004 16:07:58 by AS2Doc