# Property struct stores the information about a property after parsing the C++ DALI_PROPERTY macro
-$propertyStruct = Struct.new("Property", :name, :type, :writable, :animatable,:constrainInput, :enum, :shortenum, :csharpGetter, :csharpSetter, :childProperty,)
+$propertyStruct = Struct.new("Property", :name, :type, :writable, :animatable,:constrainInput, :enum, :shortenum, :develAPI, :csharpGetter, :csharpSetter, :childProperty,)
# daliClass struct stores a class name and an array of properties
$daliClassStruct = Struct.new("DaliClass", :name, :properties )
# extract the property enum name Dali::Path::Property::POINTS -> POINTS
shortenum = data[6].split(":").last
+ develAPI = false;
+ # Check if the property uses devel API
+ # Currently we ignore devel properties for now
+ if data[6].include? "Devel"
+ develAPI = true;
+ puts("Ignoring DEVEL API property: " + shortenum);
+ end
+
+
+
# store the :name, :type, :writable, :animatable, :constrainInput, :enum
property = $propertyStruct.new;
property.animatable = (data[4] == "true")
property.constrainInput = (data[5]=="true")
property.enum = shortenum
-
+ property.develAPI = develAPI;
return property;
end
# Extract the property name, type
property = $propertyStruct.new;
+ #First strip out any comments at the end of the macro, some have text like // deprecated
+ commentIndex = propertyMacro.index("//");
+
+ if( commentIndex )
+ propertyMacro = propertyMacro.slice(0..commentIndex-1)
+ end
+
+
# Split the macro definition by comma and quotes, close bracket and delete any empty segments
data = propertyMacro.split(/[\s,")]/).reject { |s| s.empty? }
property.type = data[4]
end
+ # last item should be property enum, e.g. INPUT_POINT_SIZE
property.enum = data[data.length-1]
end
for property in daliClass.properties
- if (!property.childProperty)
+ if( (!property.childProperty) && (!property.develAPI))
file.write( property.csharpGetter );
file.write( property.csharpSetter );
end