Ejemplo n.º 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());
            }
        }
Ejemplo n.º 2
0
        private bool SetSetValue(CmlValue value, CmlContext context)
        {
            context.GetRepresentationSpace()
            .GetSet(set)
            .SetValue(GetName(), value);

            return(true);
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 4
0
 static public T ForceSystemValue <T>(this CmlValue item)
 {
     return(item.ForceSystemValue().Convert <T>());
 }
Ejemplo n.º 5
0
 static public object ForceSystemValue(this CmlValue item)
 {
     return(item.Convert <CmlValue_SystemValue>().IfNotNull(v => v.GetSystemValue()));
 }
Ejemplo n.º 6
0
 private bool PushToRepresentationInternal(CmlValue value, object representation, CmlContext context)
 {
     return(false);
 }
Ejemplo n.º 7
0
 public CmlParameter(string n, CmlValue v)
 {
     name  = n;
     value = v;
 }
Ejemplo n.º 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
         );
 }
Ejemplo n.º 9
0
 private void SolidifyInstanceInternal(CmlValue value, object representation, EffigyLink effigy_link, CmlContext context)
 {
     throw new CmlRuntimeError_InfoSupportException(value.GetTypeEX(), set_member);
 }
Ejemplo n.º 10
0
 public CmlRuntimeError_TypeSupportException(string support_type, CmlValue value) : base(value.GetType() + " value do not support " + support_type + ".")
 {
 }
Ejemplo n.º 11
0
 public void SetValue(string name, CmlValue value)
 {
     values[name] = value;
 }