parallax 1.0
command-line based task/todo manager
|
Go to the source code of this file.
Macros | |
#define | MAX_CLASS_LENGTH 256 |
#define | MAX_CONTENT_LENGTH 2056 |
Functions | |
Task * | create_task (char *class_of_task, char *task_content) |
Creates a task of known class and content. | |
TaskClass * | create_task_class (char *class_name, size_t class_size) |
Creates a task class of a known class and size. | |
TaskCollection * | create_task_collection (size_t collection_size) |
Creates a task collection of known size. | |
Task * | get_task (TaskClass *task_class, const char *key) |
Finds a task in a task class by its content. | |
void | add_task (TaskClass *task_class, Task *new_task) |
Adds a task to a task class. | |
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. | |
void | remove_task (TaskClass *task_class, char *task_content) |
Removes a task from a task class by its content. | |
void | remove_task_class (TaskCollection *task_collection, char *class_name) |
Removes a task class from a task collection. | |
void | print_task (Task *task) |
Prints the content of a task. |
Definition in file task.c.
Adds a task to a task class.
task_class | Pointer to the task class that will contain the new task |
new_task | Pointer to the task to be added |
Definition at line 74 of file task.c.
void add_task_class | ( | TaskCollection * | task_collection, |
TaskClass * | task_class ) |
Adds a task class to a task collection.
task_collection | Pointer to the task collection that will contain the new task |
task_class | Pointer to the task class to be added |
Definition at line 123 of file task.c.
Task * create_task | ( | char * | class_of_task, |
char * | task_content ) |
Creates a task of known class and content.
class_of_task | Pointer to the class string of the task |
task_content | Pointer to the content string of the task |
TaskClass * create_task_class | ( | char * | class_of_task, |
size_t | class_size ) |
Creates a task class of a known class and size.
class_of_task | Pointer to the class string of the task class |
class_size | Size of the task class hash table |
Definition at line 24 of file task.c.
TaskCollection * create_task_collection | ( | size_t | collection_size | ) |
Creates a task collection of known size.
collection_size | Size of the task collection hash table |
Finds a task in a task class by its content.
task_class | Pointer to the task class to look into |
key | Pointer to the key string (task content) |
Casts the output of hashmap_get to a Task* type
Definition at line 47 of file task.c.
TaskClass * get_task_class | ( | TaskCollection * | task_collection, |
const char * | key ) |
Gets a task class by its class name from a task collection.
task_collection | Pointer to the task collection containing the task class to be found |
key | Pointer to the key string (task class name) |
Casts the output of hashmap_get to a TaskClass* type
Definition at line 98 of file task.c.
void print_task | ( | Task * | task | ) |
void remove_task | ( | TaskClass * | task_class, |
char * | task_content ) |
Removes a task from a task class by its content.
task_class | Pointer to the task class that contains the task to be removed |
task_content | Pointer to the content string of the task to be removed |
Definition at line 140 of file task.c.
void remove_task_class | ( | TaskCollection * | task_collection, |
char * | class_name ) |
Removes a task class from a task collection.
task_collection | Pointer to the task collection that contains the task class to be removed |
class_name | Pointer to the class name string of the task class to be removed |
Definition at line 156 of file task.c.