Versions Compared

Key

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

...

Gena update the backbone according to the latest version of the Standard. Small modifications by Stef and Adrian afterwards.
Note: the documentation is not up to date at all. Actually: the documentation of the Standard is the most important one. We could already start to work on this documentation for the more static items, like the ValueDefinition, ElementSet, etc.

2.3 Buffer

The buffer has been "ported" to the latest 2.0.
However, there is an issue to adress: the extrapolation, interpolation, etc.

...

  • IArgument needs a mechanism for identifying the type of argument e.g. File, Path, int double etc Very usful for providing customised GUI functionality(question)
    Various solutions were proposed (see below). Disadvantage of having an enumeration in the Standard is that it can not be extended easily. An object type definition would be more specific.
    Rob K. concludes that Alterra's approach works quite well for what we want. The approach is based on recognized strings in the key of the Argument. Action: Rob K. will provide an example.

Adrian's proposal

...

:

Code Block
java
java

namespace OpenMI.Standard
{
    public enum EArgType
    {
        String = 0, // default
        Bool,
        Int,
        Double,
        Path, // presummed to exist and accessable
        FilePath, // presummed to exist and accessable
        PathNew,
        FilePathNew,
        XML, // Rob: can be used together with a schema for complex argument data
        MIME, // Rob: might be useful to pass in images, or text documents, etc.
    }

    /// <summary>
    /// The IArgument interface defines a key - value pair. If the property ReadOnly is
    /// false the value is editable otherwise it is read-only.
    /// </summary>
    public interface IArgument : IDescribable
    {
        /// <summary>
        /// Type that string value represents and can be converted to
        /// </summary>
        EArgType ValueType { get; }

	/// <summary>
        /// The key (string) in key-value pair.
	/// </summary>
	string Key {get;}

	/// <summary>
        /// <para>The value (double) in key-value pair.</para>
        ///
        /// <para>If the ReadOnly property is true and the property is attempted to be changed
        /// from outside an exception must be thrown.</para>
	/// </summary>
	string Value { get; set; }

	/// <summary>
        /// Defines whether the Values property may be edited from outside.
	/// </summary>
	bool ReadOnly {get;}
    }
}

...

Gena's proposal:

Current version:

Code Block
java
java

    public interface IArgument : IDescribable
    {
        string Key { get; }
        string Value { get; set; }
        bool ReadOnly { get; }
    }

Proposed change to cover types:

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; }
    }

Suggestion about by Gena on pull / loop approach, LinkableComponent

...