parray.cs

来自「Perst开源实时数据库」· CS 代码 · 共 47 行

CS
47
字号
namespace Perst
{
    using System;
	
    /// <summary>
    /// Common interface for all PArrays
    /// </summary> 
    public interface GenericPArray 
    {
        /// <summary> Get number of the array elements
        /// </summary>
        /// <returns>the number of related objects
        /// 
        /// </returns>
        int Size();

        /// <summary> Get OID of array element.
        /// </summary>
        /// <param name="i">index of the object in the relation
        /// </param>
        /// <returns>OID of the object (0 if array contains <code>null</code> reference)
        /// </returns>
        int GetOid(int i);

        /// <summary>
        /// Set owner objeet for this PArray. Owner is persistent object contaning this PArray.
        /// This method is mostly used by storage itself, but can also used explicityl by programmer if
        /// Parray component of one persistent object is assigned to component of another persistent object
        /// </summary>
        /// <param name="owner">Link owner</param>
        void SetOwner(IPersistent owner);
    }

    /// <summary>Dynamically extended array of reference to persistent objects.
    /// It is inteded to be used in classes using virtual properties to 
    /// access components of persistent objects. You can not use standard
    /// C# array here, instead you should use PArray class.
    /// PArray is created by Storage.createArray method
    /// </summary>
#if USE_GENERICS
    public interface PArray<T> : GenericPArray, Link<T> where T:class,IPersistent
#else
    public interface PArray : GenericPArray, Link
#endif
    {
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?