Пример #1
0
        public override void SolidifyInstance(CmlContext context, object representation, CmlSet set)
        {
            CmlValue children = set.GetValue(name);

            CmlValue_Link         children_link;
            CmlValue_SystemValues children_values;

            if (children.Convert <CmlValue_Link>(out children_link))
            {
                EffigyLink effigy_link = effigy_info.CreateLink(context, representation, children_link.GetVariableInstance(), children_link.GetClass());

                selectors.Process(
                    s => set.GetValue(s.GetName()).IfNotNull(
                        v => s.SolidifyInstance(
                            context,
                            representation,
                            effigy_link,
                            v
                            ))
                    );

                context.AddEffigyLink(
                    children_link.GetGroup(),
                    effigy_link
                    );
            }
            else if (children.Convert <CmlValue_SystemValues>(out children_values))
            {
                effigy_info.SetChildren(representation, children_values.GetSystemValues());
            }
        }
Пример #2
0
        private bool SetSetValue(CmlValue value, CmlContext context)
        {
            context.GetRepresentationSpace()
            .GetSet(set)
            .SetValue(GetName(), value);

            return(true);
        }
Пример #3
0
 public void PushToRepresentation(CmlContext context, object representation, CmlValue value)
 {
     if (this.CallSpecializationMethodWithReturn <bool, CmlValue, object, CmlContext>(
             "PushToRepresentationInternal",
             value,
             representation,
             context) == false)
     {
         throw new CmlRuntimeError_InfoSupportException(value.GetTypeEX(), this);
     }
 }
Пример #4
0
 static public T ForceSystemValue <T>(this CmlValue item)
 {
     return(item.ForceSystemValue().Convert <T>());
 }
Пример #5
0
 static public object ForceSystemValue(this CmlValue item)
 {
     return(item.Convert <CmlValue_SystemValue>().IfNotNull(v => v.GetSystemValue()));
 }
Пример #6
0
 private bool PushToRepresentationInternal(CmlValue value, object representation, CmlContext context)
 {
     return(false);
 }
Пример #7
0
 public CmlParameter(string n, CmlValue v)
 {
     name  = n;
     value = v;
 }
Пример #8
0
 public void SolidifyInstance(CmlContext context, object representation, EffigyLink effigy_link, CmlValue value)
 {
     this.CallSpecializationMethod <CmlValue, object, EffigyLink, CmlContext>(
         "SolidifyInstanceInternal",
         value,
         representation,
         effigy_link,
         context
         );
 }
Пример #9
0
 private void SolidifyInstanceInternal(CmlValue value, object representation, EffigyLink effigy_link, CmlContext context)
 {
     throw new CmlRuntimeError_InfoSupportException(value.GetTypeEX(), set_member);
 }
Пример #10
0
 public CmlRuntimeError_TypeSupportException(string support_type, CmlValue value) : base(value.GetType() + " value do not support " + support_type + ".")
 {
 }
Пример #11
0
 public void SetValue(string name, CmlValue value)
 {
     values[name] = value;
 }