Exemplo n.º 1
0
        /// <summary>代入演算子:rをコピーしたものを返す</summary>
        /// <param name="r">MCUtilValue</param>
        /// <return>MCUtilValue</return>
        public MCUtilValue Clone()
        {
            MCUtilValue r = new MCUtilValue();

            Copy(r);

            return(r);
        }
Exemplo n.º 2
0
 /// <summary>
 /// コピー
 /// </summary>
 /// <param name="r"></param>
 public void Copy(MCUtilValue r)
 {
     r.m_type   = m_type;
     r.m_aryNum = m_aryNum;
     r.m_size   = m_size;
     //
     if (r.m_bool != null)
     {
         r.m_bool = new bool[m_bool.Length];
     }
     for (int i = 0; i < m_bool.Length; ++i)
     {
         r.m_bool[i] = m_bool[i];
     }
     //
     if (r.m_int != null)
     {
         r.m_int = new int[m_int.Length];
     }
     for (int i = 0; i < m_int.Length; ++i)
     {
         r.m_int[i] = m_int[i];
     }
     //
     if (r.m_float != null)
     {
         r.m_float = new float[m_float.Length];
     }
     for (int i = 0; i < m_float.Length; ++i)
     {
         r.m_float[i] = m_float[i];
     }
     //
     if (r.m_double != null)
     {
         r.m_double = new double[m_double.Length];
     }
     for (int i = 0; i < m_double.Length; ++i)
     {
         r.m_double[i] = m_double[i];
     }
 }