Exemple #1
0
        /** @copydoc LayerParameterBase::Clone */
        public override LayerParameterBase Clone()
        {
            GatherParameter p = new GatherParameter();

            p.Copy(this);
            return(p);
        }
Exemple #2
0
        /// <summary>
        /// Parses the parameter from a RawProto.
        /// </summary>
        /// <param name="rp">Specifies the RawProto to parse.</param>
        /// <returns>A new instance of the parameter is returned.</returns>
        public static GatherParameter FromProto(RawProto rp)
        {
            string          strVal;
            GatherParameter p = new GatherParameter();

            if ((strVal = rp.FindValue("axis")) != null)
            {
                p.axis = int.Parse(strVal);
            }

            return(p);
        }
Exemple #3
0
        /** @copydoc LayerParameterBase::Load */
        public override object Load(System.IO.BinaryReader br, bool bNewInstance = true)
        {
            RawProto        proto = RawProto.Parse(br.ReadString());
            GatherParameter p     = FromProto(proto);

            if (!bNewInstance)
            {
                Copy(p);
            }

            return(p);
        }
Exemple #4
0
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            GatherParameter p = (GatherParameter)src;

            m_nAxis = p.m_nAxis;
        }