Create general autofill table and category util functions. Update table class to have get categories function.

This commit is contained in:
alwayscompiling
2022-11-17 14:50:48 -05:00
parent 1858f0c37d
commit 06b46ef27c
3 changed files with 69 additions and 13 deletions
+10
View File
@@ -123,6 +123,16 @@ class Table:
if category.name not in self._categories_map:
self._categories_map[category.name] = category
def get_categories(self) -> dict:
"""
Getter for dict of category names and categories.
Returns:
dict: Dictionary consisting of Category names and Category objects.
"""
# I don't know if this is const data. Don't want to allow data to be written as a result of this function.
return self._categories_map
def get_category(self, category_name: str) -> Category:
"""
Getter for specific category. Returns None if not found.