コード例 #1
0
        private bool checkSplit(Split split, uint value, uint word)
        {
            bool ret = false;

            switch (split.type)
            {
            case "bit":
                if ((value & split.valueint) != 0)
                {
                    ret = true;
                }
                break;

            case "eq":
                if (value == split.valueint)
                {
                    ret = true;
                }
                break;

            case "gt":
                if (value > split.valueint)
                {
                    ret = true;
                }
                break;

            case "lt":
                if (value < split.valueint)
                {
                    ret = true;
                }
                break;

            case "gte":
                if (value >= split.valueint)
                {
                    ret = true;
                }
                break;

            case "lte":
                if (value <= split.valueint)
                {
                    ret = true;
                }
                break;

            case "wbit":
                if ((word & split.valueint) != 0)
                {
                    ret = true;
                }
                break;

            case "weq":
                if (word == split.valueint)
                {
                    ret = true;
                }
                break;

            case "wgt":
                if (word > split.valueint)
                {
                    ret = true;
                }
                break;

            case "wlt":
                if (word < split.valueint)
                {
                    ret = true;
                }
                break;

            case "wgte":
                if (word >= split.valueint)
                {
                    ret = true;
                }
                break;

            case "wlte":
                if (word <= split.valueint)
                {
                    ret = true;
                }
                break;
            }
            return(ret);
        }