7#define MAX_CLASS_LENGTH 256
8#define MAX_CONTENT_LENGTH 2056
44 return task_collection;
54 if ( task_class == NULL || key == NULL )
56 printf(
"Task class error: task class or key is null\n");
61 printf(
"Task class error: invalid table size (%zu)", task_class->
table_size);
79 if ( task_class == NULL || new_task->
task_content == NULL )
81 printf(
"Task class error: task class or key is null\n");
84 if ( new_task == NULL )
86 printf(
"Task class error: new task to be added is null\n");
91 printf(
"Task class error: invalid table size (%zu)", task_class->
table_size);
105 if (task_collection == NULL || key == NULL)
128 if (task_collection == NULL || task_class == NULL)
145 if (task_class == NULL || task_content == NULL)
161 if (task_collection == NULL || class_name == NULL)
HashMap * hashmap_create(size_t table_size)
Creates a hashmap of a fixed size.
void hashmap_set(HashMap *map, char *key, void *value)
Adds an entry to a hashmap by a key string and value.
void hashmap_elem_remove(HashMap *map, char *key)
Removes an entry in a hashmap by its key.
void * hashmap_get(HashMap *map, char *key)
Finds an entry in a non-empty hashmap by a key.
Contains the structures and procedures for hashmap-related operations.
A task class containing other tasks.
HashMap * task_class_table
A task collection containing other classes.
HashMap * task_collection
void remove_task(TaskClass *task_class, char *task_content)
Removes a task from a task class by its content.
TaskClass * get_task_class(TaskCollection *task_collection, const char *key)
Gets a task class by its class name from a task collection.
void add_task_class(TaskCollection *task_collection, TaskClass *task_class)
Adds a task class to a task collection.
TaskCollection * create_task_collection(size_t collection_size)
Creates a task collection of known size.
Task * create_task(char *class_of_task, char *task_content)
Creates a task of known class and content.
void remove_task_class(TaskCollection *task_collection, char *class_name)
Removes a task class from a task collection.
Task * get_task(TaskClass *task_class, const char *key)
Finds a task in a task class by its content.
TaskClass * create_task_class(char *class_name, size_t class_size)
Creates a task class of a known class and size.
void add_task(TaskClass *task_class, Task *new_task)
Adds a task to a task class.
void print_task(Task *task)
Prints the content of a task.
Contains structures and functions for handling task-related operations.