Beispiel #1
0
        public TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
#if (DEBUG)
            TdrDebug.tdrTrace();
#endif
            return(TdrError.ErrorType.TDR_ERR_METHOD_NOT_IMPLEMENTED);
        }
Beispiel #2
0
        public TdrError.ErrorType getSizeInfo(byte[] buffer, int size, ref uint sizeInfo)
        {
#if (DEBUG)
            TdrDebug.tdrTrace();
#endif
            return(TdrError.ErrorType.TDR_ERR_METHOD_NOT_IMPLEMENTED);
        }
Beispiel #3
0
        public TdrError.ErrorType pack(ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
#if (DEBUG)
            TdrDebug.tdrTrace();
#endif
            return(TdrError.ErrorType.TDR_ERR_METHOD_NOT_IMPLEMENTED);
        }
Beispiel #4
0
        public TdrError.ErrorType getSizeInfo(TdrReadBuf srcBuf, ref uint sizeInfo)
        {
#if (DEBUG)
            TdrDebug.tdrTrace();
#endif
            return(TdrError.ErrorType.TDR_ERR_METHOD_NOT_IMPLEMENTED);
        }
Beispiel #5
0
        /* set indent = -1 to disable indent , default: separator = '\n' */
        public TdrError.ErrorType visualize(ref TdrVisualBuf destBuf, int indent, char separator)
        {
            TdrError.ErrorType ret = TdrError.ErrorType.TDR_NO_ERROR;

            /* visualize member: this.iId */
            ret = TdrBufUtil.printVariable(ref destBuf, indent, separator, "[iId]", "{0:d}", this.iId);
            if (TdrError.ErrorType.TDR_NO_ERROR != ret)
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(ret);
            }

            /* visualize member: this.iCount */
            ret = TdrBufUtil.printVariable(ref destBuf, indent, separator, "[iCount]", "{0:d}", this.iCount);
            if (TdrError.ErrorType.TDR_NO_ERROR != ret)
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(ret);
            }

            return(ret);
        }
Beispiel #6
0
        public TdrError.ErrorType visualize(ref TdrVisualBuf destBuf, int indent, char separator)
        {
#if (DEBUG)
            TdrDebug.tdrTrace();
#endif
            return(TdrError.ErrorType.TDR_ERR_METHOD_NOT_IMPLEMENTED);
        }
Beispiel #7
0
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
#if (DEBUG)
            TdrDebug.tdrTrace();
#endif
            return(TdrError.ErrorType.TDR_ERR_METHOD_NOT_IMPLEMENTED);
        }
Beispiel #8
0
        public TdrError.ErrorType getSizeInfo(byte[] buffer, int size, ref uint sizeInfo)
        {
            if (0 == buffer.GetLength(0) || size > buffer.GetLength(0))
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }

            TdrReadBuf         srcBuf = new TdrReadBuf(ref buffer, size);
            TdrError.ErrorType ret    = getSizeInfo(srcBuf, ref sizeInfo);

            return(ret);
        }
Beispiel #9
0
        public TdrError.ErrorType load(ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
            if (null == buffer || 0 == buffer.GetLength(0) || size > buffer.GetLength(0))
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }

            TdrReadBuf         srcBuf = new TdrReadBuf(ref buffer, size);
            TdrError.ErrorType ret    = load(ref srcBuf, cutVer);

            usedSize = srcBuf.getUsedSize();

            return(ret);
        }
Beispiel #10
0
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            srcBuf.disableEndian();
            TdrError.ErrorType ret = TdrError.ErrorType.TDR_NO_ERROR;

            /* adjust cutversion */
            if (0 == cutVer || CSItemObj.CURRVERSION < cutVer)
            {
                cutVer = CSItemObj.CURRVERSION;
            }

            /* check cutversion */
            if (CSItemObj.BASEVERSION > cutVer)
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }

            /* load member: this.iId */
            {
                ret = srcBuf.readInt32(ref this.iId);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            /* load member: this.iCount */
            {
                ret = srcBuf.readInt32(ref this.iCount);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            return(ret);
        }
Beispiel #11
0
        public TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            TdrError.ErrorType ret = TdrError.ErrorType.TDR_NO_ERROR;

            /* adjust cutversion */
            if (0 == cutVer || CSItemObj.CURRVERSION < cutVer)
            {
                cutVer = CSItemObj.CURRVERSION;
            }

            /* check cutversion */
            if (CSItemObj.BASEVERSION > cutVer)
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }

            /* pack member: this.iId */
            {
                ret = destBuf.writeInt32(this.iId);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            /* pack member: this.iCount */
            {
                ret = destBuf.writeInt32(this.iCount);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            return(ret);
        }
Beispiel #12
0
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            srcBuf.disableEndian();
            TdrError.ErrorType ret = TdrError.ErrorType.TDR_NO_ERROR;

            /* adjust cutversion */
            if (0 == cutVer || ResNickname.CURRVERSION < cutVer)
            {
                cutVer = ResNickname.CURRVERSION;
            }

            /* check cutversion */
            if (ResNickname.BASEVERSION > cutVer)
            {
#if (DEBUG)
                TdrDebug.tdrTrace();
#endif
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }

            /* load member: this.iID */
            {
                ret = srcBuf.readInt32(ref this.iID);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
                    return(ret);
                }
            }

            /* load member: this.szSurname */
            {
                Int32 size4szSurname = 16;
                if (this.szSurname.GetLength(0) < size4szSurname)
                {
                    this.szSurname = new byte[LENGTH_szSurname];
                }

                /* load */
                ret = srcBuf.readCString(ref this.szSurname, (int)size4szSurname);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            /* load member: this.szMaleName */
            {
                Int32 size4szMaleName = 16;
                if (this.szMaleName.GetLength(0) < size4szMaleName)
                {
                    this.szMaleName = new byte[LENGTH_szMaleName];
                }

                /* load */
                ret = srcBuf.readCString(ref this.szMaleName, (int)size4szMaleName);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            /* load member: this.szFemaleName */
            {
                Int32 size4szFemaleName = 16;
                if (this.szFemaleName.GetLength(0) < size4szFemaleName)
                {
                    this.szFemaleName = new byte[LENGTH_szFemaleName];
                }

                /* load */
                ret = srcBuf.readCString(ref this.szFemaleName, (int)size4szFemaleName);
                if (TdrError.ErrorType.TDR_NO_ERROR != ret)
                {
#if (DEBUG)
                    TdrDebug.tdrTrace();
#endif
                    return(ret);
                }
            }

            return(ret);
        }