text: /*
   * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
   *
   * Licensed under the Universal Permissive License v 1.0 as shown at
   * http://oss.oracle.com/licenses/upl.
   */
  #ifndef COH_INTERFACE_SPEC_HPP
  #define COH_INTERFACE_SPEC_HPP
  
  #include "coherence/lang/compatibility.hpp"
  
  #include "coherence/lang/lang_spec.hpp"
  #include "coherence/lang/Object.hpp"
  #include "coherence/lang/TypedHandle.hpp"
  #include "coherence/lang/TypedHolder.hpp"
  
  COH_OPEN_NAMESPACE2(coherence,lang)
  
  /**
  * Helper for defining a managed interface.
  *
  * Managed interfaces virtually derive from coherence::lang::Object, and
  * include a set of well known features, which are auto-generated by this
  * helper class:
  *
  * - Handle/View/Holder definitions
  * - virtual interface inheritance of up to 16 interfaces
  *
  * The template takes two parameters:
  *
  * - The name of the interface being defined
  * - An optional list of interfaces to extend, indicated as
  *   implements<i1, i2, ...>
  *
  * A normal interface definition would be:
  * @code
  * class MyInterface
  *   : public interface_spec<MyInterface,
  *       implements<SomeInterface, SomeOtherInterface> >
  *   {
  *   public:
  *       // pure virtual method definitions....
  *   };
  * @endcode
  *
  * @see implements
  *
  * @author mf 2008.07.14
  */
  template<class T, class I = implements<> >
  class interface_spec
      : public virtual Object, public virtual I::implements_chain
      {
      public:
          /**
          * Specification definition
          */
          typedef interface_spec this_spec;
  
          /**
          * Standard Handle definition
          */
          typedef TypedHandle<T> Handle;
  
          /**
          * Standard View definition
          */
          typedef TypedHandle<const T> View;
  
          /**
          * Standard Holder definition
          */
          typedef TypedHolder<T> Holder;
  
          /**
           * implemented interface typedefs
           */
          typedef typename I::interface_1  interface_1;
          typedef typename I::interface_2  interface_2;
          typedef typename I::interface_3  interface_3;
          typedef typename I::interface_4  interface_4;
          typedef typename I::interface_5  interface_5;
          typedef typename I::interface_6  interface_6;
          typedef typename I::interface_7  interface_7;
          typedef typename I::interface_8  interface_8;
          typedef typename I::interface_9  interface_9;
          typedef typename I::interface_10 interface_10;
          typedef typename I::interface_11 interface_11;
          typedef typename I::interface_12 interface_12;
          typedef typename I::interface_13 interface_13;
          typedef typename I::interface_14 interface_14;
          typedef typename I::interface_15 interface_15;
          typedef typename I::interface_16 interface_16;
  
          COH_GENERATE_CLASS_ID(T)
  
      private:
          /**
          * Blocked Object::create()
          *
          * @internal
          */
          static void create()
              {
              }
  
          /**
           * Hide Object::super.
           *
           * This will force a compiler error if an interface_spec is used in an extends<> rather then an implements<>
           */
          typedef void super;
      };
  
  COH_CLOSE_NAMESPACE2
  
  #endif // COH_INTERFACE_SPEC_HPP
  