Exemplo 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());
            }
        }
Exemplo n.º 2
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
         );
 }
Exemplo n.º 3
0
 public void AddEffigyLink(string group, EffigyLink to_add)
 {
     effigy_links.Add(group, to_add);
     to_add.Update();
 }
Exemplo n.º 4
0
 private void SolidifyInstanceInternal(CmlValue value, object representation, EffigyLink effigy_link, CmlContext context)
 {
     throw new CmlRuntimeError_InfoSupportException(value.GetTypeEX(), set_member);
 }
Exemplo n.º 5
0
        private void SolidifyInstanceInternal(CmlValue_Link value, object representation, EffigyLink effigy_link, CmlContext context)
        {
            context.AddVariableLink(
                value.GetGroup(),

                new VariableLink_Simple_Process(
                    new VariableNode(value.GetVariableInstance()),
                    new VariableNode(variable.CreateStrongInstance(representation)),
                    o => effigy_link.GetValues().FindIndexOf(o),
                    i => effigy_link.GetValues().Get(i.ConvertEX <int>())
                    )
                );
        }
Exemplo n.º 6
0
 static public void AddEffigyLink(this CmlContext item, string group, EffigyLink effigy_link)
 {
     item.GetLinkManager().AddEffigyLink(group, effigy_link);
 }