Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/01/10 08:52:32 (15 years ago)
Author:
gkronber
Message:

Created a specialized view for function library injectors which allows full configuration of the function library. #748 (FunctionLibraryView is empty)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs

    r2616 r2728  
    3636    }
    3737
     38    private FunctionLibrary functionLibrary;
     39    public FunctionLibrary FunctionLibrary {
     40      get {
     41        return functionLibrary;
     42      }
     43      set {
     44        this.functionLibrary = value;
     45        FireChanged();
     46      }
     47    }
     48
    3849    public FunctionLibraryInjectorBase()
    3950      : base() {
    4051      AddVariableInfo(new VariableInfo(FUNCTIONLIBRARY, "Preconfigured default function library", typeof(FunctionLibrary), VariableKind.New));
     52      // create the default function library
     53      functionLibrary = CreateFunctionLibrary();
    4154    }
    4255
    4356    public override IOperation Apply(IScope scope) {
    44       scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), CreateFunctionLibrary()));
     57      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), functionLibrary));
    4558      return null;
    4659    }
     
    5972      }
    6073    }
     74
     75    public override IView CreateView() {
     76      return new FunctionLibraryInjectorView(this);
     77    }
    6178  }
    6279}
Note: See TracChangeset for help on using the changeset viewer.