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