Classes

Class definitions are almost identical to that of interfaces except for additional attributes. The additional attribute, which include whether or not the class is final. Recall that Babel/SIDL supports only single inheritance of classes; therefore, only a single class will appear in the extends block. If one does not appear in the original SIDL file, by default the class will extend sidl.Baseclase.

For example, the XML representation of sidl.BaseClass is:


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Symbol PUBLIC "-//CCA//sidl Symbol DTD v1.1//EN"
  "/babel/share/repository/sidl.dtd">
<Symbol>
  <SymbolName name="sidl.BaseClass" version="0.9.12" />
  <Metadata date="20051208 10:47:28 PST">
    <MetadataEntry key="source-url"
    value="file:/babel/runtime/sidl/sidl.sidl" />
    <MetadataEntry key="babel-version" value="0.10.51" />
    <MetadataEntry key="xml-url"
    value="/babel/share/repository/sidl.BaseClass-v0.9.12.xml" />
    <MetadataEntry key="source-line" value="97" />
  </Metadata>
  <Comment>Every class implicitly inherits from 
  <code>BaseClass</code>. This class implements the methods in 
  <code>BaseInterface</code>.</Comment>
  <Class abstract="false">
    <Extends />
    <ImplementsBlock>
      <SymbolName name="sidl.BaseInterface" version="0.9.12" />
    </ImplementsBlock>
    <AllParentClasses />
    <AllParentInterfaces>
      <SymbolName name="sidl.BaseInterface" version="0.9.12" />
    </AllParentInterfaces>
    <MethodsBlock>
      <Method communication="normal" copy="false"
      definition="final" extension="" shortname="addRef">
        <Comment>
          <p>Add one to the intrinsic reference count in the
          underlying object. Object in 
          <code>sidl</code>have an intrinsic reference count.
          Objects continue to exist as long as the reference count
          is positive. Clients should call this method whenever
          they create another ongoing reference to an object or
          interface.</p>
          <p>This does not have a return value because there is no
          language independent type that can refer to an interface
          or a class.</p>
        </Comment>
        <Type type="void" />
        <ArgumentList />
        <ThrowsList />
        <ImplicitThrowsList>
          <SymbolName name="sidl.RuntimeException"
          version="0.9.12" />
        </ImplicitThrowsList>
      </Method>
      <Method communication="normal" copy="false"
      definition="final" extension="" shortname="deleteRef">
        <Comment>Decrease by one the intrinsic reference count in
        the underlying object, and delete the object if the
        reference is non-positive. Objects in 
        <code>sidl</code>have an intrinsic reference count. Clients
        should call this method whenever they remove a reference to
        an object or interface.</Comment>
        <Type type="void" />
        <ArgumentList />
        <ThrowsList />
        <ImplicitThrowsList>
          <SymbolName name="sidl.RuntimeException"
          version="0.9.12" />
        </ImplicitThrowsList>
      </Method>
      <Method communication="normal" copy="false"
      definition="final" extension="" shortname="isSame">
        <Comment>Return true if and only if 
        <code>obj</code>refers to the same object as this
        object.</Comment>
        <Type type="boolean" />
        <ArgumentList>
          <Argument copy="false" mode="in" name="iobj">
            <Type type="symbol">
              <SymbolName name="sidl.BaseInterface"
              version="0.9.12" />
            </Type>
          </Argument>
        </ArgumentList>
        <ThrowsList />
        <ImplicitThrowsList>
          <SymbolName name="sidl.RuntimeException"
          version="0.9.12" />
        </ImplicitThrowsList>
      </Method>
      <Method communication="normal" copy="false"
      definition="normal" extension="" shortname="isType">
        <Comment>Return whether this object is an instance of the
        specified type. The string name must be the 
        <code>sidl</code>type name. This routine will return 
        <code>true</code>if and only if a cast to the string type
        name would succeed.</Comment>
        <Type type="boolean" />
        <ArgumentList>
          <Argument copy="false" mode="in" name="name">
            <Type type="string" />
          </Argument>
        </ArgumentList>
        <ThrowsList />
        <ImplicitThrowsList>
          <SymbolName name="sidl.RuntimeException"
          version="0.9.12" />
        </ImplicitThrowsList>
      </Method>
      <Method communication="normal" copy="false"
      definition="final" extension="" shortname="getClassInfo">
        <Comment>Return the meta-data about the class implementing
        this interface.</Comment>
        <Type type="symbol">
          <SymbolName name="sidl.ClassInfo" version="0.9.12" />
        </Type>
        <ArgumentList />
        <ThrowsList />
        <ImplicitThrowsList>
          <SymbolName name="sidl.RuntimeException"
          version="0.9.12" />
        </ImplicitThrowsList>
      </Method>
    </MethodsBlock>
  </Class>
</Symbol>





babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov