public static Object readBuffer(StringType buffer, StringType attribute) { OptionalDesc _description = new OptionalDesc(); // For Quantity StringType _quantity = (StringType)StringType.readBuffer(buffer, new StringType("Quantity")); _description.quantity = StringType.stringToInt(_quantity); // For Constrains ConstraintOnModel _constrs = (ConstraintOnModel)ConstraintOnModel.readBuffer(buffer, new StringType("Constraints")); _description.constrs = _constrs; // For Tag StringType _tag = (StringType)StringType.readBuffer(buffer, new StringType("Tag")); _description.tag = (Tag)_tag; // For StoreOption StringType _storeOption = StringType.createBuffer(buffer, new StringType("StoreOption")); _description.storeOption = StringType.stringToInt(_storeOption); // For Name StringType _name = (StringType)StringType.readBuffer(buffer, new StringType("Name")); _description.name = StringType.stringByAppend(buffer, _storeOption); return(_description); }
public StringType createBuffer(StringType obj, StringType attribute) { OptionalDesc description = new OptionalDesc(); // For Quantity StringType _quantity = StringType.createBuffer(Quantative.toString(this.quantity), new StringType("Quantity")); obj = StringType.stringByAppend(obj, _quantity); // For Constrains StringType _constrs = this.constrs.createBuffer(ConstraintOnModel.toString(constrs), new StringType("Constraints")); obj = StringType.stringByAppend(obj, _constrs); // For Tag StringType _tag = StringType.createBuffer(tag, new StringType("Tag")); obj = StringType.stringByAppend(obj, _tag); // For StoreOption StringType _storeOption = StringType.createBuffer(StoreOptional.toString(storeOption), new StringType("StoreOption")); obj = StringType.stringByAppend(obj, _storeOption); // For Name StringType _name = StringType.createBuffer(name, new StringType("Name")); obj = StringType.stringByAppend(obj, _name); obj = base.createBuffer(obj, attribute); return(obj); }
public static Boolean areDescriptionSame(OptionalDesc _desc1, OptionalDesc _desc2) { bool result = true; if (_desc1.quantity != _desc2.quantity) { result = false; } if (_desc1.storeOption != _desc2.storeOption) { result = false; } if (!StringType.areStringSame(_desc1.tag, _desc2.tag)) { result = false; } if (!StringType.areStringSame(_desc1.name, _desc2.name)) { result = false; } if (!ConstraintOnModel.areSameConstraints(_desc1.constrs, _desc2.constrs)) { result = false; } return(result); }
public static OptionalDesc clonedDescription(OptionalDesc origin) { if (origin == null) { return(null); } OptionalDesc clonedDesc = new OptionalDesc(); clonedDesc.quantity = origin.quantity; //clone ConstraintOnModel clonedDesc.constrs = ConstraintOnModel.clonedConstraints(origin.constrs); //clone Tag clonedDesc.tag = (Tag)StringType.clonedString(origin.tag); clonedDesc.storeOption = origin.storeOption; //clone Name clonedDesc.name = StringType.clonedString(origin.name); return(clonedDesc); }
public static StringType toString(ConstraintOnModel _constr) { StringType str = new StringType(); return(str); }
public static ConstraintOnModel clonedConstraints(ConstraintOnModel origin) { ConstraintOnModel clonedConstr = new ConstraintOnModel(); return(clonedConstr); }
public static Boolean areSameConstraints(ConstraintOnModel _constr1, ConstraintOnModel _constr2) { bool result = true; return(result); }