wiki:Langbinding/MOB

Meta-Object Binding

The meta-object binding is the abstract representation of the bound interfaces. The interface allows for both creating and querying the bound interfaces and the associated types. Each language would have an instance of a meta-object binding for an interface allowing any other language to query and call every other language.

Description

The first aspect of the meta-object binding is to describe the available interfaces in the system. This amounts to a meta-description of the C++ classes, function, types, constants, etc. all of which live within namespaces.

Namespaces
Contains functions, variables, type, and other namespaces.
  • Name
  • Members
Types
Includes classes, and enumerations. Each has their own set of sub-items to describe them further. Among the set of members for a type there are special functions that implement the various type specific aspect not just member functions for classes.
  • Name
  • Members (functions and variables)
Functions
This includes both method function and regular functions (global and class static).
  • Name
  • Return value(s)
    • Type
    • Policies
  • Arguments
    • Type
    • Policies
  • Function
Variables
Variables covers both variables, as in the read-write sense, and other constant values such as enumeration values.
  • Name
  • Type
  • Getter function
  • Setter function

Creation

Each meta-object binding needs the capability to create interface descriptions for a particular language. Such creation in effect "implements" the binding for a specific language. It is possible for this to be either a runtime and compile time process, or a runtime only process. But how dynamic the creation is depends on the capabilities of the binding language. Simply put a language needs to:

  • Walk through the meta-object descriptions and for each:
    • Create a binding instance.
    • Set the implementation functions for the binding.
    • Set a language context.
    • Register the binding for others to use.
Last modified 15 years ago Last modified on Aug 10, 2007, 2:58:33 AM
Note: See TracWiki for help on using the wiki.