methods.ringing.org

C++ interface

A C++ interface for interpreting XML method data, as well as retrieving data from this database, it included as part of the Ringing Class Library. This is a free library of C++ classes for writing ringing software.

Using the class library, retrieving methods from the database can be as simple as this:

#include <ringing/xmllib.h>
#include <iostream>

int main() {
  ringing::xmllib l(ringing::xmllib::default_url, 
                    "name=Lincolnshire&fields=title|stage|pn");

  for (auto e : l) {
    std::cout << "Name: " << e.name() << std::endl;
    std::cout << "Place notation: " << e.pn() << std::endl;
  }
}

Using the library

While most of the Ringing Class Library is under the GNU Public License (GPL), some of it, including all the bits you need to access this database, has been put under the less restrictive Lesser GNU Public License (LGPL). What this means is that you may use those parts of the library in your own programs even if you then plan to sell those programs for money. For more information, read the licensing information packaged with the library.