public virtual void visit(Variable obj, bool visitSubNodes) { visit ((ReqRelated) obj, false); if (visitSubNodes){ IXmlBBase[] Subs = acceptor.subElements((IXmlBBase)obj); if (Subs != null){ for (int i=0; i<Subs.Length; i++) { dispatch(Subs[i], true); } // If } // If } }
public override void visit(Variable obj, bool visitSubNodes) { obj.setVariableMode(acceptor.VariableModeEnumType.aInternal); obj.setX(0); obj.setY(0); obj.setWidth(0); obj.setHeight(0); obj.setHidden(false); obj.setPinned(false); base.visit(obj, visitSubNodes); }
public void insertSubVariables(int idx, Variable el,Lock aLock) { __setDirty(true); allSubVariables().Insert (idx, el); NotifyControllers(aLock); }
public virtual void visit(Variable obj) { visit(obj, true); }
public void appendSubVariables(Lock aLock,Variable el) { __setDirty(true); el.__setDirty(true); allSubVariables().Add(el); acceptor.connectSon (this, el); NotifyControllers(aLock); }
public void copyTo(Variable other) { base.copyTo(other); other.aTypeName = aTypeName; other.aDefaultValue = aDefaultValue; other.aVariableMode = aVariableMode; other.aSubVariables = aSubVariables; other.aWidth = aWidth; other.aHeight = aHeight; other.aX = aX; other.aY = aY; other.aHidden = aHidden; other.aPinned = aPinned; }
/// <summary>Part of the list interface for Variables</summary> /// <param name="el">a Variable to add to the collection in /// Variables</param> /// <seealso cref="appendVariables(System.Collections.IList)"/> public void appendVariables(Variable el) { __setDirty(true); el.__setDirty(true); allVariables().Add(el); acceptor.connectSon (this, el); NotifyControllers(null); }
/// <summary>Part of the list interface for Variables /// This insertion function inserts a new element in the /// collection in Variables</summary> /// <param name="idx">the index where the insertion must take place</param> /// <param name="el">the element to insert</param> public void insertVariables(int idx, Variable el) { __setDirty(true); allVariables().Insert (idx, el); NotifyControllers(null); }
/// <summary> /// Sets the default values to each variable /// </summary> /// <param name="variable">The variable to set</param> /// <param name="subNodes">Indicates whether sub nodes should be considered</param> public override void visit(Variable variable, bool subNodes) { Variables.Variable var = (Variables.Variable) variable; var.Value = var.DefaultValue; base.visit(variable, subNodes); }
public override void visit(Variable obj, bool visitSubNodes) { Variables.Variable variable = (Variables.Variable) obj; if (variable.Type == Target) { Usages.Add(variable); } base.visit(obj, visitSubNodes); }
public void copyTo(Variable other) { base.copyTo(other); other.aTypeName = aTypeName; other.aDefaultValue = aDefaultValue; other.aVariableMode = aVariableMode; other.aSubVariables = aSubVariables; }
public override void visit(Variable obj, bool visitSubNodes) { obj.setVariableMode(acceptor.VariableModeEnumType.aInternal); base.visit(obj, visitSubNodes); }
public override void visit(Variable obj, bool visitSubNodes) { Variables.Variable variable = obj as Variables.Variable; if (variable != null) { if (variable.Type == null) { variable.AddError("Cannot find type for variable"); } else { Types.Structure structure = variable.Type as Types.Structure; if (structure != null) { foreach (Types.StructureElement element in structure.Elements) { if (!ValidMode(variable.Mode, element.Mode)) { variable.AddWarning("Invalid mode for " + element.Name); } } } if (variable.Type.IsAbstract) { variable.AddError("Instantiation of abstract types is forbidden"); } } if (Utils.Util.isEmpty(variable.Comment) && variable.Type != null && Utils.Util.isEmpty(variable.Type.Comment)) { variable.AddInfo( "Missing variable semantics. Update the 'Comment' associated to the variable or to the corresponding type"); } if (!Utils.Util.isEmpty(variable.getDefaultValue())) { checkExpression(variable, variable.getDefaultValue()); } if (variable.DefaultValue != null) { if (!variable.DefaultValue.Type.Match(variable.Type)) { variable.AddError("Type of default value (" + variable.DefaultValue.Type.FullName + ")does not match variable type (" + variable.Type.FullName + ")"); } } } base.visit(obj, visitSubNodes); }