methods.ringing.orgHome > For programmers > C++

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>

// Get the methods from the database
xmllib l(xmllib::default_url, 

// Iterate through the methods
xmllib::const_iterator i;
for(i = l.begin(); i != l.end(); ++i) {
  // Print out some information
  cout << "Name: " << (*i).name() << endl;
  cout << "Place notation: " << (*i).pn() << endl;

  // Create a `method' object
  method m = (*i).meth();

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.

Full documentation for the library is included, and is also available from the project's web page.

Valid HTML 4.01!Valid CSS!Powered by MySQLPowered by LibXSLT

Comments to the Webmaster. Last updated 13 May 2005. This site is generously hosted by Mythic Beasts.