+ Naming Conventions For AIDA Wrapper Packages HOWTO

CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.

Naming Conventions For AIDA Wrapper Packages HOWTO

Author: Jakub Moscicki et al.

Last update: 19 Aug 2002

Proposed scheme for the implementations of the AIDA interfaces version 3.x and later.

How to name libraries and namespaces when implementing AIDA interfaces


Package Names

The name of the package should contain the following items separated by an underscore (_):

project-name AIDA category-name foundation-package-name

Examples:

Anaphe_AIDA_Histogram_HTL - this package comes from Anaphe project, implements AIDA of Histogram interfaces using HTL as a foundation library.

Anaphe_AIDA_Fitting_FML

Anaphe_AIDA_Plotting_Qplotter

If the wrapper library has a native implementation (not based on any foundation library with the same functionality) then _native should be used as the last component in the name:

Anaphe_AIDA_Function_native

Names for modules in CVS repository

The name of the CVS module (directory) should be the same as the name of the package dropping the project name prefix:

$CVSROOT/.../AIDA_Histogram_HTL
$CVSROOT/.../AIDA_Fitting_FML
$CVSROOT/.../AIDA_Plotting_Qplotter

Names for libraries and other exportable binaries

The name of the library should include the full package name:

libAnaphe_AIDA_Histogram_HTL.so
libAnaphe_AIDA_Fitting_FML.so
libAnaphe_AIDA_Plotting_Qplotter.so

The same rule should be followed in other exportable binaries (static libraries, object files etc). The AIDA version should be handled by the package version which can appear in the suffix of the library.

Naming conventions for C++ code of the implementation classes

Everything which shows in the implementation should be contained within Anaphe namespace and a namespace formed according to the scheme AIDA_category-name_foundation-package-name, i.e. the package name without the prefix Anaphe_.
For example :
namespace Anaphe // project name
{
  namespace AIDA_Fitting_FML
  {
    class AIDA_Fitter : virtual public AIDA::IFitter
    {
      ...
    };
  };
};
As you can see above the name of wrapper class should be the same as the name of AIDA interface, dropping initial capital I and adding AIDA_ prefix.

Naming conventions for developer level AIDA interfaces

The package name is called AIDA_Dev. The classes are defined within a Dev namespace inside AIDA :
namespace AIDA
{
  namespace Dev
  {
    class IDevHistogram1D : virtual public AIDA::IHistogram1D
    {
       ...
    };
  };
};
As you can see above the name of developer level class should be the same as the name of AIDA interface, inserting Dev right after the starting I prefix.