static void WriteGetter(StringBuilder header, StringBuilder source, PropertyPair property, ClassInfo clazz, List <ClassInfo> classes, List <EnumData> enums) { if (property.Getter != null) //return value, typename, propertyname, gettername { string getText = TypeHandling.CPPTypeToCSharpValue(property.Getter.GetReturnValue(), String.Format("{0}_->{1}()", clazz.Name.ToLower(), property.Getter.CMethodName), classes, enums); source.AppendFormat(SOURCE_PROPERTY_GET, TypeHandling.ASToCSharpType(property.Getter.GetReturnValue(), classes), // Return type name clazz.Name, //Class name property.GetPropertyName(), //Name of property getText); // Value being set } }
static void WriteSetter(StringBuilder header, StringBuilder source, PropertyPair property, ClassInfo clazz, List <ClassInfo> classes, List <EnumData> enums) { if (property.Setter != null) //input value, typename, propertyname, settername { string setValue = TypeHandling.CPPTypeFromCSharpValue(property.Setter.ParameterTypes[0], "value", classes, enums); source.AppendFormat(SOURCE_PROPERTY_SET, TypeHandling.ASToCSharpType(property.Setter.HeaderDeclaration(classes), classes), // Type of setter clazz.Name, //Name of class property.GetPropertyName(), //Name of property property.Setter.CMethodName, //Method to invoke setValue, clazz.Name.ToLower()); //Conversion into CPP } }