
//=============================================================================
/**
 *  @file    included.idl
 *
 *  $Id: included.idl 95729 2012-05-03 12:01:09Z parsons $
 *
 *  This file contains examples of IDL code that has
 *  caused problems in the past for the TAO IDL
 *  compiler. This test is to make sure the problems
 *  stay fixed.
 *
 *
 *  @author Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
 */
//=============================================================================


#ifndef IDL_TEST_INCLUDED_IDL
#define IDL_TEST_INCLUDED_IDL

// Included in IDL file 'including.idl'.
module Aok
{
  typedef sequence<double> Seq1Type;
  typedef long Me;
};

enum Agog
{
  Agog1,
  Agog2,
  Agog3
};

// This valuetype is used in a sequence in the including file,
// and tests that Value_VarOut_T.h is included early enough.
module VT_Def
{
  valuetype VT {};
};

// A valuetype in valuetype.idl inherits from this one.
// In the original bug, the name for this valuetype's
// anonymous sequence member was not created in the derived
// valuetype's AST, so when the arglist for the derived
// valuetype's constructor w/arglist was generated, the member
// below was named 'sequence', which of course didn't compile.
valuetype IncludedBase
{
  public sequence<long> DeprecatedMember;
};

// References to MyStructA in including.idl get the
// forward declaration from lookup, and we were
// getting empty typename generation in various places,
// before overriding the visit methods for forward
// declared structs and unions in the relevant visitors.
module A
{
  struct MyStructA;
  typedef sequence<MyStructA> MySeqA;

  struct MyStructA
  {
   string str;
   MySeqA recursive_member;
  };
};

// A different enum with the same enum values is
// defined in a derived interface in the same scope
// in another IDL file that includes this one. The
// construction is legal and should be accepted.
module RootModule
{
  module SUBMODULE1
  {
    interface ParentIF
    {
      enum Mode
      {
        NORMAL,
        FAULTY,
        UNKNOWN
      };
    };
  };
};

#endif /* IDL_TEST_INCLUDED_IDL */
