Changeset 12630


Ignore:
Timestamp:
2006-08-31T14:57:50+12:00 (18 years ago)
Author:
mdewsnip
Message:

Plugins now output a <Processes> and <Blocks> information field, so the GLI can tell what each plugin will handle without having to parse all the arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r12624 r12630  
    260260    return if (!defined($pluginoptions));
    261261
     262    # Find the process and block default expressions in the plugin arguments
     263    my $process_exp = "";
     264    my $block_exp = "";
     265    if (defined($pluginoptions->{'args'})) {
     266    foreach my $option (@{$pluginoptions->{'args'}}) {
     267        if ($option->{'name'} eq "process_exp") {
     268        $process_exp = $option->{'deft'};
     269        }
     270        if ($option->{'name'} eq "block_exp") {
     271        $block_exp = $option->{'deft'};
     272        }
     273    }
     274    }
     275
    262276    gsprintf(STDERR, "<PlugInfo>\n");
    263277    gsprintf(STDERR, "  <Name>$pluginoptions->{'name'}</Name>\n");
     
    268282    gsprintf(STDERR, "  <Abstract>$pluginoptions->{'abstract'}</Abstract>\n");
    269283    gsprintf(STDERR, "  <Inherits>$pluginoptions->{'inherits'}</Inherits>\n");
     284    gsprintf(STDERR, "  <Processes>$process_exp</Processes>\n");
     285    gsprintf(STDERR, "  <Blocks>$block_exp</Blocks>\n");
    270286    gsprintf(STDERR, "  <Explodes>" . ($pluginoptions->{'explodes'} || "no") . "</Explodes>\n");
    271287    unless (defined($high_level_information_only)) {
Note: See TracChangeset for help on using the changeset viewer.