// -*- C++ -*-
//
// $Id$

// ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
// 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
//       http://doc.ece.uci.edu/
// and
//       Institute for Software Integrated Systems
//       Vanderbilt University
//       Nashville, TN
//       USA
//       http://www.isis.vanderbilt.edu/
//
// Information about TAO is available at:
//     http://www.cs.wustl.edu/~schmidt/TAO.html

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


#include "DsEventLogAdminC.h"
#include "tao/CDR.h"
#include "tao/Exception_Data.h"
#include "tao/Invocation_Adapter.h"
#include "tao/Object_T.h"
#include "tao/Typecode.h"
#include "tao/Any_Impl_T.h"
#include "tao/Basic_Arguments.h"
#include "tao/Fixed_Size_Argument_T.h"
#include "tao/Object_Argument_T.h"
#include "tao/Special_Basic_Arguments.h"
#include "tao/UB_String_Arguments.h"
#include "tao/Var_Size_Argument_T.h"
#include "ace/OS_NS_string.h"

#if defined (__BORLANDC__)
#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
#endif /* __BORLANDC__ */

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

// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:64

// Arg traits specializations.
namespace TAO
{
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:582

#if !defined (_CORBA_ANY__ARG_TRAITS_CS_)
#define _CORBA_ANY__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<CORBA::Any>
    : public
        Var_Size_Arg_Traits_T<
            CORBA::Any,
            CORBA::Any_var,
            CORBA::Any_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSEVENTCOMM_PUSHCONSUMER__ARG_TRAITS_CS_)
#define _COSEVENTCOMM_PUSHCONSUMER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<CosEventComm::PushConsumer>
    : public
        Object_Arg_Traits_T<
            CosEventComm::PushConsumer_ptr,
            CosEventComm::PushConsumer_var,
            CosEventComm::PushConsumer_out,
            TAO::Objref_Traits<CosEventComm::PushConsumer>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSEVENTCOMM_PUSHSUPPLIER__ARG_TRAITS_CS_)
#define _COSEVENTCOMM_PUSHSUPPLIER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<CosEventComm::PushSupplier>
    : public
        Object_Arg_Traits_T<
            CosEventComm::PushSupplier_ptr,
            CosEventComm::PushSupplier_var,
            CosEventComm::PushSupplier_out,
            TAO::Objref_Traits<CosEventComm::PushSupplier>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSEVENTCOMM_PULLCONSUMER__ARG_TRAITS_CS_)
#define _COSEVENTCOMM_PULLCONSUMER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<CosEventComm::PullConsumer>
    : public
        Object_Arg_Traits_T<
            CosEventComm::PullConsumer_ptr,
            CosEventComm::PullConsumer_var,
            CosEventComm::PullConsumer_out,
            TAO::Objref_Traits<CosEventComm::PullConsumer>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSEVENTCOMM_PULLSUPPLIER__ARG_TRAITS_CS_)
#define _COSEVENTCOMM_PULLSUPPLIER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<CosEventComm::PullSupplier>
    : public
        Object_Arg_Traits_T<
            CosEventComm::PullSupplier_ptr,
            CosEventComm::PullSupplier_var,
            CosEventComm::PullSupplier_out,
            TAO::Objref_Traits<CosEventComm::PullSupplier>
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_RECORDIDLIST__ARG_TRAITS_CS_)
#define _DSLOGADMIN_RECORDIDLIST__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::RecordIdList>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::RecordIdList,
            DsLogAdmin::RecordIdList_var,
            DsLogAdmin::RecordIdList_out
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_NVLIST__ARG_TRAITS_CS_)
#define _DSLOGADMIN_NVLIST__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::NVList>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::NVList,
            DsLogAdmin::NVList_var,
            DsLogAdmin::NVList_out
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:618

#if !defined (_DSLOGADMIN_TIMEINTERVAL__ARG_TRAITS_CS_)
#define _DSLOGADMIN_TIMEINTERVAL__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::TimeInterval>
    : public
        Fixed_Size_Arg_Traits_T<
            DsLogAdmin::TimeInterval
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_RECORDLIST__ARG_TRAITS_CS_)
#define _DSLOGADMIN_RECORDLIST__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::RecordList>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::RecordList,
            DsLogAdmin::RecordList_var,
            DsLogAdmin::RecordList_out
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_ANYS__ARG_TRAITS_CS_)
#define _DSLOGADMIN_ANYS__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::Anys>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::Anys,
            DsLogAdmin::Anys_var,
            DsLogAdmin::Anys_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_DSLOGADMIN_ITERATOR__ARG_TRAITS_CS_)
#define _DSLOGADMIN_ITERATOR__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::Iterator>
    : public
        Object_Arg_Traits_T<
            DsLogAdmin::Iterator_ptr,
            DsLogAdmin::Iterator_var,
            DsLogAdmin::Iterator_out,
            TAO::Objref_Traits<DsLogAdmin::Iterator>
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_WEEKMASK__ARG_TRAITS_CS_)
#define _DSLOGADMIN_WEEKMASK__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::WeekMask>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::WeekMask,
            DsLogAdmin::WeekMask_var,
            DsLogAdmin::WeekMask_out
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_CAPACITYALARMTHRESHOLDLIST__ARG_TRAITS_CS_)
#define _DSLOGADMIN_CAPACITYALARMTHRESHOLDLIST__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::CapacityAlarmThresholdList>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::CapacityAlarmThresholdList,
            DsLogAdmin::CapacityAlarmThresholdList_var,
            DsLogAdmin::CapacityAlarmThresholdList_out
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:537

#if !defined (_DSLOGADMIN_ADMINISTRATIVESTATE__ARG_TRAITS_CS_)
#define _DSLOGADMIN_ADMINISTRATIVESTATE__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::AdministrativeState>
    : public
        Basic_Arg_Traits_T<
            DsLogAdmin::AdministrativeState
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:537

#if !defined (_DSLOGADMIN_FORWARDINGSTATE__ARG_TRAITS_CS_)
#define _DSLOGADMIN_FORWARDINGSTATE__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::ForwardingState>
    : public
        Basic_Arg_Traits_T<
            DsLogAdmin::ForwardingState
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_DSLOGADMIN_QOSLIST__ARG_TRAITS_CS_)
#define _DSLOGADMIN_QOSLIST__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsLogAdmin::QoSList>
    : public
        Var_Size_Arg_Traits_T<
            DsLogAdmin::QoSList,
            DsLogAdmin::QoSList_var,
            DsLogAdmin::QoSList_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_DSEVENTLOGADMIN_EVENTLOG__ARG_TRAITS_CS_)
#define _DSEVENTLOGADMIN_EVENTLOG__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_EventLog_Export Arg_Traits<DsEventLogAdmin::EventLog>
    : public
        Object_Arg_Traits_T<
            DsEventLogAdmin::EventLog_ptr,
            DsEventLogAdmin::EventLog_var,
            DsEventLogAdmin::EventLog_out,
            TAO::Objref_Traits<DsEventLogAdmin::EventLog>
          >
  {
  };

#endif /* end #if !defined */
}


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

// Traits specializations for DsEventLogAdmin::EventLog.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
DsEventLogAdmin::EventLog_ptr
TAO::Objref_Traits<DsEventLogAdmin::EventLog>::tao_duplicate (
    DsEventLogAdmin::EventLog_ptr p
  )
{
  return DsEventLogAdmin::EventLog::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<DsEventLogAdmin::EventLog>::tao_release (
    DsEventLogAdmin::EventLog_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
DsEventLogAdmin::EventLog_ptr
TAO::Objref_Traits<DsEventLogAdmin::EventLog>::tao_nil (void)
{
  return DsEventLogAdmin::EventLog::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<DsEventLogAdmin::EventLog>::tao_marshal (
    DsEventLogAdmin::EventLog_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker * 
(*DsEventLogAdmin__TAO_EventLog_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

DsEventLogAdmin::EventLog::EventLog (void)
 : the_TAO_EventLog_Proxy_Broker_ (0)
{
  this->DsEventLogAdmin_EventLog_setup_collocation ();
}

void
DsEventLogAdmin::EventLog::DsEventLogAdmin_EventLog_setup_collocation ()
{
  if (::DsEventLogAdmin__TAO_EventLog_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_EventLog_Proxy_Broker_ =
        ::DsEventLogAdmin__TAO_EventLog_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->DsLogAdmin_Log_setup_collocation ();
  this->CosEventChannelAdmin_EventChannel_setup_collocation ();
}

DsEventLogAdmin::EventLog::~EventLog (void)
{}

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

DsEventLogAdmin::EventLog_ptr
DsEventLogAdmin::EventLog::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<EventLog>::narrow (
        _tao_objref,
        "IDL:omg.org/DsEventLogAdmin/EventLog:1.0",
        DsEventLogAdmin__TAO_EventLog_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

DsEventLogAdmin::EventLog_ptr
DsEventLogAdmin::EventLog::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<EventLog>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/DsEventLogAdmin/EventLog:1.0",
        DsEventLogAdmin__TAO_EventLog_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

DsEventLogAdmin::EventLog_ptr
DsEventLogAdmin::EventLog::_duplicate (EventLog_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
DsEventLogAdmin::EventLog::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/DsLogAdmin/Log:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/DsEventLogAdmin/EventLog:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
          value
          ACE_ENV_ARG_PARAMETER
        );
    }
}

const char* DsEventLogAdmin::EventLog::_interface_repository_id (void) const
{
  return "IDL:omg.org/DsEventLogAdmin/EventLog:1.0";
}

CORBA::Boolean
DsEventLogAdmin::EventLog::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:290

static const CORBA::Long _oc_DsEventLogAdmin_EventLog[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  41,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x44734576), 
  ACE_NTOHL (0x656e744c), 
  ACE_NTOHL (0x6f674164), 
  ACE_NTOHL (0x6d696e2f), 
  ACE_NTOHL (0x4576656e), 
  ACE_NTOHL (0x744c6f67), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/DsEventLogAdmin/EventLog:1.0
    9,
  ACE_NTOHL (0x4576656e), 
  ACE_NTOHL (0x744c6f67), 
  ACE_NTOHL (0x0),  // name = EventLog
  };

static CORBA::TypeCode _tc_TAO_tc_DsEventLogAdmin_EventLog (
    CORBA::tk_objref,
    sizeof (_oc_DsEventLogAdmin_EventLog),
    (char *) &_oc_DsEventLogAdmin_EventLog,
    0,
    sizeof (DsEventLogAdmin::EventLog)
  );

namespace DsEventLogAdmin
{
  ::CORBA::TypeCode_ptr _tc_EventLog =
    &_tc_TAO_tc_DsEventLogAdmin_EventLog;
}

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

// Traits specializations for DsEventLogAdmin::EventLogFactory.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
DsEventLogAdmin::EventLogFactory_ptr
TAO::Objref_Traits<DsEventLogAdmin::EventLogFactory>::tao_duplicate (
    DsEventLogAdmin::EventLogFactory_ptr p
  )
{
  return DsEventLogAdmin::EventLogFactory::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<DsEventLogAdmin::EventLogFactory>::tao_release (
    DsEventLogAdmin::EventLogFactory_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
DsEventLogAdmin::EventLogFactory_ptr
TAO::Objref_Traits<DsEventLogAdmin::EventLogFactory>::tao_nil (void)
{
  return DsEventLogAdmin::EventLogFactory::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<DsEventLogAdmin::EventLogFactory>::tao_marshal (
    DsEventLogAdmin::EventLogFactory_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker * 
(*DsEventLogAdmin__TAO_EventLogFactory_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

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

::DsEventLogAdmin::EventLog_ptr DsEventLogAdmin::EventLogFactory::create (
    ::DsLogAdmin::LogFullActionType full_action,
    ::CORBA::ULongLong max_size,
    const ::DsLogAdmin::CapacityAlarmThresholdList & thresholds,
    ::DsLogAdmin::LogId_out id
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::DsLogAdmin::InvalidLogFullAction,
    ::DsLogAdmin::InvalidThreshold
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_EventLogFactory_Proxy_Broker_ == 0)
    {
      DsEventLogAdmin_EventLogFactory_setup_collocation ();
    }
  
  TAO::Arg_Traits< ::DsEventLogAdmin::EventLog>::ret_val _tao_retval;
  TAO::Arg_Traits< DsLogAdmin::LogFullActionType>::in_arg_val _tao_full_action (full_action);
  TAO::Arg_Traits< CORBA::ULongLong>::in_arg_val _tao_max_size (max_size);
  TAO::Arg_Traits< ::DsLogAdmin::CapacityAlarmThresholdList>::in_arg_val _tao_thresholds (thresholds);
  TAO::Arg_Traits< DsLogAdmin::LogId>::out_arg_val _tao_id (id);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_full_action,
      &_tao_max_size,
      &_tao_thresholds,
      &_tao_id
    };
  
  static TAO::Exception_Data
  _tao_DsEventLogAdmin_EventLogFactory_create_exceptiondata [] = 
    {
      {
        "IDL:omg.org/DsLogAdmin/InvalidLogFullAction:1.0",
        DsLogAdmin::InvalidLogFullAction::_alloc,
        DsLogAdmin::_tc_InvalidLogFullAction
      },
      
      {
        "IDL:omg.org/DsLogAdmin/InvalidThreshold:1.0",
        DsLogAdmin::InvalidThreshold::_alloc,
        DsLogAdmin::_tc_InvalidThreshold
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      5,
      "create",
      6,
      this->the_TAO_EventLogFactory_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_DsEventLogAdmin_EventLogFactory_create_exceptiondata,
      2
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

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

::DsEventLogAdmin::EventLog_ptr DsEventLogAdmin::EventLogFactory::create_with_id (
    ::DsLogAdmin::LogId id,
    ::DsLogAdmin::LogFullActionType full_action,
    ::CORBA::ULongLong max_size,
    const ::DsLogAdmin::CapacityAlarmThresholdList & thresholds
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::DsLogAdmin::LogIdAlreadyExists,
    ::DsLogAdmin::InvalidLogFullAction,
    ::DsLogAdmin::InvalidThreshold
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_EventLogFactory_Proxy_Broker_ == 0)
    {
      DsEventLogAdmin_EventLogFactory_setup_collocation ();
    }
  
  TAO::Arg_Traits< ::DsEventLogAdmin::EventLog>::ret_val _tao_retval;
  TAO::Arg_Traits< DsLogAdmin::LogId>::in_arg_val _tao_id (id);
  TAO::Arg_Traits< DsLogAdmin::LogFullActionType>::in_arg_val _tao_full_action (full_action);
  TAO::Arg_Traits< CORBA::ULongLong>::in_arg_val _tao_max_size (max_size);
  TAO::Arg_Traits< ::DsLogAdmin::CapacityAlarmThresholdList>::in_arg_val _tao_thresholds (thresholds);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_id,
      &_tao_full_action,
      &_tao_max_size,
      &_tao_thresholds
    };
  
  static TAO::Exception_Data
  _tao_DsEventLogAdmin_EventLogFactory_create_with_id_exceptiondata [] = 
    {
      {
        "IDL:omg.org/DsLogAdmin/LogIdAlreadyExists:1.0",
        DsLogAdmin::LogIdAlreadyExists::_alloc,
        DsLogAdmin::_tc_LogIdAlreadyExists
      },
      
      {
        "IDL:omg.org/DsLogAdmin/InvalidLogFullAction:1.0",
        DsLogAdmin::InvalidLogFullAction::_alloc,
        DsLogAdmin::_tc_InvalidLogFullAction
      },
      
      {
        "IDL:omg.org/DsLogAdmin/InvalidThreshold:1.0",
        DsLogAdmin::InvalidThreshold::_alloc,
        DsLogAdmin::_tc_InvalidThreshold
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      5,
      "create_with_id",
      14,
      this->the_TAO_EventLogFactory_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_DsEventLogAdmin_EventLogFactory_create_with_id_exceptiondata,
      3
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

DsEventLogAdmin::EventLogFactory::EventLogFactory (void)
 : the_TAO_EventLogFactory_Proxy_Broker_ (0)
{
  this->DsEventLogAdmin_EventLogFactory_setup_collocation ();
}

void
DsEventLogAdmin::EventLogFactory::DsEventLogAdmin_EventLogFactory_setup_collocation ()
{
  if (::DsEventLogAdmin__TAO_EventLogFactory_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_EventLogFactory_Proxy_Broker_ =
        ::DsEventLogAdmin__TAO_EventLogFactory_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->DsLogAdmin_LogMgr_setup_collocation ();
  this->CosEventChannelAdmin_ConsumerAdmin_setup_collocation ();
}

DsEventLogAdmin::EventLogFactory::~EventLogFactory (void)
{}

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

DsEventLogAdmin::EventLogFactory_ptr
DsEventLogAdmin::EventLogFactory::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<EventLogFactory>::narrow (
        _tao_objref,
        "IDL:omg.org/DsEventLogAdmin/EventLogFactory:1.0",
        DsEventLogAdmin__TAO_EventLogFactory_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

DsEventLogAdmin::EventLogFactory_ptr
DsEventLogAdmin::EventLogFactory::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<EventLogFactory>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/DsEventLogAdmin/EventLogFactory:1.0",
        DsEventLogAdmin__TAO_EventLogFactory_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

DsEventLogAdmin::EventLogFactory_ptr
DsEventLogAdmin::EventLogFactory::_duplicate (EventLogFactory_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
DsEventLogAdmin::EventLogFactory::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/DsLogAdmin/LogMgr:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/DsEventLogAdmin/EventLogFactory:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
          value
          ACE_ENV_ARG_PARAMETER
        );
    }
}

const char* DsEventLogAdmin::EventLogFactory::_interface_repository_id (void) const
{
  return "IDL:omg.org/DsEventLogAdmin/EventLogFactory:1.0";
}

CORBA::Boolean
DsEventLogAdmin::EventLogFactory::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:290

static const CORBA::Long _oc_DsEventLogAdmin_EventLogFactory[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  48,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x44734576), 
  ACE_NTOHL (0x656e744c), 
  ACE_NTOHL (0x6f674164), 
  ACE_NTOHL (0x6d696e2f), 
  ACE_NTOHL (0x4576656e), 
  ACE_NTOHL (0x744c6f67), 
  ACE_NTOHL (0x46616374), 
  ACE_NTOHL (0x6f72793a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/DsEventLogAdmin/EventLogFactory:1.0
    16,
  ACE_NTOHL (0x4576656e), 
  ACE_NTOHL (0x744c6f67), 
  ACE_NTOHL (0x46616374), 
  ACE_NTOHL (0x6f727900),  // name = EventLogFactory
  };

static CORBA::TypeCode _tc_TAO_tc_DsEventLogAdmin_EventLogFactory (
    CORBA::tk_objref,
    sizeof (_oc_DsEventLogAdmin_EventLogFactory),
    (char *) &_oc_DsEventLogAdmin_EventLogFactory,
    0,
    sizeof (DsEventLogAdmin::EventLogFactory)
  );

namespace DsEventLogAdmin
{
  ::CORBA::TypeCode_ptr _tc_EventLogFactory =
    &_tc_TAO_tc_DsEventLogAdmin_EventLogFactory;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:50

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<DsEventLogAdmin::EventLog>::to_object (
    CORBA::Object_ptr &_tao_elem
  ) const
{
  _tao_elem = CORBA::Object::_duplicate (this->value_);
  return 1;
}

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

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    DsEventLogAdmin::EventLog_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<DsEventLogAdmin::EventLog>::extract (
        _tao_any,
        DsEventLogAdmin::EventLog::_tao_any_destructor,
        DsEventLogAdmin::_tc_EventLog,
        _tao_elem
      );
}

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:50

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<DsEventLogAdmin::EventLogFactory>::to_object (
    CORBA::Object_ptr &_tao_elem
  ) const
{
  _tao_elem = CORBA::Object::_duplicate (this->value_);
  return 1;
}

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

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    DsEventLogAdmin::EventLogFactory_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<DsEventLogAdmin::EventLogFactory>::extract (
        _tao_any,
        DsEventLogAdmin::EventLogFactory::_tao_any_destructor,
        DsEventLogAdmin::_tc_EventLogFactory,
        _tao_elem
      );
}

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

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

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    DsEventLogAdmin::EventLog_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::DsEventLogAdmin::EventLog RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        DsEventLogAdmin__TAO_EventLog_Proxy_Broker_Factory_function_pointer
      );
    
  return 1;
}

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

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

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    DsEventLogAdmin::EventLogFactory_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::DsEventLogAdmin::EventLogFactory RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        DsEventLogAdmin__TAO_EventLogFactory_Proxy_Broker_Factory_function_pointer
      );
    
  return 1;
}

