Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/08 12:12:39 (16 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.Core namespace (#331)

Location:
trunk/sources/HeuristicLab.Core/Interfaces
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/Interfaces/IConstrainedItem.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent items that are subjects to restrictions.
     29  /// </summary>
    2730  public interface IConstrainedItem : IItem {
     31    /// <summary>
     32    /// All constraints of the current instance.
     33    /// </summary>
    2834    ICollection<IConstraint> Constraints { get; }
    2935
     36    /// <summary>
     37    /// Adds a constraint to the current instance.
     38    /// </summary>
     39    /// <param name="constraint">The constraint to add.</param>
    3040    void AddConstraint(IConstraint constraint);
     41    /// <summary>
     42    /// Removes a constraint from the current instance.
     43    /// </summary>
     44    /// <param name="constraint">The constraint to remove.</param>
    3145    void RemoveConstraint(IConstraint constraint);
    3246
     47    /// <summary>
     48    /// Checks whether the current instance fullfills all constraints.
     49    /// </summary>
     50    /// <returns><c>true</c> if all constraints are fullfilled, <c>false</c> otherwise.</returns>
    3351    bool IsValid();
     52    /// <summary>
     53    /// Checks whether the current instance fullfills all constraints.
     54    /// </summary>
     55    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fullfilled.</param>
     56    /// <returns><c>true</c> if all constraints are fullfilled, <c>false</c> otherwise.</returns>
    3457    bool IsValid(out ICollection<IConstraint> violatedConstraints);
    3558
     59    /// <summary>
     60    /// An <see cref="EventHandler"/> for events when a new constraint is added.
     61    /// </summary>
    3662    event EventHandler<ConstraintEventArgs> ConstraintAdded;
     63    /// <summary>
     64    /// An <see cref="EventHandler"/> for events when a constraint is deleted.
     65    /// </summary>
    3766    event EventHandler<ConstraintEventArgs> ConstraintRemoved;
    3867  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IConstraint.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent restrictions.
     29  /// </summary>
    2730  public interface IConstraint : IItem {
     31    /// <summary>
     32    /// Gets the description of the current instance.
     33    /// </summary>
    2834    string Description { get; }
    2935
     36    /// <summary>
     37    /// Checks whether the given <paramref name="data"/> fulfills the current constraint.
     38    /// </summary>
     39    /// <param name="data">The item to check.</param>
     40    /// <returns><c>true</c> if the current instance could be fulfilled, <c>false</c> otherwise.</returns>
    3041    bool Check(IItem data);
    3142  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IEditable.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent editable items.
     29  /// </summary>
    2730  public interface IEditable : IViewable {
     31    /// <summary>
     32    /// Creates an editor.
     33    /// </summary>
     34    /// <returns>The created editor as <see cref="IEditor"/>.</returns>
    2835    IEditor CreateEditor();
    2936  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IEditor.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent an editor.
     29  /// </summary>
    2730  public interface IEditor : IView {
     31
     32    /// <summary>
     33    /// Gets or sets the filename.
     34    /// </summary>
    2835    string Filename { get; set; }
    2936
     37    /// <summary>
     38    /// Occurs when the filename was changed.
     39    /// </summary>
    3040    event EventHandler FilenameChanged;
    3141  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IEngine.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent one run. (An engine is an interpreter, holding the code,
     29  /// the data and the actual state, which is the runtime stack and a pointer onto the next operation.).
     30  /// It is responsible for operator execution and able to deal with parallelism.
     31  /// </summary>
    2732  public interface IEngine : IItem {
     33    /// <summary>
     34    /// Gets the operator graph of the current instance.
     35    /// </summary>
    2836    IOperatorGraph OperatorGraph { get; }
     37    /// <summary>
     38    /// Gets the global scope of the current instance.
     39    /// </summary>
    2940    IScope GlobalScope { get; }
    3041
     42    /// <summary>
     43    /// Gets the execution time of the current instance.
     44    /// </summary>
    3145    TimeSpan ExecutionTime { get; }
    3246
     47    /// <summary>
     48    /// Gets information whether the engine is currently running.
     49    /// </summary>
    3350    bool Running { get; }
     51    /// <summary>
     52    /// Gets information whether the engine is canceled.
     53    /// </summary>
    3454    bool Canceled { get; }
     55    /// <summary>
     56    /// Gets information whether the engine has already terminated.
     57    /// </summary>
    3558    bool Terminated { get; }
    3659
     60    /// <summary>
     61    /// Executes the whole run.
     62    /// </summary>
    3763    void Execute();
     64    /// <summary>
     65    /// Executes one step (one operation).
     66    /// </summary>
    3867    void ExecuteStep();
     68    /// <summary>
     69    /// Executes the given number of steps.
     70    /// </summary>
     71    /// <param name="steps">The number of steps to execute.</param>
    3972    void ExecuteSteps(int steps);
     73    /// <summary>
     74    /// Aborts the engine run.
     75    /// </summary>
    4076    void Abort();
     77    /// <summary>
     78    /// Resets the current instance.
     79    /// </summary>
    4180    void Reset();
    4281
     82    /// <summary>
     83    /// Occurs when the current instance is initialized.
     84    /// </summary>
    4385    event EventHandler Initialized;
     86    /// <summary>
     87    /// Occurs when an operation is executed.
     88    /// </summary>
    4489    event EventHandler<OperationEventArgs> OperationExecuted;
     90    /// <summary>
     91    /// Occurs when an exception was thrown.
     92    /// </summary>
    4593    event EventHandler<ExceptionEventArgs> ExceptionOccurred;
     94    /// <summary>
     95    /// Occurs when the execution time was changed.
     96    /// </summary>
    4697    event EventHandler ExecutionTimeChanged;
     98    /// <summary>
     99    /// Occurs when the engine is finished.
     100    /// </summary>
    47101    event EventHandler Finished;
    48102  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IItem.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent (almost) every HeuristicLab object (an object, an operator,...).
     29  /// </summary>
    2730  public interface IItem : IStorable, IViewable {
     31    /// <summary>
     32    /// Fires a new <c>Changed</c> event.
     33    /// </summary>
    2834    void FireChanged();
    2935
     36    /// <summary>
     37    /// Occurs when the current instance has changed.
     38    /// </summary>
    3039    event EventHandler Changed;
    3140  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperation.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent an operation (Executes a defined number of operators on a defined scope).
     29  /// </summary>
    2730  public interface IOperation : IItem {
    2831  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperator.cs

    r47 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent an operator (e.g. GreaterThanComparator,...),
     29  /// a basic instruction of an algorithm.
     30  /// </summary>
    2731  public interface IOperator : IConstrainedItem {
     32    /// <summary>
     33    /// Gets or sets the name of the current instance.
     34    /// </summary>
    2835    string Name { get; set; }
     36    /// <summary>
     37    /// Gets or sets the description of the current instance.
     38    /// </summary>
    2939    string Description { get; }
    3040
     41    /// <summary>
     42    /// Gets information whether the current operator has been canceled.
     43    /// </summary>
    3144    bool Canceled { get; }
     45    /// <summary>
     46    /// Gets or sets a boolean value whether the engine should stop here during the run.
     47    /// </summary>
    3248    bool Breakpoint { get; set; }
    3349
     50    /// <summary>
     51    /// Gets a list of all sub operators.
     52    /// </summary>
    3453    IList<IOperator> SubOperators { get; }
     54    /// <summary>
     55    /// Gets a collection of all variable (parameter) infos.
     56    /// </summary>
    3557    ICollection<IVariableInfo> VariableInfos { get; }
     58    /// <summary>
     59    /// Gets a collection of all variables of the current operator.
     60    /// </summary>
    3661    ICollection<IVariable> Variables { get; }
    3762
     63    /// <summary>
     64    /// Adds the given sub operator to the current instance.
     65    /// </summary>
     66    /// <param name="op">The operator to add.</param>
    3867    void AddSubOperator(IOperator op);
     68    /// <summary>
     69    /// Adds the given sub operator to the current instance if all constraints can be fulfilled.
     70    /// </summary>
     71    /// <param name="op">The operator to add.</param>
     72    /// <returns><c>true</c> if the operator could be added without violating constraints,
     73    /// <c>false</c> otherwise.</returns>
    3974    bool TryAddSubOperator(IOperator op);
     75    /// <summary>
     76    /// Adds the given sub operator to the current instance if all constraints can be fulfilled.
     77    /// </summary>
     78    /// <param name="op">The operator to add.</param>
     79    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     80    /// fulfilled.</param>
     81    /// <returns><c>true</c> if the operator could be added without violating constraints,
     82    /// <c>false</c> otherwise.</returns>
    4083    bool TryAddSubOperator(IOperator op, out ICollection<IConstraint> violatedConstraints);
     84    /// <summary>
     85    /// Adds the given sub operator at a the specified <paramref name="index"/>.
     86    /// </summary>
     87    /// <param name="op">The operator to add.</param>
     88    /// <param name="index">The position where to add the operator.</param>
    4189    void AddSubOperator(IOperator op, int index);
     90    /// <summary>
     91    /// Adds the given operator at the specified <paramref name="index"/> to the current instance
     92    /// if all constraints can be fulfilled.
     93    /// </summary>
     94    /// <param name="op">The operator to add.</param>
     95    /// <param name="index">The position where to add the operator.</param>
     96    /// <returns><c>true</c> if the operator could be added without violating constraints,
     97    /// <c>false</c> otherwise.</returns>
    4298    bool TryAddSubOperator(IOperator op, int index);
     99    /// <summary>
     100    /// Adds the given operator at the specified <paramref name="index"/> to the current instance
     101    /// if all constraints can be fulfilled.
     102    /// </summary>
     103    /// <param name="op">The operator to add.</param>
     104    /// <param name="index">The position where to add the operator.</param>
     105    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     106    /// fulfilled.</param>
     107    /// <returns><c>true</c> if the operator could be added without violating constraints,
     108    /// <c>false</c> otherwise.</returns>
    43109    bool TryAddSubOperator(IOperator op, int index, out ICollection<IConstraint> violatedConstraints);
     110    /// <summary>
     111    /// Removes a sub operator at the specified <paramref name="index"/>.
     112    /// </summary>
     113    /// <param name="index">The position where to delete the operator.</param>
    44114    void RemoveSubOperator(int index);
     115    /// <summary>
     116    /// Removes a sub operator at the specified <paramref name="index"/> if all constraint can be fulfilled.
     117    /// </summary>
     118    /// <param name="index">The position where to delete the operator.</param>
     119    /// <returns><c>true</c> if the operator could be deleted without violating constraints,
     120    /// <c>false</c> otherwise.</returns>
    45121    bool TryRemoveSubOperator(int index);
     122    /// <summary>
     123    /// Deletes the operator at the specified <paramref name="index"/> 
     124    /// if all constraints can be fulfilled.
     125    /// </summary>
     126    /// <param name="index">The position where to delete the operator.</param>
     127    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     128    /// fulfilled.</param>
     129    /// <returns><c>true</c> if the operator could be deleted without violating constraints,
     130    /// <c>false</c> otherwise.</returns>
    46131    bool TryRemoveSubOperator(int index, out ICollection<IConstraint> violatedConstraints);
    47132
     133    /// <summary>
     134    /// Gets the variable info with the given <paramref name="formalName"/>.
     135    /// </summary>
     136    /// <param name="formalName">The formal name of the variable info.</param>
     137    /// <returns>The variable info with the specified formal name.</returns>
    48138    IVariableInfo GetVariableInfo(string formalName);
     139    /// <summary>
     140    /// Adds the specified variable info to the current instance.
     141    /// </summary>
     142    /// <param name="variableInfo">The variable info to add.</param>
    49143    void AddVariableInfo(IVariableInfo variableInfo);
     144    /// <summary>
     145    /// Adds the specified variable info to the current instance, if all constraints can be fulfilled.
     146    /// </summary>
     147    /// <param name="variableInfo">The variable info to add.</param>
     148    /// <returns><c>true</c> if the variable info could be added without violating constraints,
     149    /// <c>false</c> otherwise.</returns>
    50150    bool TryAddVariableInfo(IVariableInfo variableInfo);
     151    /// <summary>
     152    /// Adds the specified variable info to the current instance, if all constraints can be fulfilled.
     153    /// </summary>
     154    /// <param name="variableInfo">The variable info to add.</param>
     155    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     156    /// fulfilled.</param>
     157    /// <returns><c>true</c> if the variable info could be added without violating constraints,
     158    /// <c>false</c> otherwise.</returns>
    51159    bool TryAddVariableInfo(IVariableInfo variableInfo, out ICollection<IConstraint> violatedConstraints);
     160    /// <summary>
     161    /// Removes the variable info with the given formal name.
     162    /// </summary>
     163    /// <param name="formalName">The formal name of the variable info to remove.</param>
    52164    void RemoveVariableInfo(string formalName);
     165    /// <summary>
     166    /// Deletes the variable info with the given formal name,
     167    /// if all constraints can be fulfilled.
     168    /// </summary>
     169    /// <param name="formalName">The formal name of the variable info to remove.</param>
     170    /// <returns><c>true</c> if the variable info could be deleted without violating constraints,
     171    /// <c>false</c> otherwise.</returns>
    53172    bool TryRemoveVariableInfo(string formalName);
     173    /// <summary>
     174    /// Deletes the variable info with the given formal name,
     175    /// if all constraints can be fulfilled.
     176    /// </summary>
     177    /// <param name="formalName">The formal name of the variable info to remove.</param>
     178    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     179    /// fulfilled.</param>
     180    /// <returns><c>true</c> if the variable info could be deleted without violating constraints,
     181    /// <c>false</c> otherwise.</returns>
    54182    bool TryRemoveVariableInfo(string formalName, out ICollection<IConstraint> violatedConstraints);
    55183
     184    /// <summary>
     185    /// Gets a variable with the given <paramref name="name"/>.
     186    /// </summary>
     187    /// <param name="name">The name of the variable.</param>
     188    /// <returns>The variable with the specified name.</returns>
    56189    IVariable GetVariable(string name);
     190    /// <summary>
     191    /// Adds the specified <paramref name="variable"/> to the current instance.
     192    /// </summary>
     193    /// <param name="variable">The variable to add.</param>
    57194    void AddVariable(IVariable variable);
     195    /// <summary>
     196    /// Adds the specified <paramref name="variable"/> to the current instance if all constraints can
     197    /// be fulfilled.
     198    /// </summary>
     199    /// <param name="variable">The variable to add.</param>
     200    /// <returns><c>true</c> if the variable could be added without violating constraints,
     201    /// <c>false</c> otherwise.</returns>
    58202    bool TryAddVariable(IVariable variable);
     203    /// <summary>
     204    /// Adds the specified <paramref name="variable"/> to the current instance if all constraints can
     205    /// be fulfilled.
     206    /// </summary>
     207    /// <param name="variable">The variable to add.</param>
     208    /// <param name="violatedConstraints">Output parameter; contains all constraints that could
     209    /// not be fulfillled.</param>
     210    /// <returns><c>true</c> if the variable could be added without violating constraints,
     211    /// <c>false</c> otherwise.</returns>
    59212    bool TryAddVariable(IVariable variable, out ICollection<IConstraint> violatedConstraints);
     213    /// <summary>
     214    /// Deletes the variable with the specified <paramref name="name"/>.
     215    /// </summary>
     216    /// <param name="name">The name of the variable to delete.</param>
    60217    void RemoveVariable(string name);
     218    /// <summary>
     219    /// Deletes the variable with the specified <paramref name="name"/> if all constraints can be
     220    /// fulfilled.
     221    /// </summary>
     222    /// <param name="name">The name of the variable to remove.</param>
     223    /// <returns><c>true</c> if the variable could be deleted without violating constraints,
     224    /// <c>false</c> otherwise.</returns>
    61225    bool TryRemoveVariable(string name);
     226    /// <summary>
     227    /// Deletes the variable with the specified <paramref name="name"/> if all constraints can be
     228    /// fulfilled.
     229    /// </summary>
     230    /// <param name="name">The name of the variable to remove.</param>
     231    /// <param name="violatedConstraints">Output parameter; contains all constraints that could
     232    /// not be fulfilled.</param>
     233    /// <returns><c>true</c> if the variable could be deleted without violating constraints,
     234    /// <c>false</c> otherwise.</returns>
    62235    bool TryRemoveVariable(string name, out ICollection<IConstraint> violatedConstraints);
     236   
     237    /// <inheritdoc cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool)"/>
     238    /// <typeparam name="T">The type of the value that is searched.</typeparam>       
    63239    T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup) where T : class, IItem;
     240    /// <inheritdoc cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool, bool)"/>
     241    /// <typeparam name="T">The type of the value that is searched.</typeparam>
    64242    T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup, bool throwOnError) where T : class, IItem;
     243    /// <inheritdoc cref="GetVariableValue(System.String, IScope, bool, bool)"
     244    /// select="summary"/>
     245    /// <param name="formalName">The formal name of the variable info whose variable value is searched.</param>
     246    /// <param name="scope">The scope where to look for the variable.</param>
     247    /// <param name="recursiveLookup">Boolean value, whether also the parent scopes shall be searched if
     248    /// the variable is not found in the specified <paramref name="scope"/>.</param>
     249    /// <returns>The value of the searched variable or null if it is not found.</returns>
    65250    IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup);
     251    /// <summary>
     252    /// Gets the value of the variable in the specified <paramref name="scope"/>
     253    /// whose variable(parameter) info has the specified <paramref name="formalName"/>.
     254    /// </summary>
     255    /// <param name="formalName">The formal name of the variable info whose variable value is searched.</param>
     256    /// <param name="scope">The scope where to look for the variable.</param>
     257    /// <param name="recursiveLookup">Boolean value, whether also the parent scopes shall be searched if
     258    /// the variable is not found in the specified <paramref name="scope"/>.</param>
     259    /// <param name="throwOnError">Boolean value, whether an exception shall be thrown, if the variable
     260    /// cannot be found or just <c>null</c> shall be returned.</param>
     261    /// <returns>The value of the searched variable (or null if the variable is not
     262    /// found and <paramref name="throwOnError"/> is set to false).</returns>
    66263    IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup, bool throwOnError);
    67264
     265    /// <summary>
     266    /// Executes the current instance on the specified <paramref name="scope"/>.
     267    /// </summary>
     268    /// <param name="scope">The scope where to execute the current instance.</param>
     269    /// <returns>The next operation.</returns>
    68270    IOperation Execute(IScope scope);
     271    /// <summary>
     272    /// Aborts the current operator.
     273    /// </summary>
    69274    void Abort();
    70275
     276    /// <summary>
     277    /// Occurs when the name of the operator was changed.
     278    /// </summary>
    71279    event EventHandler NameChanged;
    72     event EventHandler BreakpointChanged;
     280    /// <summary>
     281    /// Occurs when the breakpoint flag of the current instance was changed.
     282    /// </summary>
     283    event EventHandler BreakpointChanged;
     284    /// <summary>
     285    /// Occurs when a sub operator has been added.
     286    /// </summary>
    73287    event EventHandler<OperatorIndexEventArgs> SubOperatorAdded;
     288    /// <summary>
     289    /// Occurs when a sub operator has been deleted.
     290    /// </summary>
    74291    event EventHandler<OperatorIndexEventArgs> SubOperatorRemoved;
     292    /// <summary>
     293    /// Occurs when a variable info has been added.
     294    /// </summary>
    75295    event EventHandler<VariableInfoEventArgs> VariableInfoAdded;
     296    /// <summary>
     297    /// Occurs when a variable info has been deleted.
     298    /// </summary>
    76299    event EventHandler<VariableInfoEventArgs> VariableInfoRemoved;
     300    /// <summary>
     301    /// Occurs when a variable has been added.
     302    /// </summary>
    77303    event EventHandler<VariableEventArgs> VariableAdded;
     304    /// <summary>
     305    /// Occurs when a variable has been deleted.
     306    /// </summary>
    78307    event EventHandler<VariableEventArgs> VariableRemoved;
     308    /// <summary>
     309    /// Occurs when the current instance is executed.
     310    /// </summary>
    79311    event EventHandler Executed;
    80312  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperatorGraph.cs

    r47 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent an operator graph.
     30  /// </summary>
    2831  public interface IOperatorGraph : IItem {
     32    /// <summary>
     33    /// Gets all operators of the current instance.
     34    /// </summary>
    2935    ICollection<IOperator> Operators { get; }
     36    /// <summary>
     37    /// Gets or sets the initial operator (the starting one) of the current instance.
     38    /// </summary>
    3039    IOperator InitialOperator { get; set; }
    3140
     41    /// <summary>
     42    /// Adds the given operator to the current instance.
     43    /// </summary>
     44    /// <param name="op">The operator to add.</param>
    3245    void AddOperator(IOperator op);
     46    /// <summary>
     47    /// Removes an operator with the specified <paramref name="guid"/> from the current instance.
     48    /// </summary>
     49    /// <param name="guid">The unique id of the operator to remove.</param>
    3350    void RemoveOperator(Guid guid);
     51    /// <summary>
     52    /// Gets the operator with the specified <paramref name="guid"/>.
     53    /// </summary>
     54    /// <param name="guid">The unique id of the operator.</param>
     55    /// <returns>The searched operator.</returns>
    3456    IOperator GetOperator(Guid guid);
     57    /// <summary>
     58    /// Clears the current instance.
     59    /// </summary>
    3560    void Clear();
    3661
     62    /// <summary>
     63    /// Occurs when a new operator has been added to the current instance.
     64    /// </summary>
    3765    event EventHandler<OperatorEventArgs> OperatorAdded;
     66    /// <summary>
     67    /// Occurs when an operator has been deleted from the current instance.
     68    /// </summary>
    3869    event EventHandler<OperatorEventArgs> OperatorRemoved;
     70    /// <summary>
     71    /// Occurs when the initial operator (the starting one) has been changed.
     72    /// </summary>
    3973    event EventHandler InitialOperatorChanged;
    4074  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperatorGroup.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent a group of operators.
     30  /// </summary>
    2831  public interface IOperatorGroup : IStorable {
     32    /// <summary>
     33    /// Gets or sets the name of the current instance.
     34    /// </summary>
    2935    string Name { get; set; }
     36    /// <summary>
     37    /// Gets all sub groups of operators of the current instance.
     38    /// </summary>
    3039    ICollection<IOperatorGroup> SubGroups { get; }
     40    /// <summary>
     41    /// Gets all operators of the current operator group.
     42    /// </summary>
    3143    ICollection<IOperator> Operators { get; }
    3244
     45    /// <summary>
     46    /// Adds the specified sub group of operators to the current operator group.
     47    /// </summary>
     48    /// <param name="group">The operator group to add.</param>
    3349    void AddSubGroup(IOperatorGroup group);
     50    /// <summary>
     51    /// Deletes the specified sub group of operators from the current instance.
     52    /// </summary>
     53    /// <param name="group">The sub group to delete.</param>
    3454    void RemoveSubGroup(IOperatorGroup group);
     55    /// <summary>
     56    /// Adds the specified operator to the current instance.
     57    /// </summary>
     58    /// <param name="op">The operator to add.</param>
    3559    void AddOperator(IOperator op);
     60    /// <summary>
     61    /// Deletes the specified operator from the current instance.
     62    /// </summary>
     63    /// <param name="op">The operator to remove.</param>
    3664    void RemoveOperator(IOperator op);
    3765
     66    /// <summary>
     67    /// Occurs when the name of the operator group has been changed.
     68    /// </summary>
    3869    event EventHandler NameChanged;
    3970  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperatorLibrary.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent a library of operators.
     30  /// </summary>
    2831  public interface IOperatorLibrary : IItem {
     32    /// <summary>
     33    /// Gets the operator group of the current instance.
     34    /// </summary>
    2935    IOperatorGroup Group { get; }
    3036  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IRandom.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents an interface for random number generators.
     30  /// </summary>
    2831  public interface IRandom : IItem {
     32    /// <summary>
     33    /// Resets the random number generator.
     34    /// </summary>
    2935    void Reset();
     36    /// <summary>
     37    /// Resets the random number generator with the given <paramref name="seed"/>.
     38    /// </summary>
     39    /// <param name="seed">The new seed.</param>
    3040    void Reset(int seed);
    3141
     42    /// <summary>
     43    /// Gets a new random number.
     44    /// </summary>
     45    /// <returns>A random integer number.</returns>
    3246    int Next();
     47    /// <summary>
     48    /// Gets a new random number between 0 and <paramref name="maxVal"/>.
     49    /// </summary>
     50    /// <param name="maxVal">The maximal value of the random number.</param>
     51    /// <returns>A random integer number smaller than or equal to <paramref name="maxVal"/>.</returns>
    3352    int Next(int maxVal);
     53    /// <summary>
     54    /// Gets a new random number between <paramref name="minVal"/> and <paramref name="maxVal"/>.
     55    /// </summary>
     56    /// <param name="maxVal">The maximal value of the random number.</param>
     57    /// <param name="minVal">The minimal value of the random number.</param>
     58    /// <returns>A random integer number. (<paramref name="minVal"/> &lt;= x &lt;= <paramref name="maxVal"/>.</returns>
    3459    int Next(int minVal, int maxVal);
     60    /// <summary>
     61    /// Gets a new double random number.
     62    /// </summary>
     63    /// <returns>A random double number.</returns>
    3564    double NextDouble();
    3665  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IScope.cs

    r63 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface for a hierarchical container of variables (containing variables and subscopes).
     30  /// </summary>
    2831  public interface IScope : IItem {
     32    /// <summary>
     33    /// Gets the name of the current instance.
     34    /// </summary>
    2935    string Name { get; }
    3036
     37    /// <summary>
     38    /// Gets the varibles of the current scope.
     39    /// </summary>
    3140    ICollection<IVariable> Variables { get; }
     41    /// <summary>
     42    /// Gets all aliases of the current scope.
     43    /// </summary>
    3244    IEnumerable<KeyValuePair<string, string>> Aliases { get; }
     45    /// <summary>
     46    /// Gets all subscopes in the current scope.
     47    /// </summary>
    3348    IList<IScope> SubScopes { get; }
    3449
     50    /// <summary>
     51    /// Sets the parent scope for the current instance.
     52    /// </summary>
     53    /// <param name="scope">The parent scope of the current instance.</param>
    3554    void SetParent(IScope scope);
    3655
     56    /// <summary>
     57    /// Gets a variable with the given <paramref name="name"/>.
     58    /// </summary>
     59    /// <param name="name">The name of the variable.</param>
     60    /// <returns>The variable with the specified name.</returns>
    3761    IVariable GetVariable(string name);
     62    /// <summary>
     63    /// Adds the specified variable to the curent instance.
     64    /// </summary>
     65    /// <param name="variable">The variable to add.</param>
    3866    void AddVariable(IVariable variable);
     67    /// <summary>
     68    /// Deletes a variable with the specified <paramref name="name"/> from the current instance.
     69    /// </summary>
     70    /// <param name="name">The name of the variable to delete.</param>
    3971    void RemoveVariable(string name);
     72   
     73    /// <inheritdoc cref="GetVariableValue(string, bool)"/>
     74    /// <typeparam name="T">The type of the value that is searched.</typeparam>
    4075    T GetVariableValue<T>(string name, bool recursiveLookup) where T : class, IItem;
     76    /// <inheritdoc cref="GetVariableValue(string, bool, bool)"/>
     77    /// <typeparam name="T">The type of the value that is searched.</typeparam>
    4178    T GetVariableValue<T>(string name, bool recursiveLookup, bool throwOnError) where T : class, IItem;
     79    /// <inheritdoc cref="GetVariableValue(string, bool, bool)" select="summary"/>
     80    /// <param name="name">The name of the variable.</param>
     81    /// <param name="recursiveLookup">Boolean value, whether the parent scopes shall be searched
     82    /// when the variable is not found in the current instance.</param>
     83    /// <returns>The value of the variable or <c>null</c> if it was not found.</returns>
    4284    IItem GetVariableValue(string name, bool recursiveLookup);
     85    /// <summary>
     86    /// Gets the value of the variable with the given <paramref name="name"/>.
     87    /// </summary>
     88    /// <param name="name">The name of the variable.</param>
     89    /// <param name="recursiveLookup">Boolean value, whether the parent scopes shall be searched
     90    /// when the variable is not found in the current instance.</param>
     91    /// <param name="throwOnError">Boolean value, whether an exception shall be thrown when the searched
     92    /// variable cannot be found, or only <c>null</c> shall be returned.</param>
     93    /// <returns>The value of the searched variable or <c>null</c> if <paramref name="throwOnError"/>
     94    /// is set to <c>false</c>.</returns>
    4395    IItem GetVariableValue(string name, bool recursiveLookup, bool throwOnError);
    4496
     97    /// <summary>
     98    /// Gets the actual name the given alias.
     99    /// </summary>
     100    /// <param name="name">The alias whose actual name is searched.</param>
     101    /// <returns>The actual name.</returns>
    45102    string TranslateName(string name);
     103    /// <summary>
     104    /// Adds an alias to the current instance.
     105    /// </summary>
     106    /// <param name="alias">The alias to add.</param>
     107    /// <param name="name">The actual name of the alias.</param>
    46108    void AddAlias(string alias, string name);
     109    /// <summary>
     110    /// Deletes the specified <paramref name="alias"/> from the current instance.
     111    /// </summary>
     112    /// <param name="alias">The alias to delete.</param>
    47113    void RemoveAlias(string alias);
    48114
     115    /// <summary>
     116    /// Adds the specified sub scope to the current instance.
     117    /// </summary>
     118    /// <param name="scope">The sub scope to add.</param>
    49119    void AddSubScope(IScope scope);
     120    /// <summary>
     121    /// Deletes the specified sub scope from the current instance.
     122    /// </summary>
     123    /// <param name="scope">The sub scope to delete.</param>
    50124    void RemoveSubScope(IScope scope);
     125    /// <summary>
     126    /// Reorders all sub scopes according to the specified chronology.
     127    /// </summary>
     128    /// <param name="sequence">The chronology how to order the sub scopes.</param>
    51129    void ReorderSubScopes(int[] sequence);
     130    /// <summary>
     131    /// Gets the sub scope with the given <paramref name="guid"/>.
     132    /// </summary>
     133    /// <param name="guid">The unique identifier of the sub scope.</param>
     134    /// <returns>The sub scope with the given <paramref name="guid"/>.</returns>
    52135    IScope GetScope(Guid guid);
     136    /// <summary>
     137    /// Gets the sub scope with the given <paramref name="name"/>.
     138    /// </summary>
     139    /// <param name="name">The name of the sub scope.</param>
     140    /// <returns>The sub scope with the given <paramref name="name"/>.</returns>
    53141    IScope GetScope(string name);
    54142
     143    /// <summary>
     144    /// Clears the current instance.
     145    /// </summary>
    55146    void Clear();
    56147
     148    /// <summary>
     149    /// Occurs when a variable has been added to the current instance.
     150    /// </summary>
    57151    event EventHandler<VariableEventArgs> VariableAdded;
     152    /// <summary>
     153    /// Occurs when a variable has been deleted from the current instance.
     154    /// </summary>
    58155    event EventHandler<VariableEventArgs> VariableRemoved;
     156    /// <summary>
     157    /// Occurs when an alias has been added to the current instance.
     158    /// </summary>
    59159    event EventHandler<AliasEventArgs> AliasAdded;
     160    /// <summary>
     161    /// Occurs when an alias has been removed from the current instance.
     162    /// </summary>
    60163    event EventHandler<AliasEventArgs> AliasRemoved;
     164    /// <summary>
     165    /// Occurs when a sub scope has been added to the current instance.
     166    /// </summary>
    61167    event EventHandler<ScopeIndexEventArgs> SubScopeAdded;
     168    /// <summary>
     169    /// Occurs when a sub scope has been deleted from the current instance.
     170    /// </summary>
    62171    event EventHandler<ScopeIndexEventArgs> SubScopeRemoved;
     172    /// <summary>
     173    /// Occurs when the sub scopes have been reordered.
     174    /// </summary>
    63175    event EventHandler SubScopesReordered;
    64176  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IStorable.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent objects that are de- and serializeable.
     30  /// </summary>
    2831  public interface IStorable {
     32    /// <summary>
     33    /// Gets the objects unique identifier.
     34    /// </summary>
    2935    Guid Guid { get; }
    3036
     37    /// <summary>
     38    /// Clones the current instance (deep clone).
     39    /// </summary>
     40    /// <returns>The cloned object.</returns>
    3141    object Clone();
     42    /// <summary>
     43    /// Clones the current instance, considering already cloned objects.
     44    /// </summary>
     45    /// <param name="clonedObjects">All already cloned objects. (Needed to avoid cycles.)</param>
     46    /// <returns>The cloned object.</returns>
    3247    object Clone(IDictionary<Guid, object> clonedObjects);
    3348
     49    /// <summary>
     50    /// Saves the current instance as <see cref="XmlNode"/> in the specified
     51    /// <typeparamref name="document"/>.
     52    /// </summary>
     53    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     54    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     55    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     56    /// (Needed to avoid cycles.)</param>
     57    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    3458    XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects);
     59    /// <summary>
     60    /// Loads the persisted object from the specified <paramref name="node"/>.
     61    /// </summary>
     62    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
     63    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid
     64    /// cycles.)</param>
    3565    void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects);
    3666  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IVariable.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent a variable (of an operator) having a name and a value.
     30  /// </summary>
    2831  public interface IVariable : IItem {
     32    /// <summary>
     33    /// Gets or sets the name of the variable.
     34    /// </summary>
    2935    string Name { get; set; }
     36    /// <summary>
     37    /// Gets or sets the value of the variable.
     38    /// </summary>
    3039    IItem Value { get; set; }
    3140
     41    /// <summary>
     42    /// Gets the value of the variable.
     43    /// </summary>
     44    /// <typeparam name="T">The type of the variable's value.</typeparam>
     45    /// <returns>The value of the current instance.</returns>
    3246    T GetValue<T>() where T : class, IItem;
    3347
     48    /// <summary>
     49    /// Occurs when the name of the variable is currently changing.
     50    /// </summary>
    3451    event EventHandler<NameChangingEventArgs> NameChanging;
     52    /// <summary>
     53    /// Occurs when the name of the current instance has been changed.
     54    /// </summary>
    3555    event EventHandler NameChanged;
     56    /// <summary>
     57    /// Occurs when the value of the current instance has been changed.
     58    /// </summary>
    3659    event EventHandler ValueChanged;
    3760  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IVariableInfo.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to store meta-information about variables/parameters of operators.
     30  /// </summary>
    2831  public interface IVariableInfo : IItem {
     32    /// <summary>
     33    /// Gets or sets the actual name of the variable info.
     34    /// </summary>
    2935    string ActualName { get; set; }
     36    /// <summary>
     37    /// Gets or sets the formal name of the current instance.
     38    /// </summary>
    3039    string FormalName { get; }
     40    /// <summary>
     41    /// Gets the description of the current instance.
     42    /// </summary>
    3143    string Description { get; }
     44    /// <summary>
     45    /// Gets the data type of the current instance.
     46    /// </summary>
    3247    Type DataType { get; }
     48    /// <summary>
     49    /// Gets the kind of the variable info (in, out, new,...).
     50    /// </summary>
    3351    VariableKind Kind { get; }
     52    /// <summary>
     53    /// Gets or sets a boolean value whether the current instance is a local variable info.
     54    /// </summary>
    3455    bool Local { get; set; }
    3556
     57    /// <summary>
     58    /// Occurs when the actual name of the current instance has been changed.
     59    /// </summary>
    3660    event EventHandler ActualNameChanged;
     61    /// <summary>
     62    /// Occurs when the local flag has been changed.
     63    /// </summary>
    3764    event EventHandler LocalChanged;
    3865  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IView.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// An interface for all kinds visual representations of items (objects, operators...).
     30  /// </summary>
    2831  public interface IView : IControl {
     32    /// <summary>
     33    /// Gets the current item instance.
     34    /// </summary>
    2935    IItem Item { get; }
     36    /// <summary>
     37    /// Gets or sets the caption of the current instance.
     38    /// </summary>
    3039    string Caption { get; set; }
    3140
     41    /// <summary>
     42    /// Occurs when the item was changed.
     43    /// </summary>
    3244    event EventHandler ItemChanged;
     45    /// <summary>
     46    /// Occurs when the caption was changed.
     47    /// </summary>
    3348    event EventHandler CaptionChanged;
    3449  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IViewable.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent items that can displayed visually.
     29  /// </summary>
    2730  public interface IViewable {
     31    /// <summary>
     32    /// Creates a view to display the current instance.
     33    /// </summary>
     34    /// <returns>The created view.</returns>
    2835    IView CreateView();
    2936  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IVisualizationItem.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Marker interface for items that can be visualized.
     29  /// </summary>
    2730  public interface IVisualizationItem : IItem { }
    2831}
Note: See TracChangeset for help on using the changeset viewer.