Click here to Skip to main content
15,892,480 members
Articles / Programming Languages / C#

Mixing ACE/TAO and .NET Clients and Servers

Rate me:
Please Sign up or sign in to vote.
4.65/5 (28 votes)
13 Dec 2005CPOL18 min read 84K   1.9K   45  
Demonstrates mixing C++ ACE/TAO clients and servers with C# IIOP.NET clients and servers on Windows and Linux.
// -*- 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:391

#ifndef _TAO_IDL_EXAMPLEINTERFACESS_H_
#define _TAO_IDL_EXAMPLEINTERFACESS_H_

#include /**/ "ace\pre.h"

#include "ExampleInterfacesC.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/Collocation_Proxy_Broker.h"
#include "tao/PortableServer/PortableServer.h"
#include "tao/PortableServer/Servant_Base.h"

#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#endif /* _MSC_VER */

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

// TAO_IDL - Generated from
// c:\local\ace\tao\tao_idl\be\be_visitor_module/module_sh.cpp:49

namespace POA_ExampleInterfaces
{
  
  
  // TAO_IDL - Generated from
  // c:\local\ace\tao\tao_idl\be\be_visitor_interface/interface_sh.cpp:87
  
  class IAdder;
  typedef IAdder *IAdder_ptr;
  
  
  class  IAdder
    : public virtual PortableServer::ServantBase
  {
  protected:
    IAdder (void);
  
  public:
    // Useful for template programming.
    typedef ::ExampleInterfaces::IAdder _stub_type;
    typedef ::ExampleInterfaces::IAdder_ptr _stub_ptr_type;
    typedef ::ExampleInterfaces::IAdder_var _stub_var_type;
    
    IAdder (const IAdder& rhs);
    virtual ~IAdder (void);
    
    virtual CORBA::Boolean _is_a (
        const char* logical_type_id
        ACE_ENV_ARG_DECL_WITH_DEFAULTS
      );
    
    static void _is_a_skel (
        TAO_ServerRequest & req,
        void * servant_upcall,
        void * servant
        ACE_ENV_ARG_DECL
      );
    
    static void _non_existent_skel (
        TAO_ServerRequest & req,
        void * servant_upcall,
        void * servant
        ACE_ENV_ARG_DECL
      );
    
    static void _interface_skel (
        TAO_ServerRequest & req,
        void * servant_upcall,
        void * servant
        ACE_ENV_ARG_DECL
      );
    
    static void _component_skel (
        TAO_ServerRequest & req,
        void * servant_upcall,
        void * servant
        ACE_ENV_ARG_DECL
      );
    
    static void _repository_id_skel (
        TAO_ServerRequest & req,
        void * servant_upcall,
        void * servant
        ACE_ENV_ARG_DECL
      );
    
    virtual void _dispatch (
        TAO_ServerRequest & req,
        void * servant_upcall
        ACE_ENV_ARG_DECL
      );
    
    ::ExampleInterfaces::IAdder *_this (
        ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
      );
    
    virtual const char* _interface_repository_id (void) const;
    
    // TAO_IDL - Generated from
    // c:\local\ace\tao\tao_idl\be\be_visitor_operation/operation_sh.cpp:45
    
    virtual CORBA::Double add (
        ::CORBA::Double arg1,
        ::CORBA::Double arg2
        ACE_ENV_ARG_DECL_WITH_DEFAULTS
      )
      ACE_THROW_SPEC ((
        CORBA::SystemException
      )) = 0;
    
    static void add_skel (
        TAO_ServerRequest & server_request,
        void * servant_upcall,
        void * servant
        ACE_ENV_ARG_DECL
      );
  };

// TAO_IDL - Generated from
// c:\local\ace\tao\tao_idl\be\be_visitor_module/module_sh.cpp:80

} // module ExampleInterfaces

// TAO_IDL - Generated from 
// .\be\be_codegen.cpp:995

#include "ExampleInterfacesS_T.h"

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

#if defined(_MSC_VER)
#pragma warning(pop)
#endif /* _MSC_VER */

#if defined (__BORLANDC__)
#pragma option pop
#endif /* __BORLANDC__ */

#include /**/ "ace\post.h"
#endif /* ifndef */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer Defence R&D Canada
Canada Canada
Stephen Bogner is a Senior Research Engineer with Defence R&D Canada. As the Head Autonomous Applications Group, Autonomous Intelligent Systems Section, he only programs when it can't be avoided, and then only in C#.

Comments and Discussions