[*] auMerge functions follow factory(dest) return dest pattern

[*] added to objects.lua
This commit is contained in:
Reece Wilson 2021-11-16 13:05:03 +00:00
parent fc3c8223bf
commit 2709754718
2 changed files with 11 additions and 5 deletions

View File

@ -3,22 +3,24 @@ function auEnum(...)
end
function auProjectInfoO() -- extends auHeaderProject
return {}
return auMergeTable(auHeaderProject(), {})
end
function auBaseProjectO()
return {
info = auProjectInfoO()
info = auProjectInfoO(),
isInitialized = false
}
end
function auAbstractProjectO() -- extends auBaseProject
return {
return auMergeTable(auBaseProject(), {
init = function(info, visit) end,
process = function(info, visit) end,
resolveDependencies = function(this, resolveFunction) end,
handleLink = function(this) end,
handleReference = function(this) end
}
})
end
function auProjectO() -- extends auAbstractProjectO
@ -30,7 +32,9 @@ function auSolutionO() -- extends auHeaderPartO
end
function auVisitO() -- extends auProjectInfoO
return {
translations = nil
}
end
function auFilterInO()

View File

@ -4,6 +4,7 @@ function auMergeTable(dest, src)
if (dest[key]) then return end
dest[key] = value
end)
return dest
end
-- Alternative to auConcatArrays
@ -12,4 +13,5 @@ function auMergeArray(dest, src)
auForEach(src, function(value)
table.insert(dest, value)
end)
return dest
end