diff options
| author | ruki <[email protected]> | 2026-03-30 23:51:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-30 23:51:59 +0800 |
| commit | 701d59c83a64bf5aa73f2bc386a0cdba087349c4 (patch) | |
| tree | 85de317c9904b4aa9e818cbef5615ed2cfad28be /xmake/core/package/component.lua | |
| parent | e23dc968df5fa84e24e98a7fff903e40a12d6624 (diff) | |
update more comments
Diffstat (limited to 'xmake/core/package/component.lua')
| -rw-r--r-- | xmake/core/package/component.lua | 33 |
1 files changed, 30 insertions, 3 deletions
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 |
