Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[docs] Add the missed documentation on the numbers' extension methods.
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Oct 14, 2017
1 parent 41f95f6 commit b2db082
Show file tree
Hide file tree
Showing 14 changed files with 584 additions and 262 deletions.
Expand Up @@ -131,6 +131,15 @@ The `Dynamic` macro is supposed to replies a value that could be interpreted as
The given string of characters will replace the `Dynamic` macro into the generated Markdown text.


The replied value by `Dynamic` is assumed to be a valid Markdown text. If this value should
be automatically formatted within a block of code, you should use the following macro:

[:ParserOff]
```text
[:DynamicCode:](expression)
```
[:ParserOn]

### Generate code from Java type

You could generate a piece of code from a Java type with the following macro:
Expand Down
Expand Up @@ -8,6 +8,7 @@ The built-in capacity `[:schedules](Schedules)` enables the agent to schedule ta
documented -->
[:Fact:]{typeof(io.sarl.core.[:schedules!]).shouldHaveMethods(
"[:task](task)(java.lang.String) : io.sarl.core.[:agenttask](AgentTask)",
"[:setname](setName)(io.sarl.core.AgentTask, java.lang.String)",
"[:execute](execute)(org.eclipse.xtext.xbase.lib.Procedures$Procedure1) : io.sarl.core.AgentTask",
"execute(io.sarl.core.AgentTask, org.eclipse.xtext.xbase.lib.Procedures$Procedure1) : io.sarl.core.AgentTask",
"[:in](in)(io.sarl.core.AgentTask, long, org.eclipse.xtext.xbase.lib.Procedures$Procedure1) : io.sarl.core.AgentTask",
Expand Down Expand Up @@ -58,6 +59,45 @@ Example:
[:End:]


## Changing the name of a task

A task has a name that serves as its identifier. You could change the task name by calling the following function:

[:Success:]
package io.sarl.docs.reference.bic
import io.sarl.core.AgentTask
interface Tmp {
[:On]
def [:setname!](task : AgentTask, name : String)
[:Off]
}
[:End:]

Example:

[:Success:]
package io.sarl.docs.reference.bic
import io.sarl.core.Initialize
import io.sarl.core.Schedules
import io.sarl.core.AgentTask
[:On]
agent A {
uses Schedules
var t : AgentTask
on Initialize {
t = task("abc")
}

def action {
this.task.setName("newName")
}
}
[:Off]
[:End:]

## Launching a Task for a single run

For running a task once time, the following function is provided:
Expand Down
Expand Up @@ -166,110 +166,96 @@ The extensions are described into categories.

### Collection Category

The [:arrayext:] class extends the class `Array` with the following functions:
The following functions are provided for extended the standard collection API:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:arrayext]$ArrayExtensions$)

The [:colext:] class extends the class `Collection` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:colext]$CollectionExtensions$)

The [:iterext:] class extends the class `Iterable` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:iterext]$IterableExtensions$)

The [:iterext2:] class extends the class `Iterator` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:iterext2]$IteratorExtensions$)

The [:listext:] class extends the class `List` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:listext]$ListExtensions$)

The [:mapext:] and [:sarlmapext:] classes extend the class `Map` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:mapext]$MapExtensions$)

[:ShowType:](io.sarl.lang.scoping.batch.[:sarlmapext]$SARLMapExtensions$)
[:DynamicCode:]{io.sarl.maven.docs.testing.ReflectExtensions.getPublicMethods(
org.eclipse.xtext.xbase.lib.ArrayExtensions,
org.eclipse.xtext.xbase.lib.CollectionExtensions,
org.eclipse.xtext.xbase.lib.IterableExtensions,
org.eclipse.xtext.xbase.lib.IteratorExtensions,
org.eclipse.xtext.xbase.lib.ListExtensions,
org.eclipse.xtext.xbase.lib.MapExtensions,
io.sarl.lang.scoping.batch.SARLMapExtensions)}


### Number Category

The [:bdecext:] class extends the class `BigDecimal` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:bdecext]$BigDecimalExtensions$)

The [:bintext:] class extends the class `BigInteger` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:bintext]$BigIntegerExtensions$)

The [:byteext:] class extends the class `Byte` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:byteext]$ByteExtensions$)

The [:dblext:] class extends the class `Double` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:dblext]$DoubleExtensions$)

The [:fltext:] class extends the class `Float` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:fltext]$FloatExtensions$)

The [:intext:] class extends the class `Integer` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:intext]$IntegerExtensions$)

The [:longext:] class extends the class `Long` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:longext]$LongExtensions$)

The [:shortext:] class extends the class `Short` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:shortext]$ShortExtensions$)
The following functions are provided for extended the standard number API:

[:DynamicCode:]{io.sarl.maven.docs.testing.ReflectExtensions.getPublicMethods(
org.eclipse.xtext.xbase.lib.BigDecimalExtensions,
org.eclipse.xtext.xbase.lib.BigIntegerExtensions,
org.eclipse.xtext.xbase.lib.ByteExtensions,
org.eclipse.xtext.xbase.lib.DoubleExtensions,
org.eclipse.xtext.xbase.lib.FloatExtensions,
org.eclipse.xtext.xbase.lib.IntegerExtensions,
org.eclipse.xtext.xbase.lib.LongExtensions,
org.eclipse.xtext.xbase.lib.ShortExtensions,
io.sarl.lang.scoping.numbers.PrimitiveByteOperatorExtensions,
io.sarl.lang.scoping.numbers.PrimitiveIntOperatorExtensions,
io.sarl.lang.scoping.numbers.PrimitiveShortOperatorExtensions,
io.sarl.lang.scoping.numbers.PrimitiveDoubleOperatorExtensions,
io.sarl.lang.scoping.numbers.PrimitiveFloatOperatorExtensions,
io.sarl.lang.scoping.numbers.PrimitiveLongOperatorExtensions,
io.sarl.lang.scoping.numbers.IntegerOperatorExtensions,
io.sarl.lang.scoping.numbers.ShortOperatorExtensions,
io.sarl.lang.scoping.numbers.DoubleOperatorExtensions,
io.sarl.lang.scoping.numbers.FloatOperatorExtensions,
io.sarl.lang.scoping.numbers.ByteOperatorExtensions,
io.sarl.lang.scoping.numbers.LongOperatorExtensions,
io.sarl.lang.scoping.numbers.AtomicLongOperatorExtensions,
io.sarl.lang.scoping.numbers.AtomicIntegerOperatorExtensions,
io.sarl.lang.scoping.numbers.NumberOperatorExtensions,
io.sarl.lang.scoping.numbers.IntegerCastExtensions,
io.sarl.lang.scoping.numbers.PrimitiveShortCastExtensions,
io.sarl.lang.scoping.numbers.AtomicLongCastExtensions,
io.sarl.lang.scoping.numbers.LongCastExtensions,
io.sarl.lang.scoping.numbers.AtomicIntegerCastExtensions,
io.sarl.lang.scoping.numbers.PrimitiveByteCastExtensions,
io.sarl.lang.scoping.numbers.PrimitiveDoubleCastExtensions,
io.sarl.lang.scoping.numbers.ShortCastExtensions,
io.sarl.lang.scoping.numbers.ByteCastExtensions,
io.sarl.lang.scoping.numbers.PrimitiveFloatCastExtensions,
io.sarl.lang.scoping.numbers.FloatCastExtensions,
io.sarl.lang.scoping.numbers.DoubleCastExtensions,
io.sarl.lang.scoping.numbers.PrimitiveLongCastExtensions,
io.sarl.lang.scoping.numbers.PrimitiveIntCastExtensions)}


### Primitive Type Category

The [:boolext:] class extends the class `Boolean` with the following functions:
The following functions are provided for extended the standard primitive type API:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:boolext]$BooleanExtensions$)

The [:charext:] class extends the class `Character` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:charext]$CharacterExtensions$)
[:DynamicCode:]{io.sarl.maven.docs.testing.ReflectExtensions.getPublicMethods(
org.eclipse.xtext.xbase.lib.BooleanExtensions,
org.eclipse.xtext.xbase.lib.CharacterExtensions)}


### Object Type Category

The [:compext:] class extends the class `Comparable` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:compext]$ComparableExtensions$)

The [:objext:] class extends the class `Object` with the following functions:
The following functions are provided for extended the Object types:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:objext]$ObjectExtensions$)

The [:strext:] class extends the class `String` with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:strext]$StringExtensions$)
[:DynamicCode:]{io.sarl.maven.docs.testing.ReflectExtensions.getPublicMethods(
org.eclipse.xtext.xbase.lib.ComparableExtensions,
org.eclipse.xtext.xbase.lib.ObjectExtensions,
org.eclipse.xtext.xbase.lib.StringExtensions)}


### Functions and Procedure Category

The [:funcext:] class extends the function type with the following functions:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:funcext]$FunctionExtensions$)

The [:procext:] class extends the procedure type with the following functions:
The following functions are provided for extended the standard Lambda expression API:

[:ShowType:](org.eclipse.xtext.xbase.lib.[:procext]$ProcedureExtensions$)
[:DynamicCode:]{io.sarl.maven.docs.testing.ReflectExtensions.getPublicMethods(
org.eclipse.xtext.xbase.lib.FunctionExtensions,
org.eclipse.xtext.xbase.lib.ProcedureExtensions)}


### Time Category

The [:timeext:] class extends the number classes with the following time-based functions:
The following functions are provided for extended the standard time API:

[:ShowType:](io.sarl.lang.scoping.batch.[:timeext]$SARLTimeExtensions$)
[:DynamicCode:]{io.sarl.maven.docs.testing.ReflectExtensions.getPublicMethods(
io.sarl.lang.scoping.batch.SARLTimeExtensions)}



Expand Down
Expand Up @@ -175,7 +175,7 @@ InferredPrototype createPrototypeFromSarlModel(QualifiedActionName id, boolean i
*/
String toJavaArgument(String callerQualifiedName, String argumentSpecification);

/** Replies the default value of the formal parameter at the given position.
/** Replies the default value of the given formal parameter.
*
* <p>This function replies the string representation of the default value.
*
Expand Down
Expand Up @@ -40,6 +40,7 @@ public class Messages extends NLS {
public static String SarlDocumentationParser_3;
public static String SarlDocumentationParser_4;
public static String SarlDocumentationParser_5;
public static String SarlDocumentationParser_6;
public static String DynamicValidationContext_0;
public static String DynamicValidationContext_1;
public static String InvalidAnchorLabelException_0;
Expand Down

0 comments on commit b2db082

Please sign in to comment.