ug4
table_desc_util.lua File Reference

Functions

function util tableDesc CondAbort (condition, message)
 
function util tableDesc IsPreset (desc)
 
function util tableDesc ToNameAndDesc (descOrName)
 

Function Documentation

◆ CondAbort()

function util tableDesc CondAbort ( condition  ,
message   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_desc_util.lua :37-42

function util.tableDesc.CondAbort(condition, message)
if condition == true then
print("ERROR in util.tableDesc: " .. message)
exit()
end
end
function table print(data, style)
function test message(msg)

◆ IsPreset()

function util tableDesc IsPreset ( desc  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_desc_util.lua :44-50

function util.tableDesc.IsPreset(desc)
if type(desc) == "userdata" then
return true
else
return false
end
end

◆ ToNameAndDesc()

function util tableDesc ToNameAndDesc ( descOrName  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / table_desc_util.lua :52-70

function util.tableDesc.ToNameAndDesc(descOrName)
if type(descOrName) == "string" then
return descOrName, nil
elseif type(descOrName) == "table" then
if descOrName.type then
util.tableDesc.CondAbort(type(descOrName.type) ~= "string",
"'type' entry in table has to be of type 'string'")
return descOrName.type, descOrName
elseif descOrName.name then
util.tableDesc.CondAbort(type(descOrName.name) ~= "string",
"'name' entry in table has to be of type 'string'")
return descOrName.name, descOrName
else
print("Either 'type' or 'name' have to be specified in a descriptor-table")
exit()
end
end
util.tableDesc.CondAbort(true, "Invalid name or descriptor specified!")
end
location name
Definition: checkpoint_util.lua:128
function util balancer CondAbort(condition, message)