Changes

Jump to: navigation, search

Specification:Relationship Calculator

2 bytes added, 07:05, 7 June 2011
m
How to write a relationship calculator in 2.2.x
==How to write a relationship calculator in 2.2.x==
The framework for relationship calculator plugins is in place. Here are the rules the language-specific plugins must obey to be compatible with the framework:
# The relationship plugins (here and below referred to as <code>rel</code> plugins) must define a class that can be instantiated with the [http://www.gramps-project.org/doc docs GrampsDbBase] instance as its argument and that has a <code>get_relationship()</code> method obeying the following specifications:#* The <code>get_relationship()</code> method takes '''two''' input arguments, which are two instances of the [http://www.gramps-project.org/doc docs Person] class. To be determined is the relationship of the second person to the first person.
#* The <code>get_relationship()</code> method returns a tuple with '''two''' values:
#*# The string of the relationship (e.g. "father", or "grandson")

Navigation menu