public void AddProperty(string name, EAttributeType type, object value) { namevalmap.Add(name, Tuple.Create(type, value)); Properties.Add(new ExtendedProperty { Type = type, Name = name, Value = value }); }
private Attribute BuildAttributeOfTypeImpl(EAttributeType atttype, PropertyInfo prop, string name) { Attribute att; if (atttype == EAttributeType.Nominal) { att = GetNominalAttribute(prop); } else if (atttype == EAttributeType.Numeric) { att = new Attribute(name); } else if (atttype == EAttributeType.Binary) { att = new Attribute(name, binary); } else if (atttype == EAttributeType.String) { att = new Attribute(name, (ArrayList)null); } else if (atttype == EAttributeType.Date) { att = new Attribute(name, ISO_8601_DATE_FORMAT); // ISO-8601 Format } else { throw new NotSupportedException(atttype + " is not a supported attribute atttype."); } return(att); }
public void RemoveDataChangedEvent(EAttributeType attributeType, UnityAction <float, float> dataChanged) { if (attributeMaps.TryGetValue(attributeType, out FAttributeData data)) { data.OnDataChangedDeletage -= dataChanged; } }
public void AddAttribute(EAttributeType attributeType, float baseValue, bool isNormalData = false) { if (!attributeMaps.ContainsKey(attributeType)) { attributeMaps.Add(attributeType, new FAttributeData(baseValue, isNormalData)); } }
public void RegisterDataChangedEvent(EAttributeType attributeType, UnityAction <float, float> dataChanged) { if (attributeMaps.TryGetValue(attributeType, out FAttributeData data)) { dataChanged?.Invoke(data.BaseValue, data.CurrentValue); data.OnDataChangedDeletage += dataChanged; } }
public AbilityBuffModifiers(AbilitySystemComponent abilitySystem, Editor_FModifierData inData) { this.abilitySystem = abilitySystem; attributeType = inData.attributeType; modifierOption = inData.modifierOption; modifierType = inData.modifierType; attributeMagnitudeList = inData.attributeMagnitudeList; }
public bool GetAttributeData(EAttributeType attributeType, out FAttributeData attributeData) { if (attributeMaps.TryGetValue(attributeType, out FAttributeData data)) { attributeData = data; return(true); } attributeData = null; //attributeData = new FAttributeData(); return(false); }
public AttributeValue(EAttributeType Type, object Value, string Data) : this(Type, Data.ToString(CultureInfo.InvariantCulture)) { if (Data is null) { throw new ArgumentNullException(nameof(Data)); } if (Value is null) { throw new ArgumentNullException(nameof(Value)); } Contract.EndContractBlock(); this.Value = Value; }
/// <summary> /// Creates a DOM attribute definition /// </summary> /// <param name="Name">DOM attribute name</param> /// <param name="Flags">Indicates what aspects of an element this property affects</param> /// <param name="MissingValueDefault">Default value for the attribute</param> /// <param name="Keywords">List of keywords which can be assigned to this attribute</param> public AttributeDefinition(AtomicName <EAttributeName> Name, EAttributeType Type = 0x0, AttributeValue MissingValueDefault = null, AttributeValue InvalidValueDefault = null, EAttributeFlags Flags = 0x0, string[] Keywords = null, Type enumType = null, dynamic lowerRange = null, dynamic upperRange = null, string[] SupportedTokens = null) : this(Keywords, SupportedTokens) { this.ElementType = typeof(Element); this.Name = Name; this.Flags = Flags; this.MissingValueDefault = MissingValueDefault; this.InvalidValueDefault = InvalidValueDefault; this.enumType = enumType; this.LowerRange = lowerRange; this.UpperRange = upperRange; // Append the specified allowed types to our defaults this.Type |= Type; }
public static void Parse_Length(DataConsumer <char> Stream, out float outValue, out EAttributeType outType) { if (Stream is null) { throw new ArgumentNullException(nameof(Stream)); } Contract.EndContractBlock(); if (Try_Parse_Length(Stream, out double outParsedValue, out EAttributeType outParsedType)) { outValue = (float)outParsedValue; outType = outParsedType; return; }
/* 32-bit */ public static void Parse_Length(ReadOnlyMemory <char> input, out float outValue, out EAttributeType outType) { DataConsumer <char> Stream = new DataConsumer <char>(input, EOF); Parse_Length(Stream, out double outParsedValue, out EAttributeType outParsedType); outValue = (float)outParsedValue; outType = outParsedType; }
public FAttributeData GetAttributeData(EAttributeType attributeType) { attributeMaps.TryGetValue(attributeType, out FAttributeData data); return(data); }
private AttributeValue(EAttributeType Type, string Data) { type = Type; data = Data; }
/// <summary> /// Defines the type of the attribute to generate. /// </summary> public Add AttributeType(EAttributeType value) { Impl.setAttributeType(new weka.core.SelectedTag((int)value, weka.filters.unsupervised.attribute.Add.TAGS_TYPE)); return(this); }
/// <summary> /// The type of attribute to remove. /// </summary> public RemoveType AttributeType(EAttributeType type) { Impl.setAttributeType(new weka.core.SelectedTag((int)type, weka.filters.unsupervised.attribute.RemoveType.TAGS_ATTRIBUTETYPE)); return(this); }