Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
values = providingOutputItem.GetValues(consumerThatIsAsking);

(See also Gena's suggestion on loop vs. pull later on this page).

  1. Remark: When experimenting with the IsAvailable(), Rob B. and Stef introduced the IExchangeDefinition (see below). Rob K. actually introduced the same interface in the java version. Indeed it is quite natural entity, the exchange definition. Question: do we want to introduce it (question) .
    Code Block
    java
    java
    public interface IExchangeDefinition
        {
            IValueDefinition ValueDefinition { get; }
            ITimeSet TimeSet { get; }
            IElementSet ElementSet { get; }
        }
    

...

Code Block
java
java
    public interface IDescribable
    {
        string Caption { get; set; }
        string Description { get; set; }
    }

    public interface IValueDefinition : IDescribable
    {
        Type ValueType { get; }
        bool DescribesSameAs(IValueDefinition otherValueDefinition);
    }

    public interface IArgument : IValueDefinition
    {
         object Value { get; set; }
         bool ReadOnly { get; }
    }
  1. Suggestion by Gena on pull / loop approach, LinkableComponent
Code Block
  public interface ILinkableComponent
  {
      LinkableComponentStatus Status { get; }

      void Initialize();

      void Validate();

      void Update();

      void Finish();

      IList<IInputItem> InputItems { get; }

      IList<IOutputItem> OutputItems { get; }

      IList<IOutputDecorator> OutputDecorators { get; }

      // (another discussion) filtered data
      // get's values from the specified component
      IMatrix GetValues(IInputExchangeItem query);

      //
      // when this property is set to true
      //
      // default value is false (allow cascade calls, pull-driven)
      //
      bool CascadeUpdateCallsDisabled { get; set; }
  }

  public interface IInputItem : IExchangeItem
  {
      IMatrix Values { get; set; }
  }

  public interface IOutputItem : IExchangeItem
  {
      IMatrix Values { get; }
  }

  // =================================== pull approach

  var triggerExchangeItem = component.OutputItems[0];

  triggerComponent.GetValues(triggerExchangeItem);


  // =================================== loop approach

  while(!allComponentsAreFinished)
  {
      foreach(var component in components)
      {
          if(component.Status != LinkableComponentStatus.Finished)
          {
              component.Update();
          }
      }
  }

  // current
  public interface IMatrix : IList
  {
      int Rows { get; }

      int Columns { get; }

      object GetValue(int row, int column);

      void SetValue(object value, int row, int column);

      object[,] GetValues(int startRow, int endRow, int startColumn, int endColumn);

      void SetValues(object[,] values, int startRow, int endRow, int startColumn, int endColumn);
  }

...