コード例 #1
0
        public static void readProperty(this TezReader reader, TezValueWrapper vw)
        {
            switch (vw.valueType)
            {
            case TezValueType.Bool:
            {
                var result = (TezValueWrapper <bool>)vw;
                result.value = reader.readBool(result.name);
                break;
            }

            case TezValueType.Int:
            {
                var result = (TezValueWrapper <int>)vw;
                result.value = reader.readInt(result.name);
                break;
            }

            case TezValueType.Float:
            {
                var result = (TezValueWrapper <float>)vw;
                result.value = reader.readFloat(result.name);
                break;
            }

            case TezValueType.Double:
                break;

            case TezValueType.String:
            {
                var result = (TezValueWrapper <string>)vw;
                result.value = reader.readString(result.name);
                break;
            }

            case TezValueType.Class:
                break;

            case TezValueType.StaticString:
                break;

            case TezValueType.Type:
                break;

            case TezValueType.Unknown:
                break;

            default:
                break;
            }
        }
コード例 #2
0
        public static void writeProperty(this TezWriter writer, TezValueWrapper vw)
        {
            switch (vw.valueType)
            {
            case TezValueType.Bool:
            {
                var result = (TezValueWrapper <bool>)vw;
                writer.write(result.name, result.value);
                break;
            }

            case TezValueType.Int:
            {
                var result = (TezValueWrapper <int>)vw;
                writer.write(result.name, result.value);
                break;
            }

            case TezValueType.Float:
            {
                var result = (TezValueWrapper <float>)vw;
                writer.write(result.name, result.value);
                break;
            }

            case TezValueType.Double:
                break;

            case TezValueType.String:
            {
                var result = (TezValueWrapper <string>)vw;
                writer.write(result.name, result.value);
                break;
            }

            case TezValueType.Class:
                break;

            case TezValueType.StaticString:
                break;

            case TezValueType.Type:
                break;

            case TezValueType.Unknown:
                break;

            default:
                break;
            }
        }
コード例 #3
0
        public TezTipController pushAttribute(TezValueWrapper property, bool display_basic = true)
        {
//             switch (property.valueType)
//             {
//                 case TezValueType.Float:
//                     if(property.wrapperType == TezWrapperType.WithBasic && display_basic)
//                     {
//                         this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name),
//                             string.Format("{0:N1}/{1:N1}", ((TezValueWithBasic<float>)property).value, ((TezValueWithBasic<float>)property).basic));
//                     }
//                     else
//                     {
//                         this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name), ((TezValueWrapper<float>)property).value);
//                     }
//                     break;
//                 case TezValueType.Int:
//                     if(property.wrapperType == TezWrapperType.WithBasic && display_basic)
//                     {
//                         this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name),
//                             string.Format("{0}/{1}", ((TezValueWithBasic<int>)property).value, ((TezValueWithBasic<int>)property).basic));
//                     }
//                     else
//                     {
//                         this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name), ((TezValueWrapper<int>)property).value);
//                     }
//                     break;
//                 case TezValueType.Bool:
//                     break;
//                 case TezValueType.String:
//                     this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name), ((TezValueWrapper<string>)property).value);
//                     break;
//                 case TezValueType.Class:
//                     break;
//                 case TezValueType.IDString:
//                     this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name), ((TezValueWrapper<TezIDString>)property).value);
//                     break;
//                 case TezValueType.Type:
//                     this.pushAttribute(TezService.get<TezTranslator>().translateName(property.name), TezService.get<TezTranslator>().translateName(((TezPV_Type)property).baseValue.name));
//                     break;
//                 default:
//                     break;
//             }

            return(this);
        }
コード例 #4
0
 public void readProperty(TezValueWrapper vw)
 {
     this.m_Reader.readProperty(vw);
 }
コード例 #5
0
 public void writeProperty(TezValueWrapper vw)
 {
     m_Writer.writeProperty(vw);
 }