Commit 8a2d40c7 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

support index redirection for done in the runtime (but generate null for now)


Signed-off-by: Kristof Szabados's avatarkristof <Kristof.Szabados@ericsson.com>
parent 41412428
......@@ -315,6 +315,7 @@ public final class Done_Statement extends Statement {
}
//FIXME handle index redirection
expression.expression.append(", null");
expression.expression.append(')');
} else if (isAny) {
// any component.done
......
......@@ -2909,9 +2909,9 @@ public abstract class Type extends Governor implements IType, IIncrementallyUpda
aData.addImport("java.util.concurrent.atomic.AtomicReference");
aData.addCommonLibraryImport("Text_Buf");
aData.addCommonLibraryImport("Index_Redirect");
//FIXME add support for redirections
source.append(MessageFormat.format("public static final TitanAlt_Status done(final TitanComponent component_reference, final {0}_template value_template, final {0} value_redirect) '{'\n", genName));
source.append(MessageFormat.format("public static final TitanAlt_Status done(final TitanComponent component_reference, final {0}_template value_template, final {0} value_redirect, final Index_Redirect index_redirect) '{'\n", genName));
source.append("if (!component_reference.isBound()) {\n");
source.append("throw new TtcnError(\"Performing a done operation on an unbound component reference.\");\n");
source.append("}\n");
......
......@@ -171,8 +171,7 @@ public class TitanComponent extends Base_Type {
}
}
// originally done, TODO needs index redirection support
public TitanAlt_Status done(final TitanVerdictType value_redirect) {
public TitanAlt_Status done(final TitanVerdictType value_redirect, final Index_Redirect index_redirection) {
if (componentValue == UNBOUND_COMPREF) {
throw new TtcnError("Performing done operation on an unbound component reference.");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment