// -*- C++ -*-
/**
 * Code generated by the The ACE ORB (TAO) IDL Compiler v2.4.0
 * TAO and the TAO IDL Compiler have been developed by:
 *       Center for Distributed Object Computing
 *       Washington University
 *       St. Louis, MO
 *       USA
 *       http://www.cs.wustl.edu/~schmidt/doc-center.html
 * and
 *       Distributed Object Computing Laboratory
 *       University of California at Irvine
 *       Irvine, CA
 *       USA
 * and
 *       Institute for Software Integrated Systems
 *       Vanderbilt University
 *       Nashville, TN
 *       USA
 *       http://www.isis.vanderbilt.edu/
 *
 * Information about TAO is available at:
 *     http://www.dre.vanderbilt.edu/~schmidt/TAO.html
 **/

// TAO_IDL - Generated from
// be/be_codegen.cpp:373


#include "QuoterC.h"
#include "tao/AnyTypeCode/Null_RefCount_Policy.h"
#include "tao/AnyTypeCode/TypeCode_Constants.h"
#include "tao/AnyTypeCode/Alias_TypeCode_Static.h"
#include "tao/AnyTypeCode/Objref_TypeCode_Static.h"
#include "tao/AnyTypeCode/String_TypeCode_Static.h"
#include "tao/AnyTypeCode/Struct_TypeCode_Static.h"
#include "tao/AnyTypeCode/TypeCode_Struct_Field.h"
#include "tao/CDR.h"
#include "tao/Exception_Data.h"
#include "tao/Invocation_Adapter.h"
#include "tao/Object_T.h"
#include "tao/SystemException.h"
#include "tao/CDR.h"
#include "tao/AnyTypeCode/Any.h"
#include "tao/AnyTypeCode/Any_Impl_T.h"
#include "tao/AnyTypeCode/Any_Dual_Impl_T.h"
#include "ace/OS_NS_string.h"

#if !defined (__ACE_INLINE__)
#include "QuoterC.inl"
#endif /* !defined INLINE */

// TAO_IDL - Generated from
// be/be_visitor_exception/exception_cs.cpp:98

Quoter::Invalid_Stock_Symbol::Invalid_Stock_Symbol (void)
  : ::CORBA::UserException (
        "IDL:Quoter/Invalid_Stock_Symbol:1.0",
        "Invalid_Stock_Symbol"
      )
{
}

Quoter::Invalid_Stock_Symbol::~Invalid_Stock_Symbol (void)
{
}

Quoter::Invalid_Stock_Symbol::Invalid_Stock_Symbol (const ::Quoter::Invalid_Stock_Symbol &_tao_excp)
  : ::CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
}

Quoter::Invalid_Stock_Symbol&
Quoter::Invalid_Stock_Symbol::operator= (const ::Quoter::Invalid_Stock_Symbol &_tao_excp)
{
  this->::CORBA::UserException::operator= (_tao_excp);
  return *this;
}

void Quoter::Invalid_Stock_Symbol::_tao_any_destructor (void *_tao_void_pointer)
{
  Invalid_Stock_Symbol *_tao_tmp_pointer =
    static_cast<Invalid_Stock_Symbol *> (_tao_void_pointer);
  delete _tao_tmp_pointer;
}

Quoter::Invalid_Stock_Symbol *
Quoter::Invalid_Stock_Symbol::_downcast ( ::CORBA::Exception *_tao_excp)
{
  return dynamic_cast<Invalid_Stock_Symbol *> (_tao_excp);
}

const Quoter::Invalid_Stock_Symbol *
Quoter::Invalid_Stock_Symbol::_downcast ( ::CORBA::Exception const *_tao_excp)
{
  return dynamic_cast<const Invalid_Stock_Symbol *> (_tao_excp);
}

::CORBA::Exception *Quoter::Invalid_Stock_Symbol::_alloc (void)
{
  ::CORBA::Exception *retval = 0;
  ACE_NEW_RETURN (retval, ::Quoter::Invalid_Stock_Symbol, 0);
  return retval;
}

::CORBA::Exception *
Quoter::Invalid_Stock_Symbol::_tao_duplicate (void) const
{
  ::CORBA::Exception *result = 0;
  ACE_NEW_RETURN (
      result,
      ::Quoter::Invalid_Stock_Symbol (*this),
      0
    );
  return result;
}

void Quoter::Invalid_Stock_Symbol::_raise (void) const
{
  throw *this;
}

void Quoter::Invalid_Stock_Symbol::_tao_encode (TAO_OutputCDR &cdr) const
{
  if (!(cdr << *this))
    {
      throw ::CORBA::MARSHAL ();
    }
}

void Quoter::Invalid_Stock_Symbol::_tao_decode (TAO_InputCDR &cdr)
{
  if (!(cdr >> *this))
    {
      throw ::CORBA::MARSHAL ();
    }
}

// TAO extension - the virtual _type method.
::CORBA::TypeCode_ptr Quoter::Invalid_Stock_Symbol::_tao_type (void) const
{
  return ::Quoter::_tc_Invalid_Stock_Symbol;
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/struct_typecode.cpp:86

static TAO::TypeCode::Struct_Field<
  char const *,
  ::CORBA::TypeCode_ptr const *> const * const 
    _tao_fields_Quoter_Invalid_Stock_Symbol = 0;
  
static TAO::TypeCode::Struct<
  char const *,
  ::CORBA::TypeCode_ptr const *,
  TAO::TypeCode::Struct_Field<
    char const *,
    ::CORBA::TypeCode_ptr const *> const *,
  TAO::Null_RefCount_Policy>
_tao_tc_Quoter_Invalid_Stock_Symbol (
  ::CORBA::tk_except,
  "IDL:Quoter/Invalid_Stock_Symbol:1.0",
  "Invalid_Stock_Symbol",
  _tao_fields_Quoter_Invalid_Stock_Symbol,
  0);


namespace Quoter
{
  ::CORBA::TypeCode_ptr const _tc_Invalid_Stock_Symbol =
    &_tao_tc_Quoter_Invalid_Stock_Symbol;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:48

// Traits specializations for Quoter::Stock_Factory.

Quoter::Stock_Factory_ptr
TAO::Objref_Traits<Quoter::Stock_Factory>::duplicate (
    Quoter::Stock_Factory_ptr p)
{
  return Quoter::Stock_Factory::_duplicate (p);
}

void
TAO::Objref_Traits<Quoter::Stock_Factory>::release (
    Quoter::Stock_Factory_ptr p)
{
  ::CORBA::release (p);
}

Quoter::Stock_Factory_ptr
TAO::Objref_Traits<Quoter::Stock_Factory>::nil (void)
{
  return Quoter::Stock_Factory::_nil ();
}

::CORBA::Boolean
TAO::Objref_Traits<Quoter::Stock_Factory>::marshal (
    const Quoter::Stock_Factory_ptr p,
    TAO_OutputCDR & cdr)
{
  return ::CORBA::Object::marshal (p, cdr);
}

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:88

::Quoter::Stock_ptr
Quoter::Stock_Factory::get_stock (
  const char * stock_symbol)
{
  if (!this->is_evaluated ())
    {
      ::CORBA::Object::tao_object_initialize (this);
    }
  
  TAO::Arg_Traits< ::Quoter::Stock>::ret_val _tao_retval;
  TAO::Arg_Traits< char *>::in_arg_val _tao_stock_symbol (stock_symbol);

  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_stock_symbol
    };

  static TAO::Exception_Data
  _tao_Quoter_Stock_Factory_get_stock_exceptiondata [] = 
    {
      {
        "IDL:Quoter/Invalid_Stock_Symbol:1.0",
        Quoter::Invalid_Stock_Symbol::_alloc
#if TAO_HAS_INTERCEPTORS == 1
        , Quoter::_tc_Invalid_Stock_Symbol
#endif /* TAO_HAS_INTERCEPTORS */
      }
    };

  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "get_stock",
      9,
      TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY
      
    );

  _tao_call.invoke (
      _tao_Quoter_Stock_Factory_get_stock_exceptiondata,
      1
    );

  return _tao_retval.retn ();
}

Quoter::Stock_Factory::Stock_Factory (void)
{
}

Quoter::Stock_Factory::~Stock_Factory (void)
{
}

void
Quoter::Stock_Factory::_tao_any_destructor (void *_tao_void_pointer)
{
  Stock_Factory *_tao_tmp_pointer =
    static_cast<Stock_Factory *> (_tao_void_pointer);
  ::CORBA::release (_tao_tmp_pointer);
}

Quoter::Stock_Factory_ptr
Quoter::Stock_Factory::_narrow (
    ::CORBA::Object_ptr _tao_objref)
{
  return
    TAO::Narrow_Utils<Stock_Factory>::narrow (
        _tao_objref,
        "IDL:Quoter/Stock_Factory:1.0");
}

Quoter::Stock_Factory_ptr
Quoter::Stock_Factory::_unchecked_narrow (
    ::CORBA::Object_ptr _tao_objref)
{
  return
    TAO::Narrow_Utils<Stock_Factory>::unchecked_narrow (
        _tao_objref);
}

Quoter::Stock_Factory_ptr
Quoter::Stock_Factory::_nil (void)
{
  return 0;
}

Quoter::Stock_Factory_ptr
Quoter::Stock_Factory::_duplicate (Stock_Factory_ptr obj)
{
  if (! ::CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  return obj;
}

void
Quoter::Stock_Factory::_tao_release (Stock_Factory_ptr obj)
{
  ::CORBA::release (obj);
}

::CORBA::Boolean
Quoter::Stock_Factory::_is_a (const char *value)
{
  if (
      ACE_OS::strcmp (
          value,
          "IDL:Quoter/Stock_Factory:1.0"
        ) == 0 ||
      ACE_OS::strcmp (
          value,
          "IDL:omg.org/CORBA/Object:1.0"
        ) == 0
    )
    {
      return true; // success using local knowledge
    }
  else
    {
      return this->::CORBA::Object::_is_a (value);
    }
}

const char* Quoter::Stock_Factory::_interface_repository_id (void) const
{
  return "IDL:Quoter/Stock_Factory:1.0";
}

::CORBA::Boolean
Quoter::Stock_Factory::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/objref_typecode.cpp:70

static TAO::TypeCode::Objref<char const *,
                             TAO::Null_RefCount_Policy>
  _tao_tc_Quoter_Stock_Factory (
    ::CORBA::tk_objref,
    "IDL:Quoter/Stock_Factory:1.0",
    "Stock_Factory");
  

namespace Quoter
{
  ::CORBA::TypeCode_ptr const _tc_Stock_Factory =
    &_tao_tc_Quoter_Stock_Factory;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:48

// Traits specializations for Quoter::Stock.

Quoter::Stock_ptr
TAO::Objref_Traits<Quoter::Stock>::duplicate (
    Quoter::Stock_ptr p)
{
  return Quoter::Stock::_duplicate (p);
}

void
TAO::Objref_Traits<Quoter::Stock>::release (
    Quoter::Stock_ptr p)
{
  ::CORBA::release (p);
}

Quoter::Stock_ptr
TAO::Objref_Traits<Quoter::Stock>::nil (void)
{
  return Quoter::Stock::_nil ();
}

::CORBA::Boolean
TAO::Objref_Traits<Quoter::Stock>::marshal (
    const Quoter::Stock_ptr p,
    TAO_OutputCDR & cdr)
{
  return ::CORBA::Object::marshal (p, cdr);
}

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:88

char *
Quoter::Stock::symbol (
  void)
{
  if (!this->is_evaluated ())
    {
      ::CORBA::Object::tao_object_initialize (this);
    }
  
  TAO::Arg_Traits< char *>::ret_val _tao_retval;

  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };

  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "_get_symbol",
      11,
      TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY,
      TAO::TAO_TWOWAY_INVOCATION
      ,
      TAO::TAO_SYNCHRONOUS_INVOCATION,
      false
    );

  _tao_call.invoke (0, 0);

  return _tao_retval.retn ();
}

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:88

char *
Quoter::Stock::full_name (
  void)
{
  if (!this->is_evaluated ())
    {
      ::CORBA::Object::tao_object_initialize (this);
    }
  
  TAO::Arg_Traits< char *>::ret_val _tao_retval;

  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };

  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "_get_full_name",
      14,
      TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY,
      TAO::TAO_TWOWAY_INVOCATION
      ,
      TAO::TAO_SYNCHRONOUS_INVOCATION,
      false
    );

  _tao_call.invoke (0, 0);

  return _tao_retval.retn ();
}

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:88

::CORBA::Double
Quoter::Stock::price (
  void)
{
  if (!this->is_evaluated ())
    {
      ::CORBA::Object::tao_object_initialize (this);
    }
  
  TAO::Arg_Traits< ::CORBA::Double>::ret_val _tao_retval;

  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };

  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "price",
      5,
      TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY,
      TAO::TAO_TWOWAY_INVOCATION
      ,
      TAO::TAO_SYNCHRONOUS_INVOCATION,
      false
    );

  _tao_call.invoke (0, 0);

  return _tao_retval.retn ();
}

Quoter::Stock::Stock (void)
{
}

Quoter::Stock::~Stock (void)
{
}

void
Quoter::Stock::_tao_any_destructor (void *_tao_void_pointer)
{
  Stock *_tao_tmp_pointer =
    static_cast<Stock *> (_tao_void_pointer);
  ::CORBA::release (_tao_tmp_pointer);
}

Quoter::Stock_ptr
Quoter::Stock::_narrow (
    ::CORBA::Object_ptr _tao_objref)
{
  return
    TAO::Narrow_Utils<Stock>::narrow (
        _tao_objref,
        "IDL:Quoter/Stock:1.0");
}

Quoter::Stock_ptr
Quoter::Stock::_unchecked_narrow (
    ::CORBA::Object_ptr _tao_objref)
{
  return
    TAO::Narrow_Utils<Stock>::unchecked_narrow (
        _tao_objref);
}

Quoter::Stock_ptr
Quoter::Stock::_nil (void)
{
  return 0;
}

Quoter::Stock_ptr
Quoter::Stock::_duplicate (Stock_ptr obj)
{
  if (! ::CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  return obj;
}

void
Quoter::Stock::_tao_release (Stock_ptr obj)
{
  ::CORBA::release (obj);
}

::CORBA::Boolean
Quoter::Stock::_is_a (const char *value)
{
  if (
      ACE_OS::strcmp (
          value,
          "IDL:Quoter/Stock:1.0"
        ) == 0 ||
      ACE_OS::strcmp (
          value,
          "IDL:omg.org/CORBA/Object:1.0"
        ) == 0
    )
    {
      return true; // success using local knowledge
    }
  else
    {
      return this->::CORBA::Object::_is_a (value);
    }
}

const char* Quoter::Stock::_interface_repository_id (void) const
{
  return "IDL:Quoter/Stock:1.0";
}

::CORBA::Boolean
Quoter::Stock::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/objref_typecode.cpp:70

static TAO::TypeCode::Objref<char const *,
                             TAO::Null_RefCount_Policy>
  _tao_tc_Quoter_Stock (
    ::CORBA::tk_objref,
    "IDL:Quoter/Stock:1.0",
    "Stock");
  

namespace Quoter
{
  ::CORBA::TypeCode_ptr const _tc_Stock =
    &_tao_tc_Quoter_Stock;
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/struct_typecode.cpp:86

static TAO::TypeCode::Struct_Field<
  char const *,
  ::CORBA::TypeCode_ptr const *> const 
    _tao_fields_Quoter_Event[] =
      {
        { "price", &CORBA::_tc_double },
        { "symbol", &CORBA::_tc_string },
        { "full_name", &CORBA::_tc_string }
      };
  
static TAO::TypeCode::Struct<
  char const *,
  ::CORBA::TypeCode_ptr const *,
  TAO::TypeCode::Struct_Field<
    char const *,
    ::CORBA::TypeCode_ptr const *> const *,
  TAO::Null_RefCount_Policy>
_tao_tc_Quoter_Event (
  ::CORBA::tk_struct,
  "IDL:Quoter/Event:1.0",
  "Event",
  _tao_fields_Quoter_Event,
  3);


namespace Quoter
{
  ::CORBA::TypeCode_ptr const _tc_Event =
    &_tao_tc_Quoter_Event;
}

// TAO_IDL - Generated from
// be/be_visitor_structure/structure_cs.cpp:56

void
Quoter::Event::_tao_any_destructor (
    void *_tao_void_pointer)
{
  Event *_tao_tmp_pointer =
    static_cast<Event *> (_tao_void_pointer);
  delete _tao_tmp_pointer;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:48

// Traits specializations for Quoter::Modify_Stock.

Quoter::Modify_Stock_ptr
TAO::Objref_Traits<Quoter::Modify_Stock>::duplicate (
    Quoter::Modify_Stock_ptr p)
{
  return Quoter::Modify_Stock::_duplicate (p);
}

void
TAO::Objref_Traits<Quoter::Modify_Stock>::release (
    Quoter::Modify_Stock_ptr p)
{
  ::CORBA::release (p);
}

Quoter::Modify_Stock_ptr
TAO::Objref_Traits<Quoter::Modify_Stock>::nil (void)
{
  return Quoter::Modify_Stock::_nil ();
}

::CORBA::Boolean
TAO::Objref_Traits<Quoter::Modify_Stock>::marshal (
    const Quoter::Modify_Stock_ptr p,
    TAO_OutputCDR & cdr)
{
  return ::CORBA::Object::marshal (p, cdr);
}

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:88

void
Quoter::Modify_Stock::set_price (
  ::CORBA::Double new_price)
{
  if (!this->is_evaluated ())
    {
      ::CORBA::Object::tao_object_initialize (this);
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  TAO::Arg_Traits< ::CORBA::Double>::in_arg_val _tao_new_price (new_price);

  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_new_price
    };

  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "set_price",
      9,
      TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY
      
    );

  _tao_call.invoke (0, 0);
}

Quoter::Modify_Stock::Modify_Stock (void)
{
}

Quoter::Modify_Stock::~Modify_Stock (void)
{
}

void
Quoter::Modify_Stock::_tao_any_destructor (void *_tao_void_pointer)
{
  Modify_Stock *_tao_tmp_pointer =
    static_cast<Modify_Stock *> (_tao_void_pointer);
  ::CORBA::release (_tao_tmp_pointer);
}

Quoter::Modify_Stock_ptr
Quoter::Modify_Stock::_narrow (
    ::CORBA::Object_ptr _tao_objref)
{
  return
    TAO::Narrow_Utils<Modify_Stock>::narrow (
        _tao_objref,
        "IDL:Quoter/Modify_Stock:1.0");
}

Quoter::Modify_Stock_ptr
Quoter::Modify_Stock::_unchecked_narrow (
    ::CORBA::Object_ptr _tao_objref)
{
  return
    TAO::Narrow_Utils<Modify_Stock>::unchecked_narrow (
        _tao_objref);
}

Quoter::Modify_Stock_ptr
Quoter::Modify_Stock::_nil (void)
{
  return 0;
}

Quoter::Modify_Stock_ptr
Quoter::Modify_Stock::_duplicate (Modify_Stock_ptr obj)
{
  if (! ::CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  return obj;
}

void
Quoter::Modify_Stock::_tao_release (Modify_Stock_ptr obj)
{
  ::CORBA::release (obj);
}

::CORBA::Boolean
Quoter::Modify_Stock::_is_a (const char *value)
{
  if (
      ACE_OS::strcmp (
          value,
          "IDL:Quoter/Stock:1.0"
        ) == 0 ||
      ACE_OS::strcmp (
          value,
          "IDL:Quoter/Modify_Stock:1.0"
        ) == 0 ||
      ACE_OS::strcmp (
          value,
          "IDL:omg.org/CORBA/Object:1.0"
        ) == 0
    )
    {
      return true; // success using local knowledge
    }
  else
    {
      return this->::CORBA::Object::_is_a (value);
    }
}

const char* Quoter::Modify_Stock::_interface_repository_id (void) const
{
  return "IDL:Quoter/Modify_Stock:1.0";
}

::CORBA::Boolean
Quoter::Modify_Stock::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/objref_typecode.cpp:70

static TAO::TypeCode::Objref<char const *,
                             TAO::Null_RefCount_Policy>
  _tao_tc_Quoter_Modify_Stock (
    ::CORBA::tk_objref,
    "IDL:Quoter/Modify_Stock:1.0",
    "Modify_Stock");
  

namespace Quoter
{
  ::CORBA::TypeCode_ptr const _tc_Modify_Stock =
    &_tao_tc_Quoter_Modify_Stock;
}

// TAO_IDL - Generated from
// be/be_visitor_exception/any_op_cs.cpp:38
TAO_BEGIN_VERSIONED_NAMESPACE_DECL



namespace TAO
{
  template<>
  ::CORBA::Boolean
  Any_Dual_Impl_T<Quoter::Invalid_Stock_Symbol>::demarshal_value (TAO_InputCDR & cdr)
  {
    ::CORBA::String_var id;

    if (!(cdr >> id.out ()))
      {
        return false;
      }
    
    try
      {
        this->value_->_tao_decode (cdr);
      }
    catch (const ::CORBA::Exception &)
      {
        return false;
      }

    return true;
  }
}
TAO_END_VERSIONED_NAMESPACE_DECL



#if defined (ACE_ANY_OPS_USE_NAMESPACE)

namespace Quoter
{
  

  // Copying insertion.
  void operator<<= (
      ::CORBA::Any &_tao_any,
      const ::Quoter::Invalid_Stock_Symbol &_tao_elem)
  {
    TAO::Any_Dual_Impl_T< ::Quoter::Invalid_Stock_Symbol>::insert_copy (
        _tao_any,
        ::Quoter::Invalid_Stock_Symbol::_tao_any_destructor,
        ::Quoter::_tc_Invalid_Stock_Symbol,
        _tao_elem);
  }

  // Non-copying insertion.
  void operator<<= (
      ::CORBA::Any &_tao_any,
      ::Quoter::Invalid_Stock_Symbol *_tao_elem)
  {
    TAO::Any_Dual_Impl_T< ::Quoter::Invalid_Stock_Symbol>::insert (
        _tao_any,
        ::Quoter::Invalid_Stock_Symbol::_tao_any_destructor,
        ::Quoter::_tc_Invalid_Stock_Symbol,
        _tao_elem);
  }

  // Extraction to non-const pointer (deprecated).
  ::CORBA::Boolean operator>>= (
      const ::CORBA::Any &_tao_any,
      ::Quoter::Invalid_Stock_Symbol *&_tao_elem)
  {
    return _tao_any >>= const_cast<
        const ::Quoter::Invalid_Stock_Symbol *&> (
        _tao_elem);
  }

  // Extraction to const pointer.
  ::CORBA::Boolean operator>>= (
      const ::CORBA::Any &_tao_any,
      const ::Quoter::Invalid_Stock_Symbol *&_tao_elem)
  {
    return
      TAO::Any_Dual_Impl_T< ::Quoter::Invalid_Stock_Symbol>::extract (
          _tao_any,
          ::Quoter::Invalid_Stock_Symbol::_tao_any_destructor,
          ::Quoter::_tc_Invalid_Stock_Symbol,
          _tao_elem);
  }
}

#else

TAO_BEGIN_VERSIONED_NAMESPACE_DECL



// Copying insertion.
void operator<<= (
    ::CORBA::Any &_tao_any,
    const Quoter::Invalid_Stock_Symbol &_tao_elem)
{
  TAO::Any_Dual_Impl_T<Quoter::Invalid_Stock_Symbol>::insert_copy (
      _tao_any,
      Quoter::Invalid_Stock_Symbol::_tao_any_destructor,
      Quoter::_tc_Invalid_Stock_Symbol,
      _tao_elem
    );
}

// Non-copying insertion.
void operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Invalid_Stock_Symbol *_tao_elem)
{
  TAO::Any_Dual_Impl_T<Quoter::Invalid_Stock_Symbol>::insert (
      _tao_any,
      Quoter::Invalid_Stock_Symbol::_tao_any_destructor,
      Quoter::_tc_Invalid_Stock_Symbol,
      _tao_elem
    );
}

// Extraction to non-const pointer (deprecated).
::CORBA::Boolean operator>>= (
    const ::CORBA::Any &_tao_any,
    Quoter::Invalid_Stock_Symbol *&_tao_elem)
{
  return _tao_any >>= const_cast<
      const Quoter::Invalid_Stock_Symbol *&> (
      _tao_elem);
}

// Extraction to const pointer.
::CORBA::Boolean operator>>= (
    const ::CORBA::Any &_tao_any,
    const Quoter::Invalid_Stock_Symbol *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<Quoter::Invalid_Stock_Symbol>::extract (
        _tao_any,
        Quoter::Invalid_Stock_Symbol::_tao_any_destructor,
        Quoter::_tc_Invalid_Stock_Symbol,
        _tao_elem);
}
TAO_END_VERSIONED_NAMESPACE_DECL



#endif

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:38
TAO_BEGIN_VERSIONED_NAMESPACE_DECL



namespace TAO
{
  template<>
  ::CORBA::Boolean
  Any_Impl_T<Quoter::Stock_Factory>::to_object (
      ::CORBA::Object_ptr &_tao_elem) const
  {
    _tao_elem = ::CORBA::Object::_duplicate (this->value_);
    return true;
  }
}
TAO_END_VERSIONED_NAMESPACE_DECL



#if defined (ACE_ANY_OPS_USE_NAMESPACE)

namespace Quoter
{
  

  /// Copying insertion.
  void
  operator<<= (
      ::CORBA::Any &_tao_any,
      Stock_Factory_ptr _tao_elem)
  {
    Stock_Factory_ptr _tao_objptr =
      Stock_Factory::_duplicate (_tao_elem);
    _tao_any <<= &_tao_objptr;
  }

  /// Non-copying insertion.
  void
  operator<<= (
      ::CORBA::Any &_tao_any,
      Stock_Factory_ptr *_tao_elem)
  {
    TAO::Any_Impl_T<Stock_Factory>::insert (
        _tao_any,
        Stock_Factory::_tao_any_destructor,
        _tc_Stock_Factory,
        *_tao_elem);
  }

  ::CORBA::Boolean
  operator>>= (
      const ::CORBA::Any &_tao_any,
      Stock_Factory_ptr &_tao_elem)
  {
    return
      TAO::Any_Impl_T<Stock_Factory>::extract (
          _tao_any,
          Stock_Factory::_tao_any_destructor,
          _tc_Stock_Factory,
          _tao_elem);
  }
}

#else

TAO_BEGIN_VERSIONED_NAMESPACE_DECL



/// Copying insertion.
void
operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Stock_Factory_ptr _tao_elem)
{
  Quoter::Stock_Factory_ptr _tao_objptr =
    Quoter::Stock_Factory::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

/// Non-copying insertion.
void
operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Stock_Factory_ptr *_tao_elem)
{
  TAO::Any_Impl_T<Quoter::Stock_Factory>::insert (
      _tao_any,
      Quoter::Stock_Factory::_tao_any_destructor,
      Quoter::_tc_Stock_Factory,
      *_tao_elem);
}

::CORBA::Boolean
operator>>= (
    const ::CORBA::Any &_tao_any,
    Quoter::Stock_Factory_ptr &_tao_elem)
{
  return
    TAO::Any_Impl_T<Quoter::Stock_Factory>::extract (
        _tao_any,
        Quoter::Stock_Factory::_tao_any_destructor,
        Quoter::_tc_Stock_Factory,
        _tao_elem);
}

TAO_END_VERSIONED_NAMESPACE_DECL



#endif

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:38
TAO_BEGIN_VERSIONED_NAMESPACE_DECL



namespace TAO
{
  template<>
  ::CORBA::Boolean
  Any_Impl_T<Quoter::Stock>::to_object (
      ::CORBA::Object_ptr &_tao_elem) const
  {
    _tao_elem = ::CORBA::Object::_duplicate (this->value_);
    return true;
  }
}
TAO_END_VERSIONED_NAMESPACE_DECL



#if defined (ACE_ANY_OPS_USE_NAMESPACE)

namespace Quoter
{
  

  /// Copying insertion.
  void
  operator<<= (
      ::CORBA::Any &_tao_any,
      Stock_ptr _tao_elem)
  {
    Stock_ptr _tao_objptr =
      Stock::_duplicate (_tao_elem);
    _tao_any <<= &_tao_objptr;
  }

  /// Non-copying insertion.
  void
  operator<<= (
      ::CORBA::Any &_tao_any,
      Stock_ptr *_tao_elem)
  {
    TAO::Any_Impl_T<Stock>::insert (
        _tao_any,
        Stock::_tao_any_destructor,
        _tc_Stock,
        *_tao_elem);
  }

  ::CORBA::Boolean
  operator>>= (
      const ::CORBA::Any &_tao_any,
      Stock_ptr &_tao_elem)
  {
    return
      TAO::Any_Impl_T<Stock>::extract (
          _tao_any,
          Stock::_tao_any_destructor,
          _tc_Stock,
          _tao_elem);
  }
}

#else

TAO_BEGIN_VERSIONED_NAMESPACE_DECL



/// Copying insertion.
void
operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Stock_ptr _tao_elem)
{
  Quoter::Stock_ptr _tao_objptr =
    Quoter::Stock::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

/// Non-copying insertion.
void
operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Stock_ptr *_tao_elem)
{
  TAO::Any_Impl_T<Quoter::Stock>::insert (
      _tao_any,
      Quoter::Stock::_tao_any_destructor,
      Quoter::_tc_Stock,
      *_tao_elem);
}

::CORBA::Boolean
operator>>= (
    const ::CORBA::Any &_tao_any,
    Quoter::Stock_ptr &_tao_elem)
{
  return
    TAO::Any_Impl_T<Quoter::Stock>::extract (
        _tao_any,
        Quoter::Stock::_tao_any_destructor,
        Quoter::_tc_Stock,
        _tao_elem);
}

TAO_END_VERSIONED_NAMESPACE_DECL



#endif

// TAO_IDL - Generated from
// be/be_visitor_structure/any_op_cs.cpp:43



#if defined (ACE_ANY_OPS_USE_NAMESPACE)

namespace Quoter
{
  /// Copying insertion.
  void operator<<= (
      ::CORBA::Any &_tao_any,
      const ::Quoter::Event &_tao_elem)
  {
    if (0 == &_tao_elem) // Trying to de-reference NULL object
      _tao_any <<= static_cast< ::Quoter::Event *>( 0 ); // Use non-copying insertion of a NULL
    else
      TAO::Any_Dual_Impl_T< ::Quoter::Event>::insert_copy (
          _tao_any,
          ::Quoter::Event::_tao_any_destructor,
          ::Quoter::_tc_Event,
          _tao_elem);
  }

  /// Non-copying insertion.
  void operator<<= (
      ::CORBA::Any &_tao_any, ::
      Quoter::Event *_tao_elem)
  {
    TAO::Any_Dual_Impl_T< ::Quoter::Event>::insert (
        _tao_any,
        ::Quoter::Event::_tao_any_destructor,
        ::Quoter::_tc_Event,
        _tao_elem);
  }

  /// Extraction to non-const pointer (deprecated).
  ::CORBA::Boolean operator>>= (
      const ::CORBA::Any &_tao_any,
      ::Quoter::Event *&_tao_elem)
  {
    return _tao_any >>= const_cast<
        const ::Quoter::Event *&> (
        _tao_elem);
  }

  /// Extraction to const pointer.
  ::CORBA::Boolean operator>>= (
      const ::CORBA::Any &_tao_any,
      const ::Quoter::Event *&_tao_elem)
  {
    return
      TAO::Any_Dual_Impl_T< ::Quoter::Event>::extract (
          _tao_any,
          ::Quoter::Event::_tao_any_destructor,
          ::Quoter::_tc_Event,
          _tao_elem
        );
  }
}

#else

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

/// Copying insertion.
void operator<<= (
  ::CORBA::Any &_tao_any,
  const Quoter::Event &_tao_elem)
{
  if (0 == &_tao_elem) // Trying to de-reference NULL object
    _tao_any <<= static_cast<Quoter::Event *>( 0 ); // Use non-copying insertion of a NULL
  else
    TAO::Any_Dual_Impl_T<Quoter::Event>::insert_copy (
      _tao_any,
      Quoter::Event::_tao_any_destructor,
      Quoter::_tc_Event,
      _tao_elem);
}

/// Non-copying insertion.
void operator<<= (
  ::CORBA::Any &_tao_any,
  Quoter::Event *_tao_elem)
{
  TAO::Any_Dual_Impl_T<Quoter::Event>::insert (
    _tao_any,
    Quoter::Event::_tao_any_destructor,
    Quoter::_tc_Event,
    _tao_elem);
}

/// Extraction to non-const pointer (deprecated).
::CORBA::Boolean operator>>= (
  const ::CORBA::Any &_tao_any,
  Quoter::Event *&_tao_elem)
{
  return _tao_any >>= const_cast<
      const Quoter::Event *&> (
      _tao_elem);
}

/// Extraction to const pointer.
::CORBA::Boolean operator>>= (
  const ::CORBA::Any &_tao_any,
  const Quoter::Event *&_tao_elem)
{
  return
    TAO::Any_Dual_Impl_T<Quoter::Event>::extract (
      _tao_any,
      Quoter::Event::_tao_any_destructor,
      Quoter::_tc_Event,
      _tao_elem);
}
TAO_END_VERSIONED_NAMESPACE_DECL



#endif

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:38
TAO_BEGIN_VERSIONED_NAMESPACE_DECL



namespace TAO
{
  template<>
  ::CORBA::Boolean
  Any_Impl_T<Quoter::Modify_Stock>::to_object (
      ::CORBA::Object_ptr &_tao_elem) const
  {
    _tao_elem = ::CORBA::Object::_duplicate (this->value_);
    return true;
  }
}
TAO_END_VERSIONED_NAMESPACE_DECL



#if defined (ACE_ANY_OPS_USE_NAMESPACE)

namespace Quoter
{
  

  /// Copying insertion.
  void
  operator<<= (
      ::CORBA::Any &_tao_any,
      Modify_Stock_ptr _tao_elem)
  {
    Modify_Stock_ptr _tao_objptr =
      Modify_Stock::_duplicate (_tao_elem);
    _tao_any <<= &_tao_objptr;
  }

  /// Non-copying insertion.
  void
  operator<<= (
      ::CORBA::Any &_tao_any,
      Modify_Stock_ptr *_tao_elem)
  {
    TAO::Any_Impl_T<Modify_Stock>::insert (
        _tao_any,
        Modify_Stock::_tao_any_destructor,
        _tc_Modify_Stock,
        *_tao_elem);
  }

  ::CORBA::Boolean
  operator>>= (
      const ::CORBA::Any &_tao_any,
      Modify_Stock_ptr &_tao_elem)
  {
    return
      TAO::Any_Impl_T<Modify_Stock>::extract (
          _tao_any,
          Modify_Stock::_tao_any_destructor,
          _tc_Modify_Stock,
          _tao_elem);
  }
}

#else

TAO_BEGIN_VERSIONED_NAMESPACE_DECL



/// Copying insertion.
void
operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Modify_Stock_ptr _tao_elem)
{
  Quoter::Modify_Stock_ptr _tao_objptr =
    Quoter::Modify_Stock::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

/// Non-copying insertion.
void
operator<<= (
    ::CORBA::Any &_tao_any,
    Quoter::Modify_Stock_ptr *_tao_elem)
{
  TAO::Any_Impl_T<Quoter::Modify_Stock>::insert (
      _tao_any,
      Quoter::Modify_Stock::_tao_any_destructor,
      Quoter::_tc_Modify_Stock,
      *_tao_elem);
}

::CORBA::Boolean
operator>>= (
    const ::CORBA::Any &_tao_any,
    Quoter::Modify_Stock_ptr &_tao_elem)
{
  return
    TAO::Any_Impl_T<Quoter::Modify_Stock>::extract (
        _tao_any,
        Quoter::Modify_Stock::_tao_any_destructor,
        Quoter::_tc_Modify_Stock,
        _tao_elem);
}

TAO_END_VERSIONED_NAMESPACE_DECL



#endif

// TAO_IDL - Generated from
// be/be_visitor_exception/cdr_op_cs.cpp:48
TAO_BEGIN_VERSIONED_NAMESPACE_DECL



::CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const Quoter::Invalid_Stock_Symbol &_tao_aggregate
  )
{
  // Marshal the repository ID.
  return (strm << _tao_aggregate._rep_id ());
}

::CORBA::Boolean operator>> (
    TAO_InputCDR &,
    Quoter::Invalid_Stock_Symbol&
  )
{
  return true;
}

TAO_END_VERSIONED_NAMESPACE_DECL



// TAO_IDL - Generated from
// be/be_visitor_interface/cdr_op_cs.cpp:51

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

::CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const Quoter::Stock_Factory_ptr _tao_objref)
{
  ::CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

::CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Quoter::Stock_Factory_ptr &_tao_objref)
{
  ::CORBA::Object_var obj;

  if (!(strm >> obj.inout ()))
    {
      return false;
    }
  
  typedef ::Quoter::Stock_Factory RHS_SCOPED_NAME;

  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (obj.in ());
    
  return true;
}

TAO_END_VERSIONED_NAMESPACE_DECL



// TAO_IDL - Generated from
// be/be_visitor_interface/cdr_op_cs.cpp:51

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

::CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const Quoter::Stock_ptr _tao_objref)
{
  ::CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

::CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Quoter::Stock_ptr &_tao_objref)
{
  ::CORBA::Object_var obj;

  if (!(strm >> obj.inout ()))
    {
      return false;
    }
  
  typedef ::Quoter::Stock RHS_SCOPED_NAME;

  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (obj.in ());
    
  return true;
}

TAO_END_VERSIONED_NAMESPACE_DECL



// TAO_IDL - Generated from
// be/be_visitor_structure/cdr_op_cs.cpp:49

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

::CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const Quoter::Event &_tao_aggregate)
{
  return
    (strm << _tao_aggregate.price) &&
    (strm << _tao_aggregate.symbol.in ()) &&
    (strm << _tao_aggregate.full_name.in ());
}

::CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Quoter::Event &_tao_aggregate)
{
  return
    (strm >> _tao_aggregate.price) &&
    (strm >> _tao_aggregate.symbol.out ()) &&
    (strm >> _tao_aggregate.full_name.out ());
}

TAO_END_VERSIONED_NAMESPACE_DECL



// TAO_IDL - Generated from
// be/be_visitor_interface/cdr_op_cs.cpp:51

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

::CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const Quoter::Modify_Stock_ptr _tao_objref)
{
  ::CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

::CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Quoter::Modify_Stock_ptr &_tao_objref)
{
  ::CORBA::Object_var obj;

  if (!(strm >> obj.inout ()))
    {
      return false;
    }
  
  typedef ::Quoter::Modify_Stock RHS_SCOPED_NAME;

  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (obj.in ());
    
  return true;
}

TAO_END_VERSIONED_NAMESPACE_DECL



