GetRawConstantValue() public method

public GetRawConstantValue ( ) : Object
return Object
Esempio n. 1
0
 private static void PopulateField(System.Reflection.FieldInfo field, string value, T target)
 {
     if (field.FieldType == typeof(int))
     {
         field.SetValue(target, ParseInt(value));
     }
     else if (field.FieldType == typeof(string))
     {
         field.SetValue(target, value);
     }
     else if (field.FieldType == typeof(float))
     {
         field.SetValue(target, ParseFloat(value));
     }
     else if (field.FieldType == typeof(bool))
     {
         field.SetValue(target, value == "true");
     }
     else if (field.FieldType.IsEnum)
     {
         System.Reflection.FieldInfo val = field.FieldType.GetField(value.Replace(' ', '_'));
         if (val != null)
         {
             field.SetValue(target, val.GetRawConstantValue());
         }
         else
         {
             field.SetValue(target, field.FieldType.GetField("nil").GetRawConstantValue());
         }
     }
 }
 static object PrettyPrintField(FieldInfo fi)
 {
     return "    "
         + (fi.IsLiteral ? "const " : (fi.IsStatic ? "static " : "") + (fi.IsInitOnly ? "readonly " : ""))
         + ObjectToCode.GetCSharpFriendlyTypeName(fi.FieldType)
         + " " + fi.Name
         + (fi.IsLiteral ? " = " + ObjectToCode.ComplexObjectToPseudoCode(fi.GetRawConstantValue()) : "")
         ;
 }
Esempio n. 3
0
        // Check if the current field has the supplied value.
        private static string GetNameIfMatches(ServiceAttributeId id, System.Reflection.FieldInfo curField)
        {
            object rawValue;

            // Does this require less permissions than the GetValue version.
            rawValue = curField.GetRawConstantValue();

            ServiceAttributeId fieldValue = (ServiceAttributeId)rawValue;

            if (fieldValue == id)
            {
                string fieldName = curField.Name;
                return(fieldName);
            }
            return(null);
        }
Esempio n. 4
0
        public FieldDetail(RootDetail parent, FieldInfo fi)
            : base(parent, fi)
        {
            _name = fi.Name;
            _visibility = VisibilityUtil.GetVisibilityFor(fi);
            _category = "field";

            CodeStringBuilder csb = new CodeStringBuilder();

            AppendAttributesDeclaration(csb);

            csb.Mode = AppendMode.Html;
            csb.AppendVisibility(_visibility);
            csb.AppendText(" ");
            csb.Mode = AppendMode.Both;

            if (fi.IsLiteral)
            {
                csb.AppendKeyword("const ");
            }
            else if (fi.IsStatic)
            {
                csb.AppendKeyword("static ");
            }

            if (fi.IsInitOnly)
            {
                csb.AppendKeyword("readonly ");
            }

            csb.AppendType(fi.FieldType);
            csb.AppendText(" ");
            csb.AppendText(fi.Name);

            if (fi.IsLiteral)
            {
                csb.AppendParameterValue(fi.GetRawConstantValue());
            }

            _declaration = csb.ToString();
            _declarationHtml = csb.ToHtmlString();
        }
        public static RxFieldInfo Build(Compiler context, RxTypeInfo typeInfo, FieldInfo fieldInfo, XElement fieldMemberElement, string xid)
        {
            RxFieldInfo instance = new RxFieldInfo();

            instance.id = xid;
            instance.caption = instance.memberName = fieldInfo.Name;
            instance.SetUri(typeInfo, string.Concat("#", fieldInfo.Name));
            instance.BuildComments(context, fieldMemberElement);
            instance.isPublic = fieldInfo.IsPublic;
            instance.isStatic = fieldInfo.IsStatic;
            instance.isLiteral = fieldInfo.IsLiteral;
            if (fieldInfo.IsLiteral)
            {
                instance.literalValue = fieldInfo.GetRawConstantValue().ToString();
            }
            instance.memberInfo = fieldInfo;
            instance.fieldTypeRef = fieldInfo.FieldType.ToXMemberRef();
            //BuildAttributesElement(memberElement, memberInfo.GetCustomAttributes(false));
            return instance;
        }
Esempio n. 6
0
        static StackObject *GetRawConstantValue_25(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Reflection.FieldInfo instance_of_this_method = (System.Reflection.FieldInfo) typeof(System.Reflection.FieldInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.GetRawConstantValue();

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance, true));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true));
        }
Esempio n. 7
0
        static void ProcessField(XmlDocument output, XmlElement container, Dictionary<string, XmlElement> lookup, Type type, FieldInfo field)
        {
            if ((field.Attributes & FieldAttributes.SpecialName) != 0)
            {
                return;
            }

            var fieldXmlName = "F:";

            fieldXmlName += GetTypeXmlName(type) + ".";
            fieldXmlName += field.Name;

            XmlElement docs = null;
            if (lookup.ContainsKey(fieldXmlName))
            {
                docs = lookup[fieldXmlName];
            }

            Console.WriteLine("## Processing documentation for " + fieldXmlName);

            var fieldElem = output.CreateElement("Field");
            container.AppendChild(fieldElem);
            fieldElem.SetAttribute("Name", field.Name);
            fieldElem.SetAttribute("Anchor", GetAnchor(field));
            fieldElem.SetAttribute("IsPublic", field.IsPublic ? "True" : "False");
            fieldElem.SetAttribute("IsProtected", field.IsFamily ? "True" : "False");
            fieldElem.SetAttribute("IsPrivate", field.IsPrivate ? "True" : "False");
            fieldElem.SetAttribute("TypeName", field.FieldType.Name);
            fieldElem.SetAttribute("TypeNamespace", field.FieldType.Namespace);
            fieldElem.SetAttribute("TypeFullName", field.FieldType.FullName);
            fieldElem.SetAttribute("TypeAnchor", GetAnchor(field.FieldType));
            try
            {
                var constVal = field.GetRawConstantValue();
                if (constVal != null)
                {
                    if (constVal is string)
                    {
                        fieldElem.SetAttribute("ConstValue", "\"" + field.GetRawConstantValue().ToString().Replace("\\","\\\\").Replace("\"", "\\\"") + "\"");
                    }
                    else
                    {
                        fieldElem.SetAttribute("ConstValue", field.GetRawConstantValue().ToString());
                    }
                }
                else
                {
                    fieldElem.SetAttribute("ConstValue", "null");
                }
            }
            catch (InvalidOperationException ex)
            {
            }

            if (docs != null)
            {
                PortElementFromDocs(field, docs, "summary", fieldElem, "Summary");
                PortElementFromDocs(field, docs, "value", fieldElem, "Value");
            }
        }
 private string GetConstantValue(FieldInfo constant)
 {
     var value = constant.GetRawConstantValue().ToString();
     return value;
 }
Esempio n. 9
0
		public FieldSpec CreateField (FieldInfo fi, TypeSpec declaringType)
		{
			Modifiers mod = 0;
			var fa = fi.Attributes;
			switch (fa & FieldAttributes.FieldAccessMask) {
				case FieldAttributes.Public:
					mod = Modifiers.PUBLIC;
					break;
				case FieldAttributes.Assembly:
					mod = Modifiers.INTERNAL;
					break;
				case FieldAttributes.Family:
					mod = Modifiers.PROTECTED;
					break;
				case FieldAttributes.FamORAssem:
					mod = Modifiers.PROTECTED | Modifiers.INTERNAL;
					break;
				default:
					// Ignore private fields (even for error reporting) to not require extra dependencies
					if (IgnorePrivateMembers || HasAttribute (CustomAttributeData.GetCustomAttributes (fi), "CompilerGeneratedAttribute", CompilerServicesNamespace))
						return null;

					mod = Modifiers.PRIVATE;
					break;
			}

			var definition = new ImportedMemberDefinition (fi);
			TypeSpec field_type;

			try {
				field_type = ImportType (fi.FieldType, new DynamicTypeReader (fi));
			} catch (Exception e) {
				// TODO: I should construct fake TypeSpec based on TypeRef signature
				// but there is no way to do it with System.Reflection
				throw new InternalErrorException (e, "Cannot import field `{0}.{1}' referenced in assembly `{2}'",
					declaringType.GetSignatureForError (), fi.Name, declaringType.MemberDefinition.DeclaringAssembly);
			}

			if ((fa & FieldAttributes.Literal) != 0) {
				var c = Constant.CreateConstantFromValue (field_type, fi.GetRawConstantValue (), Location.Null);
				return new ConstSpec (declaringType, definition, field_type, fi, mod, c);
			}

			if ((fa & FieldAttributes.InitOnly) != 0) {
				if (field_type == TypeManager.decimal_type) {
					var dc = ReadDecimalConstant (CustomAttributeData.GetCustomAttributes (fi));
					if (dc != null)
						return new ConstSpec (declaringType, definition, field_type, fi, mod, dc);
				}

				mod |= Modifiers.READONLY;
			} else {
				if (HasVolatileModifier (fi))
					mod |= Modifiers.VOLATILE;
			}

			if ((fa & FieldAttributes.Static) != 0) {
				mod |= Modifiers.STATIC;
			} else {
				// Fixed buffers cannot be static
				if (declaringType.IsStruct && field_type.IsStruct && field_type.IsNested &&
					HasAttribute (CustomAttributeData.GetCustomAttributes (fi), "FixedBufferAttribute", CompilerServicesNamespace)) {

					// TODO: Sanity check on field_type (only few type are allowed)
					var element_field = CreateField (fi.FieldType.GetField (FixedField.FixedElementName), declaringType);
					return new FixedFieldSpec (declaringType, definition, fi, element_field, mod);
				}
			}

			return new FieldSpec (declaringType, definition, field_type, fi, mod);
		}
Esempio n. 10
0
 public static string FormatField(FieldInfo field)
 {
     var builder = new StringBuilder();
       builder.Append(FourSpaces);
       if (field.IsPublic) {
     builder.Append("public ");
       }
       if (field.IsAssembly) {
     builder.Append("internal ");
       }
       if (field.IsFamily) {
     builder.Append("protected ");
       }
       if (field.IsStatic) {
     builder.Append("static ");
       }
       if (field.IsInitOnly) {
     builder.Append("readonly ");
       }
       builder.Append(FormatType(field.FieldType));
       builder.Append(" ");
       builder.Append(field.Name);
       if (field.IsLiteral) {
     try {
       var obj = field.GetRawConstantValue();
       if (obj is int) {
     builder.Append(" = " + (int)obj + ";");
       } else if (obj is long) {
     builder.Append(" = " + (long)obj + "L;");
       } else {
     builder.Append(";");
       }
     } catch (InvalidOperationException) {
       builder.Append(";");
     }
       } else {
     builder.Append(";");
       }
       return builder.ToString();
 }
        private static void InternalSetConstant(FieldInfo fi, JavaArchiveReflectorFieldInfo yi)
        {
            // X:\jsc.svn\examples\java\Test\TestJavaFinalIntegerField\TestJavaFinalIntegerField\Program.cs
            var RawConstantValue = fi.GetRawConstantValue();
            if (RawConstantValue == null)
            {
                // wtf?

                //001b ScriptCoreLibAndroid.Natives android.os.Parcelable
                //System.InvalidOperationException: SetConstant { FieldName = EMPTY_STATE, FieldType = android.view.AbsSavedState }

                yi.IsLiteral = false;

                // enum?
                return;
            }

            var RawConstantValueType = RawConstantValue.GetType();

            if (RawConstantValueType == typeof(int))
                yi.LiteralInt32 = (int)RawConstantValue;
            else if (RawConstantValueType == typeof(short))
                yi.LiteralInt16 = (short)RawConstantValue;
            else if (RawConstantValueType == typeof(long))
                yi.LiteralInt64 = (long)RawConstantValue;
            else if (RawConstantValueType == typeof(sbyte))
                yi.LiteralInt8 = (byte)(sbyte)RawConstantValue;
            else if (fi.FieldType == typeof(string))
                yi.LiteralString = (string)RawConstantValue;
            else
            {

                //Console.WriteLine(

                //"InternalSetConstant " + new { fi.DeclaringType.FullName, fi.Name, RawConstantValueType, fi.FieldType }

                //    );

                yi.IsLiteral = false;
            }
            //throw new InvalidOperationException(
            //);
        }
Esempio n. 12
0
        private static void ValidateSourceEqual(this FieldInfo targetField, FieldInfo sourceField, Tuple<string, string> rootTargetAndSourceFullNames)
        {
            Contract.Requires(targetField != null);
            Contract.Requires(rootTargetAndSourceFullNames != null);
            Contract.Requires(rootTargetAndSourceFullNames.Item1 != null);
            Contract.Requires(rootTargetAndSourceFullNames.Item2 != null);
            Contract.Requires(rootTargetAndSourceFullNames.Item1 != rootTargetAndSourceFullNames.Item2);

            Assert.That(sourceField != null, "Could not find source type");
            Assert.That(sourceField != targetField);
            Assert.That(sourceField.Attributes == targetField.Attributes);
            Assert.That(sourceField.DeclaringType != targetField.DeclaringType);
            Assert.That(sourceField.IsAssembly == targetField.IsAssembly);
            Assert.That(sourceField.IsFamily == targetField.IsFamily);
            Assert.That(sourceField.IsFamilyAndAssembly == targetField.IsFamilyAndAssembly);
            Assert.That(sourceField.IsFamilyOrAssembly == targetField.IsFamilyOrAssembly);
            Assert.That(sourceField.IsInitOnly == targetField.IsInitOnly);
            Assert.That(sourceField.IsLiteral == targetField.IsLiteral);
            Assert.That(sourceField.IsNotSerialized == targetField.IsNotSerialized);
            Assert.That(sourceField.IsPinvokeImpl == targetField.IsPinvokeImpl);
            Assert.That(sourceField.IsPrivate == targetField.IsPrivate);
            Assert.That(sourceField.IsPublic == targetField.IsPublic);
            Assert.That(sourceField.IsSecurityCritical == targetField.IsSecurityCritical);
            Assert.That(sourceField.IsSecuritySafeCritical == targetField.IsSecuritySafeCritical);
            Assert.That(sourceField.IsSecurityTransparent == targetField.IsSecurityTransparent);
            Assert.That(sourceField.IsSpecialName == targetField.IsSpecialName);
            Assert.That(sourceField.IsStatic == targetField.IsStatic);
            Assert.That(sourceField.MemberType == targetField.MemberType);
            Assert.That(sourceField.Name == targetField.Name);

            targetField.FieldType.ValidateSourceNameEqual(sourceField.FieldType, rootTargetAndSourceFullNames);

            if (sourceField.IsLiteral)
            {
                var sourceValue = sourceField.GetRawConstantValue();
                var targetValue = targetField.GetRawConstantValue();

                if (sourceValue == null) { Assert.That(targetValue == null); }
                else { Assert.That(sourceValue.Equals(targetValue)); }
            }

            Attribute.GetCustomAttributes(targetField, false).ValidateSourceEqual(Attribute.GetCustomAttributes(sourceField, false), rootTargetAndSourceFullNames);
        }
 internal static Object GetConstantValue(FieldInfo field) {
   if (field.GetType().Assembly == typeof(TypeReferences).Assembly ||
       !field.DeclaringType.Assembly.ReflectionOnly)
     return field.GetValue(null);
   
   Type type = field.FieldType;
   Object value = field.GetRawConstantValue();
   if (type.IsEnum)
     return MetadataEnumValue.GetEnumValue(type, value);
   return value;
 }
Esempio n. 14
0
 private string GetFieldInitLiteral(FieldInfo field)
 {
     if (!field.IsLiteral)
         return null;
     var value = field.GetRawConstantValue();
     if (field.FieldType == typeof(String))
         return "\"" + value.ToString() + "\"";
     return value.ToString();
 }
Esempio n. 15
0
 public CompiledFieldScope(SymInfo si, FieldInfo fi, CompiledScope declaringType, bool is_global)
 {
     this.si = si;
     this.fi = fi;
     string[] args = declaringType.TemplateArguments;
     if (args != null)
     {
         generic_args = new List<string>();
         generic_args.AddRange(args);
     }
     if (generic_args != null)
     {
         //TypeScope ts = declaringType.instances[fi.FieldType.GenericParameterPosition];
         this.sc = CompiledScope.get_type_instance(fi.FieldType, declaringType.instances);
     }
     else
         this.sc = TypeTable.get_compiled_type(fi.FieldType);
     if (fi.IsLiteral)
         this.cnst_val = fi.GetRawConstantValue();
     if (si.name == null)
         AssemblyDocCache.AddDescribeToComplete(this.si, fi);
     this.si.name = fi.Name;
     this.is_global = is_global;
     this.si.description = this.ToString();
     //this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(fi.DeclaringType.Assembly,"F:"+fi.DeclaringType.FullName+"."+fi.Name);
     this.topScope = declaringType;
     if (fi.IsPrivate)
     {
         this.acc_mod = access_modifer.private_modifer;
         this.si.acc_mod = access_modifer.private_modifer;
     }
     else if (fi.IsFamily || fi.IsFamilyOrAssembly)
     {
         this.acc_mod = access_modifer.protected_modifer;
         this.si.acc_mod = access_modifer.protected_modifer;
     }
     else if (fi.IsFamilyAndAssembly || fi.IsAssembly)
     {
         this.acc_mod = access_modifer.internal_modifer;
         this.si.acc_mod = access_modifer.internal_modifer;
     }
 }
 public virtual string GetDescriptionForCompiledField(FieldInfo fi)
 {
     StringBuilder sb = new StringBuilder();
     if (fi.IsPublic)
         sb.Append("public ");
     else if (fi.IsFamily)
         sb.Append("protected ");
     if (!fi.IsLiteral)
         if (fi.IsStatic) sb.Append("class ");
     if (!fi.IsLiteral)
     {
         sb.Append(prepare_member_name(fi.Name));
         sb.Append(" : " + GetFullTypeName(fi.FieldType));
     }
     else
     {
         sb.Append("const " + fi.Name + " : " + GetFullTypeName(fi.FieldType));
         sb.Append(" = " + fi.GetRawConstantValue().ToString());
     }
     sb.Append(";");
     return sb.ToString();
 }
Esempio n. 17
0
        private void MapField(TypeDefinition type_definition, FieldInfo field)
        {
            if (_options.EraseMember(field)) return;

            var field_definition = FieldDefinitionFor(field, type_definition);

            if (field_definition.HasDefault)
                field_definition.Constant = field.GetRawConstantValue();

            if ((field_definition.Attributes & MC.FieldAttributes.HasFieldRVA) != 0)
                field_definition.InitialValue = GetInitialValue(field);

            var attributes = field.GetCustomAttributes(typeof(FieldOffsetAttribute), inherit: false);
            if (attributes.Length > 0)
                field_definition.Offset = ((FieldOffsetAttribute)attributes[0]).Value;

            MapCustomAttributes(field, field_definition);
        }
Esempio n. 18
0
        internal static PythonTypeSlot GetReflectedField(FieldInfo info) {
            PythonTypeSlot res;

            NameType nt = NameType.Field;
            if (!PythonBinder.IsExtendedType(info.DeclaringType) && 
                !info.IsDefined(typeof(PythonHiddenAttribute), false)) {
                nt |= NameType.PythonField;
            }

            lock (_fieldCache) {
                if (!_fieldCache.TryGetValue(info, out res)) {
                    if (nt == NameType.PythonField && info.IsLiteral) {
                        if (info.FieldType == typeof(int)) {
                            res = new PythonTypeUserDescriptorSlot(
                                ScriptingRuntimeHelpers.Int32ToObject((int)info.GetRawConstantValue()),
                                true
                            );
                        } else if (info.FieldType == typeof(bool)) {
                            res = new PythonTypeUserDescriptorSlot(
                                ScriptingRuntimeHelpers.BooleanToObject((bool)info.GetRawConstantValue()),
                                true
                            );
                        } else {
                            res = new PythonTypeUserDescriptorSlot(
                                info.GetValue(null),
                                true
                            );
                        }
                    } else {
                        res = new ReflectedField(info, nt);
                    }

                    _fieldCache[info] = res;
                }
            }

            return res;
        }
Esempio n. 19
0
        // adds a enumeration (keyword, opcode, task or channel) represented by 'staticField'
        // to the manifest.  
        private static void AddProviderEnumKind(ManifestBuilder manifest, FieldInfo staticField, string providerEnumKind)
        {
            Type staticFieldType = staticField.FieldType;
            if (staticFieldType == typeof(EventOpcode))
            {
                if (providerEnumKind != "Opcodes") goto Error;
                int value = (int)staticField.GetRawConstantValue();
                if (value <= 10)
                    throw new ArgumentException(Environment.GetResourceString("EventSource_ReservedOpcode"));
                manifest.AddOpcode(staticField.Name, value);
            }
            else if (staticFieldType == typeof(EventTask))
            {
                if (providerEnumKind != "Tasks") goto Error;
                manifest.AddTask(staticField.Name, (int)staticField.GetRawConstantValue());
            }
            else if (staticFieldType == typeof(EventKeywords))
            {
                if (providerEnumKind != "Keywords") goto Error;
                manifest.AddKeyword(staticField.Name, (ulong)(long)staticField.GetRawConstantValue());
            }
#if FEATURE_MANAGED_ETW_CHANNELS
            else if (staticFieldType == typeof(EventChannel))
            {
                if (providerEnumKind != "Channels") goto Error;
                var channelAttribute = (ChannelAttribute)GetCustomAttributeHelper(staticField, typeof(ChannelAttribute));
                manifest.AddChannel(staticField.Name, (byte)staticField.GetRawConstantValue(), channelAttribute);
            }
#endif
            return;
        Error:
            throw new ArgumentException(Environment.GetResourceString("EventSource_EnumKindMismatch",  staticField.FieldType.Name, providerEnumKind));
        }
Esempio n. 20
0
        static private void AppendFieldInfo(FieldInfo field, StringBuilder sb)
        {
            sb.Append(".field ");

            foreach (var attribute in field.GetCustomAttributesData())
            {
                AppendCustomAttributeData(attribute, sb);
                sb.Append(" ");
            }
            foreach (var modreq in field.GetRequiredCustomModifiers())
            {
                sb.Append("modreq(");
                AppendType(modreq, sb);
                sb.Append(") ");
            }
            foreach (var modopt in field.GetOptionalCustomModifiers())
            {
                sb.Append("modopt(");
                AppendType(modopt, sb);
                sb.Append(") ");
            }

            if (field.IsPrivate) sb.Append("private ");
            if (field.IsPublic) sb.Append("public ");
            if (field.IsFamily) sb.Append("family ");
            if (field.IsAssembly) sb.Append("assembly ");
            if (field.IsFamilyOrAssembly) sb.Append("famorassem ");
            if (field.IsFamilyAndAssembly) sb.Append("famandassem ");

            if (field.IsInitOnly) sb.Append("initonly ");
            if (field.IsLiteral) sb.Append("literal ");
            if (field.IsNotSerialized) sb.Append("notserialized ");
            if (field.Attributes.HasFlag(FieldAttributes.SpecialName)) sb.Append("specialname ");
            if (field.Attributes.HasFlag(FieldAttributes.RTSpecialName)) sb.Append("rtspecialname ");
            if (field.IsPinvokeImpl) sb.Append("pinvokeimpl ");

            sb.Append(field.IsStatic ? "static " : "instance ");
            AppendType(field.FieldType, sb);
            sb.Append(" ");
            sb.Append(field.Name);

            if (field.IsLiteral)
            {
                AppendValue(field.GetRawConstantValue(), sb);
            }
        }
Esempio n. 21
0
 public static compiled_class_constant_definition GetConstantFieldNode(FieldInfo fi)
 {
     compiled_class_constant_definition cccd = field_nodes[fi] as compiled_class_constant_definition;
     if (cccd != null) return cccd;
     constant_node cn = CreateConstantNode(fi.GetRawConstantValue());
     if (cn == null)
         return null;
     cccd = new compiled_class_constant_definition(fi, cn);
     field_nodes[fi] = cccd;
     return cccd;
 }