Added object position managing functions and structures.
[familia.git] / src / storage / positions.h
diff --git a/src/storage/positions.h b/src/storage/positions.h
new file mode 100644 (file)
index 0000000..2d3473e
--- /dev/null
@@ -0,0 +1,56 @@
+/****************************************************************************
+ *  Familia Lignum - Genealogical program                                   *
+ *  Copyright (C) 2011-2012 Rafał Długołęcki <rafal@dlugolecki.net.pl>      *
+ *                                                                          *
+ *  This program is free software; you can redistribute it and/or modify    *
+ *  it under the terms of the GNU General Public License as published by    *
+ *  the Free Software Foundation; version 2 of the License.                 *
+ *                                                                          *
+ *  This program is distributed in the hope that it will be useful,         *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of          *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
+ *  GNU General Public License for more details.                            *
+ *                                                                          *
+ *  You should have received a copy of the GNU General Public License along *
+ *  with this program; if not, write to the Free Software Foundation, Inc., *
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.             *
+ *                                                                          *
+ ****************************************************************************/
+
+#ifndef _FAMILIA_STORAGE_POSITIONS_H
+#define _FAMILIA_STORAGE_POSITIONS_H
+
+#include "../math/3d.h"
+
+#include "individual.h"
+#include "family.h"
+
+/**
+ * Sets position for the given individual.
+ * @parameter individual individual to set the position
+ * @parameter position 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
+ */
+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
+ * @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
+ * @return position of the family or NULL on error
+ */
+struct position * familia_position_get_family_position(struct familia_family *family);
+
+#endif /* _FAMILIA_STORAGE_POSITIONS_H */