/** Number of families */
unsigned int families_no;
+
+ /** Parent family. Family this individual comes from. */
+ struct familia_family * parents;
};
/**
/**
* Frees allocated memory of the given individual
- * DISCLAIMER! This function does not remove linked families. You have to
+ * DISCLAIMER! This function does not free memory of linked families. You have to
* remove them manually from storage.
* @parameter individual to free
*/
* Gets family with the given id of the given individual
* @parameter individual from whom get the family
* @parameter family id of the individual
- * @return individuals last name
+ * @return selected family or NULL if such does not exists or index is out of
+ * array bounds
*/
struct familia_family * familia_individual_get_family_by_id(struct familia_individual * individual, unsigned int id);
/**
* Removes family with the given id from the given individual
- * DISCLAIMER! This function does not remove linked families. You have to
+ * DISCLAIMER! This function does not free memory of linked families. You have to
* remove them manually from storage.
* @parameter individual from whom family will be removed
* @parameter family id of the individual
*/
void familia_individual_remove_family_by_id(struct familia_individual * individual, unsigned int id);
+/**
+ * Sets parents family of the given individual
+ * @parameter individual to set parents
+ * @parameter parents to set
+ */
+void familia_individual_set_parents(struct familia_individual * individual, struct familia_family * family);
+
+/**
+ * Gets family with the given id of the given individual
+ * @parameter individual from whom get the family
+ * @parameter family id of the individual
+ * @return individuals last name
+ */
+struct familia_family * familia_individual_get_parents(struct familia_individual * individual);
+
+/**
+ * Removes parents from the given individual
+ * DISCLAIMER! This function does not free memory of linked family. You have to
+ * remove them manually from storage.
+ * @parameter individual from whom parents will be removed
+ */
+void familia_individual_remove_parents(struct familia_individual * individual);
+
#endif /*_FAMILIA_INDIVIDUAL_H */