#include "individual.h"
+/**
+ * @file storage/family.h
+ * @brief Code for managing families.
+ *
+ */
+
enum FFamilyIndividualIndex {
Individual1,
Individual2
};
/**
- * Creates new family structure
- * @return Newly allocated individual.If allocation failed, returns NULL, like
+ * Creates new family structure.
+ * @return Newly allocated @ref familia_family. If allocation failed, returns NULL, like
* malloc.
*/
struct familia_family * familia_family_new();
/**
- * Frees allocated memory of the given family
- * DISCLAIMER! This function does not free memory of linked individuals. You have to
- * remove them manually from storage.
- * @parameter individual free
+ * Frees allocated memory of the given family.
+ * @attention This function does not free memory of linked individuals. You have to
+ * remove them manually from @ref familia_storage, by using @ref familia_storage_free.
+ * @param family family to free
*/
void familia_family_free(struct familia_family * family);
/**
- * Sets individual1 in the given family
- * @parameter family to set the individual
- * @parameter individual which will be set
+ * Sets parent in the given family.
+ * @param family family to set the parent
+ * @param individual individual which will be a parent in family
+ * @param index individual type which will be set
*/
void familia_family_set_parent(struct familia_family * family, struct familia_individual * individual, enum FFamilyIndividualIndex index);
/**
- * Gets individual from the given family
- * @parameter family to get the individual
- * @parameter individual index of which individual get
+ * Gets parent from the given family.
+ * @param family family to get the individual
+ * @param index individual index of which individual get
*/
struct familia_individual * familia_family_get_parent(struct familia_family * family, enum FFamilyIndividualIndex index);
/**
- * Removes individual from the given family
- * DISCLAIMER! This function does not free memory of linked individuals. You have to
- * remove them manually from storage.
- * @parameter family to remove the individual
- * @parameter individual index of which individual to remove
+ * Removes parent from the given family
+ * @attention This function does not free memory of linked individuals. You have to
+ * remove them manually from @ref familia_storage, by using @ref familia_storage_free.
+ * @param family family to remove the individual
+ * @param index individual index of which individual to remove
* @return returns removed individual, NULL if such does not exist.
*/
struct familia_individual * familia_family_remove_parent(struct familia_family * family, enum FFamilyIndividualIndex index);
* Adds new child in the given family
* Automatically sets family as parents in individual variable.
*
- * @parameter family to set the individual
- * @parameter individual which will be added
+ * @param family family to set the individual
+ * @param individual individual which will be added
*/
void familia_family_add_child(struct familia_family * family, struct familia_individual * individual);
/**
* Gets the nth child from the given family
* Child with index = 0 is the oldest. Bigger the index, the child is younger
- * @parameter family to get the child
- * @parameter individual index of which individual get
+ * @param family family to get the child
+ * @param index individual index of which individual get
* @return selected child. If index is bigger than child_no of the family
* returns NULL.
*/
/**
* Removes child from the given family
- * DISCLAIMER! This function does not free memory of linked children. You have to
- * remove them manually from storage.
- * @parameter family to remove the child
- * @parameter index of which child should be removed
+ * @attention This function does not free memory of linked children. You have to
+ * remove them manually from @ref familia_storage, by using @ref familia_storage_free.
+ * @param family family to remove the child
+ * @param index index of which child should be removed
* @return removed child. If such does not exist or index is bigger than child_no
* of the family, returns NULL.
*/
#include "individual.h"
#include "family.h"
+/**
+ * @file storage/positions.h
+ * @brief Code for managing 3D positions of objects.
+ *
+ */
+
/**
* Sets position for the given individual.
- * @parameter individual individual to set the position
- * @parameter position position which will be used for individual
+ * @param individual individual to set the position
+ * @param pos position which will be used for individual
*/
void familia_positions_set_individual_position(struct familia_individual *individual, struct position *pos);
/**
* Sets position for the given family.
- * @parameter family family to set the position
- * @parameter position position which will be used for family
+ * @param family family to set the position
+ * @param pos position which will be used for family
*/
void familia_positions_set_family_position(struct familia_family *family, struct position *pos);
/**
* Gets position of the given individual.
- * @parameter individual individual for which the position will be get
+ * @param individual individual for which the position will be get
* @return position of the individual or NULL on error
*/
struct position * familia_position_get_individual_position(struct familia_individual *individual);
/**
* Gets position of the given family
- * @parameter family family for which the position will be get
+ * @param family family for which the position will be get
* @return position of the family or NULL on error
*/
struct position * familia_position_get_family_position(struct familia_family *family);