Next: , Previous: The library class, Up: Using libraries



5.1.3 The library_entry class

The library_entry class is the value type of the iterator on a library. It is used to get information about the method from the library without constructing a method object.

— Function: string library_entry::name (void) const;

This returns the method's name in whatever form the library stores it internally. Thus it may or may not contain the class name(s) or stage name of the method. In the case of MicroSIRIL libraries, it will not even have whitespace in the name.

— Function: string library_entry::base_name (void) const;

This returns the base name of the method (i.e. the name with the class name(s) and stage name removed). The value returned is suitable for passing to the method constructor.

— Function: string library_entry::pn (void) const;

This returns a string containing the method's place notation.

— Function: int library_entry::bells (void) const;

This returns the number of bells on which the method is defined.

— Function: method library_entry::meth (void) const

This constructs and return a method object.

— Function: template <class Facet> bool library_entry::has_facet (Facet const* f = NULL ) const;

This function returns true if the method entry contains information about the given facet. Note that just because a method library type supports a certain facet, that does not necessarily mean that every method in the library actually has that facet. For example, an entry in a Central Council library may not contain any information about the first peals in a method; or an entry in an XML library may not contain certain elements.

The contents of the argument f are not used, but this may be used to indicate the type of the facet as an alternative to explicit template instantiation.

— Function: template <class Facet> typename Facet::type library_entry::get_facet (Facet const* f = NULL ) const;

This function returns the value of the specified facet of the method entry.

The contents of the argument f are not used, but this may be used to indicate the type of the facet as an alternative to explicit template instantiation.

For more information on facets and an example of how these functions are used, see Facets.