Add helper functions to container. Allow name to be gotten

This commit is contained in:
Tjakka5 2020-01-04 13:40:18 +01:00
parent 6cd66e6737
commit 55ae5fd987
8 changed files with 97 additions and 2 deletions

View file

@ -63,10 +63,14 @@ function Component:__initialize(...)
return component
end
--- Returns true if the Component has a name.
-- @return True if the Component has a name, false otherwise
function Component:hasName()
return self.__name and true or false
end
--- Returns the name of the Component.
-- @return Name of the Component
function Component:getName()
return self.__name
end