From 701d59c83a64bf5aa73f2bc386a0cdba087349c4 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 30 Mar 2026 23:51:59 +0800 Subject: update more comments --- xmake/core/package/component.lua | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'xmake/core/package/component.lua') diff --git a/xmake/core/package/component.lua b/xmake/core/package/component.lua index d93a4f7fb..c55dc4a73 100644 --- a/xmake/core/package/component.lua +++ b/xmake/core/package/component.lua @@ -46,36 +46,63 @@ function _instance.new(name, opt) end -- get the component name +-- +-- @return the component name string +-- function _instance:name() return self._NAME end --- get the type: component +-- get the instance type +-- +-- @return "component" +-- function _instance:type() return "component" end --- get the it's package +-- get the parent package +-- +-- @return the package instance +-- function _instance:package() return self._PACKAGE end --- get the component configuration +-- get the component configuration value +-- +-- @param name the config name +-- @return the config value +-- function _instance:get(name) return self._INFO:get(name) end -- set the value to the component info +-- +-- @param name the info name +-- @param ... the values +-- function _instance:set(name, ...) self._INFO:apival_set(name, ...) end -- add the value to the component info +-- +-- @param name the info name +-- @param ... the values to add +-- function _instance:add(name, ...) self._INFO:apival_add(name, ...) end -- get the extra configuration +-- +-- @param name the config name +-- @param item the config item +-- @param key the config key (optional) +-- @return the extra config value +-- function _instance:extraconf(name, item, key) local conf = self._INFO:extraconf(name, item, key) if conf == nil then -- cgit v1.3.1