OHyMoS.NET Class Library

OhDataPack クラス

基本型データモデルを表すクラスです。

abstract class for treating a pair of data time and data value which we call datapack.

この型のすべてのメンバの一覧については、 OhDataPack メンバを参照してください。

System.Object
   OhymosNet.OhDataPack
      OhymosNet.OhDataPackDouble
      OhymosNet.OhDataPackFloat
      OhymosNet.OhDataPackInt
      OhymosNet.OhDataPackLong

public abstract class OhDataPack : ICloneable

解説

データ時刻とデータのペアから成るデータパック型を作成するための抽象データ型モデルです。

このクラス OhDataPack では、

  • データ記録時刻 : _dataTime
  • を記憶し、
  • データ記録時刻の設定機能
  • データ記録時刻の取得機能
  • を定義しました。

    各モデルが授受するデータのモデルは、このクラス OhDataPack を継承して作成して下さい。
    using OhymosNet;
    using System;
    using System.IO;
    
    [Serializable]
    public class OhDataPackFoo :OhDataPack, ICloneable
    {
        private final Foo _dataValue;
    
        // constructors
        public OhDataPackFoo() { ... }
        public OhDataPackFoo(OhTimePointImmutable aDataTime, Foo aDataValue) { ... }
        public OhDataPackFoo(String aDataStr) { ... }
    
        // abstract methods in OhDataPack
        public String dataType() { ... }
        public void dpack2Ofile(SrintWriter sw) { ... }
        public void dpack2File(SrintWriter sw) { ... }
    
        // nonabstract methods
        public Object clone() { ... }
        public Foo getDataValue() { ... }
    }
    

    OhDataPack;

    In hydrologic simulations in which the states are updated dynamically, the data which are sent and received by elements, subsytems, and total sytem of the hydrologic system are pairs of data value(s) and a "data time". Here, "data time" means the time to which the data are related.

    For example, suppose we have the value of discharge Q at time t at some stream point. Then, we call the value of discharge Q "data value" and time t "data time".

    We call a pair of data time and data value "datapack," and we prepare class OhDataPack, which is an abstract class used as a base class from which various datapack classes are derived.
     ..... "datapack" = "data time" + "data value" .... 
    Because there are various data types for data value, there could be various datapack classes.

    Class OhDataPack is a base class from which various datapack classes are derived. Note that the classed derived from the OhDataPack class should be immutable.

    必要条件

    名前空間: OhymosNet

    アセンブリ: OhymosNet (OhymosNet.dll 内)

    参照

    OhDataPack メンバ | OhymosNet 名前空間