Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
641 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  de java vers c++

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

de java vers c++

n°1319931
crazy_ride​r
Posté le 07-03-2006 à 09:53:11  profilanswer
 

J'ai fait une application client serveur en utilisant ICE. Je l'ai ecrite en Java.
Jusque la pas de problemes.
 
Maintenant, il faut que je fasse la meme chose en C++. Le probleme est que je n'ai pas tres bonnes connaissances dans ce langage.
J'ai ecrit le serveur, mais il y a des erreurs de compilation. Je n'arrive pas a les corriger. J'utilise VC++6.
 
Je met les sources en java , puis celles en c++
 
Pour le java, tout va bien.  
 
Pouvez me dire ce qui ne va pas dans mon prog en c++
 
Java
 

Code :
  1. //Hello.ice
  2. module Demo {
  3. sequence<double> array; //new type : array is an array of double
  4. class Transmit {
  5.  int a;
  6.  array arr ;//array of double
  7. };
  8. interface Hello {
  9.  nonmutating void sayHello(string s);
  10.  Transmit setClass(int a, double d1, double d2, double d3);
  11.  void sendClass(Transmit trans);
  12. };
  13. };


 

Code :
  1. import Demo.*;
  2. import java.io.*;
  3. class HelloI extends Demo._HelloDisp {
  4. public void sayHello(String s, Ice.Current current) {
  5.  System.out.println(s);
  6. }
  7. public Transmit setClass(int a, double d1, double d2, double d3, Ice.Current current) {
  8.  double arr[] = new double[3];
  9.  arr[0] = d1;
  10.  arr[1] = d2;
  11.  arr[2] = d3;
  12.  Transmit trans = new Transmit(a, arr);
  13.  return trans;
  14. }
  15. public void sendClass(Transmit trans,Ice.Current current) {
  16.  double arr[] = {0, 0, 0};
  17.  Transmit trans_serv = new Transmit(0, arr);
  18.  trans_serv.a = trans.a;
  19.  for (int i = 0; i < trans.arr.length; i++) trans_serv.arr[i] = trans.arr[i];
  20. }
  21. }
  22. public class Server  {
  23. public static void main (String []args) {
  24.  int status = 0;
  25.  Ice.Communicator ic = null;
  26.  try {
  27.        ic = Ice.Util.initialize(args);
  28.    Ice.ObjectAdapter adapter = ic.createObjectAdapterWithEndpoints("SimpleHelloAdapter", "default -p 11111" );
  29.   Ice.Object object = new HelloI();
  30.   adapter.add(object, Ice.Util.stringToIdentity("SimpleHello" ));
  31.   adapter.activate();
  32.   ic.waitForShutdown();
  33.  } catch (Ice.LocalException e) {
  34.      e.printStackTrace();
  35.      status = 1;
  36.  } catch (Exception e) {
  37.      System.err.println(e.getMessage());
  38.      status = 1;
  39.  }
  40.  if(ic != null) {
  41.     try {
  42.     ic.destroy();
  43.     } catch (Exception e) {
  44.   System.out.println(e.getMessage());
  45.   status = 1;
  46.     }
  47.  }
  48. System.exit(status);
  49. //main
  50. } // Server


 
 
C++
 

Code :
  1. // **********************************************************************
  2. //
  3. // Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
  4. //
  5. // This copy of Ice is licensed to you under the terms described in the
  6. // ICE_LICENSE file included in this distribution.
  7. //
  8. // **********************************************************************
  9. #ifndef HELLO_I_H
  10. #define HELLO_I_H
  11. #include <Hello.h>
  12. using namespace Demo;
  13. using namespace std;
  14. class HelloI : public Demo::Hello
  15. {
  16. public:
  17.     void sayHello(const string& s, const Ice::Current& );
  18. Transmit setClass(const int a, double d1, double d2, double d3, const Ice::Current& );
  19. void sendClass(Transmit trans, const Ice::Current& );
  20. };
  21. #endif


 

Code :
  1. // **********************************************************************
  2. //
  3. // Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
  4. //
  5. // This copy of Ice is licensed to you under the terms described in the
  6. // ICE_LICENSE file included in this distribution.
  7. //
  8. // **********************************************************************
  9. #include <HelloI.h>
  10. #include <Ice/Ice.h>
  11. using namespace std;
  12. void
  13. HelloI::sayHello(const string& s, const Ice::Current& )
  14. {
  15.     cout << s << endl;
  16. }
  17. Transmit
  18. HelloI::setClass(const int a, double d1, double d2, double d3, const Ice::Current & )
  19. {
  20. Transmit trans ;
  21. trans.a = a;
  22. trans.arr[0] = d1;
  23. trans.arr[1] = d2;
  24. trans.arr[2] = d3;
  25. cout << "dans setClass" << endl;
  26. //Transmit trans = new trans (a, arr);
  27. cout << trans.a << endl;
  28. return (trans);
  29. }
  30. void
  31. HelloI::sendClass(Transmit trans, const Ice::Current& )
  32. {
  33. Transmit new_trans ;
  34. new_trans.a = trans.a;
  35. for (int i = 0; i < 3; i++) new_trans.arr[i] = trans.arr[i];
  36. }


 

Code :
  1. // **********************************************************************
  2. //
  3. // Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
  4. //
  5. // This copy of Ice is licensed to you under the terms described in the
  6. // ICE_LICENSE file included in this distribution.
  7. //
  8. // **********************************************************************
  9. #include <HelloI.h>
  10. #include <Ice/Ice.h>
  11. using namespace std;
  12. using namespace Demo;
  13. int
  14. main(int argc, char* argv[])
  15. {
  16.     int status = EXIT_SUCCESS;
  17.     Ice::CommunicatorPtr communicator;
  18.     try
  19.     {
  20. communicator = Ice::initialize(argc, argv);
  21. Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("SimpleHelloAdapter", "tcp -p 10000" );
  22. Ice::ObjectPtr object = new HelloI;
  23. adapter->add(object, Ice::stringToIdentity("SimpleHello" ));
  24. adapter->activate();
  25. communicator->waitForShutdown();
  26.     }
  27.     catch(const Ice::Exception& ex)
  28.     {
  29. cerr << ex << endl;
  30. status = EXIT_FAILURE;
  31.     }
  32.     if(communicator)
  33.     {
  34. try
  35. {
  36.     communicator->destroy();
  37. }
  38. catch(const Ice::Exception& ex)
  39. {
  40.     cerr << ex << endl;
  41.     status = EXIT_FAILURE;
  42. }
  43.     }
  44.     return status;
  45. }


 
 
les fichiers hello.h et hello.cpp sont generes automatiquement

Code :
  1. // **********************************************************************
  2. //
  3. // Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
  4. //
  5. // This copy of Ice is licensed to you under the terms described in the
  6. // ICE_LICENSE file included in this distribution.
  7. //
  8. // **********************************************************************
  9. // Ice version 3.0.1
  10. // Generated from file `Hello.ice'
  11. #ifndef __Hello_h__
  12. #define __Hello_h__
  13. #include <Ice/LocalObjectF.h>
  14. #include <Ice/ProxyF.h>
  15. #include <Ice/ObjectF.h>
  16. #include <Ice/Exception.h>
  17. #include <Ice/LocalObject.h>
  18. #include <Ice/Proxy.h>
  19. #include <Ice/Object.h>
  20. #include <Ice/Outgoing.h>
  21. #include <Ice/Incoming.h>
  22. #include <Ice/Direct.h>
  23. #include <Ice/FactoryTable.h>
  24. #include <Ice/StreamF.h>
  25. #include <Ice/UndefSysMacros.h>
  26. #ifndef ICE_IGNORE_VERSION
  27. #   if ICE_INT_VERSION / 100 != 300
  28. #       error Ice version mismatch!
  29. #   endif
  30. #   if ICE_INT_VERSION % 100 < 1
  31. #       error Ice patch level mismatch!
  32. #   endif
  33. #endif
  34. namespace IceProxy
  35. {
  36. namespace Demo
  37. {
  38. class Transmit;
  39. bool operator==(const Transmit&, const Transmit& );
  40. bool operator!=(const Transmit&, const Transmit& );
  41. bool operator<(const Transmit&, const Transmit& );
  42. class Hello;
  43. bool operator==(const Hello&, const Hello& );
  44. bool operator!=(const Hello&, const Hello& );
  45. bool operator<(const Hello&, const Hello& );
  46. }
  47. }
  48. namespace Demo
  49. {
  50. class Transmit;
  51. bool operator==(const Transmit&, const Transmit& );
  52. bool operator!=(const Transmit&, const Transmit& );
  53. bool operator<(const Transmit&, const Transmit& );
  54. class Hello;
  55. bool operator==(const Hello&, const Hello& );
  56. bool operator!=(const Hello&, const Hello& );
  57. bool operator<(const Hello&, const Hello& );
  58. }
  59. namespace IceInternal
  60. {
  61. void incRef(::Demo::Transmit*);
  62. void decRef(::Demo::Transmit*);
  63. void incRef(::IceProxy::Demo::Transmit*);
  64. void decRef(::IceProxy::Demo::Transmit*);
  65. void incRef(::Demo::Hello*);
  66. void decRef(::Demo::Hello*);
  67. void incRef(::IceProxy::Demo::Hello*);
  68. void decRef(::IceProxy::Demo::Hello*);
  69. }
  70. namespace Demo
  71. {
  72. typedef ::IceInternal::Handle< ::Demo::Transmit> TransmitPtr;
  73. typedef ::IceInternal::ProxyHandle< ::IceProxy::Demo::Transmit> TransmitPrx;
  74. void __write(::IceInternal::BasicStream*, const TransmitPrx& );
  75. void __read(::IceInternal::BasicStream*, TransmitPrx& );
  76. void __write(::IceInternal::BasicStream*, const TransmitPtr& );
  77. void __patch__TransmitPtr(void*, ::Ice::ObjectPtr& );
  78. typedef ::IceInternal::Handle< ::Demo::Hello> HelloPtr;
  79. typedef ::IceInternal::ProxyHandle< ::IceProxy::Demo::Hello> HelloPrx;
  80. void __write(::IceInternal::BasicStream*, const HelloPrx& );
  81. void __read(::IceInternal::BasicStream*, HelloPrx& );
  82. void __write(::IceInternal::BasicStream*, const HelloPtr& );
  83. void __patch__HelloPtr(void*, ::Ice::ObjectPtr& );
  84. }
  85. namespace Demo
  86. {
  87. typedef ::std::vector< ::Ice::Double> array;
  88. }
  89. namespace IceProxy
  90. {
  91. namespace Demo
  92. {
  93. class Transmit : virtual public ::IceProxy::Ice::Object
  94. {
  95. public:
  96.    
  97.     static const ::std::string& ice_staticId();
  98. private:
  99.     virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
  100.     virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
  101. };
  102. class Hello : virtual public ::IceProxy::Ice::Object
  103. {
  104. public:
  105.     void sayHello(const ::std::string& );
  106.     void sayHello(const ::std::string&, const ::Ice::Context& );
  107.     ::Demo::TransmitPtr setClass(::Ice::Int, ::Ice::Double, ::Ice::Double, ::Ice::Double);
  108.     ::Demo::TransmitPtr setClass(::Ice::Int, ::Ice::Double, ::Ice::Double, ::Ice::Double, const ::Ice::Context& );
  109.     void sendClass(const ::Demo::TransmitPtr& );
  110.     void sendClass(const ::Demo::TransmitPtr&, const ::Ice::Context& );
  111.    
  112.     static const ::std::string& ice_staticId();
  113. private:
  114.     virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
  115.     virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
  116. };
  117. }
  118. }
  119. namespace IceDelegate
  120. {
  121. namespace Demo
  122. {
  123. class Transmit : virtual public ::IceDelegate::Ice::Object
  124. {
  125. public:
  126. };
  127. class Hello : virtual public ::IceDelegate::Ice::Object
  128. {
  129. public:
  130.     virtual void sayHello(const ::std::string&, const ::Ice::Context& ) = 0;
  131.     virtual ::Demo::TransmitPtr setClass(::Ice::Int, ::Ice::Double, ::Ice::Double, ::Ice::Double, const ::Ice::Context& ) = 0;
  132.     virtual void sendClass(const ::Demo::TransmitPtr&, const ::Ice::Context& ) = 0;
  133. };
  134. }
  135. }
  136. namespace IceDelegateM
  137. {
  138. namespace Demo
  139. {
  140. class Transmit : virtual public ::IceDelegate::Demo::Transmit,
  141.   virtual public ::IceDelegateM::Ice::Object
  142. {
  143. public:
  144. };
  145. class Hello : virtual public ::IceDelegate::Demo::Hello,
  146.       virtual public ::IceDelegateM::Ice::Object
  147. {
  148. public:
  149.     virtual void sayHello(const ::std::string&, const ::Ice::Context& );
  150.     virtual ::Demo::TransmitPtr setClass(::Ice::Int, ::Ice::Double, ::Ice::Double, ::Ice::Double, const ::Ice::Context& );
  151.     virtual void sendClass(const ::Demo::TransmitPtr&, const ::Ice::Context& );
  152. };
  153. }
  154. }
  155. namespace IceDelegateD
  156. {
  157. namespace Demo
  158. {
  159. class Transmit : virtual public ::IceDelegate::Demo::Transmit,
  160.   virtual public ::IceDelegateD::Ice::Object
  161. {
  162. public:
  163. };
  164. class Hello : virtual public ::IceDelegate::Demo::Hello,
  165.       virtual public ::IceDelegateD::Ice::Object
  166. {
  167. public:
  168.     virtual void sayHello(const ::std::string&, const ::Ice::Context& );
  169.     virtual ::Demo::TransmitPtr setClass(::Ice::Int, ::Ice::Double, ::Ice::Double, ::Ice::Double, const ::Ice::Context& );
  170.     virtual void sendClass(const ::Demo::TransmitPtr&, const ::Ice::Context& );
  171. };
  172. }
  173. }
  174. namespace Demo
  175. {
  176. class Transmit : virtual public ::Ice::Object
  177. {
  178. public:
  179.     Transmit() {};
  180.     Transmit(::Ice::Int, const ::Demo::array& );
  181.     virtual ::Ice::ObjectPtr ice_clone() const;
  182.     virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
  183.     virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
  184.     virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
  185.     static const ::std::string& ice_staticId();
  186.     ::Ice::Int a;
  187.     ::Demo::array arr;
  188.     virtual void __write(::IceInternal::BasicStream*) const;
  189.     virtual void __read(::IceInternal::BasicStream*, bool);
  190.     virtual void __write(const ::Ice::OutputStreamPtr& ) const;
  191.     virtual void __read(const ::Ice::InputStreamPtr&, bool);
  192.     static const ::Ice::ObjectFactoryPtr& ice_factory();
  193. };
  194. static ::Demo::Transmit __Transmit_init;
  195. void __patch__TransmitPtr(void*, ::Ice::ObjectPtr& );
  196. class Hello : virtual public ::Ice::Object
  197. {
  198. public:
  199.     virtual ::Ice::ObjectPtr ice_clone() const;
  200.     virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
  201.     virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
  202.     virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
  203.     static const ::std::string& ice_staticId();
  204.     virtual void sayHello(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const = 0;
  205.     ::IceInternal::DispatchStatus ___sayHello(::IceInternal::Incoming&, const ::Ice::Current& ) const;
  206.     virtual ::Demo::TransmitPtr setClass(::Ice::Int, ::Ice::Double, ::Ice::Double, ::Ice::Double, const ::Ice::Current& = ::Ice::Current()) = 0;
  207.     ::IceInternal::DispatchStatus ___setClass(::IceInternal::Incoming&, const ::Ice::Current& );
  208.     virtual void sendClass(const ::Demo::TransmitPtr&, const ::Ice::Current& = ::Ice::Current()) = 0;
  209.     ::IceInternal::DispatchStatus ___sendClass(::IceInternal::Incoming&, const ::Ice::Current& );
  210.     virtual ::IceInternal::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current& );
  211.     virtual void __write(::IceInternal::BasicStream*) const;
  212.     virtual void __read(::IceInternal::BasicStream*, bool);
  213.     virtual void __write(const ::Ice::OutputStreamPtr& ) const;
  214.     virtual void __read(const ::Ice::InputStreamPtr&, bool);
  215. };
  216. void __patch__HelloPtr(void*, ::Ice::ObjectPtr& );
  217. }
  218. #endif


 

Code :
  1. // **********************************************************************
  2. //
  3. // Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
  4. //
  5. // This copy of Ice is licensed to you under the terms described in the
  6. // ICE_LICENSE file included in this distribution.
  7. //
  8. // **********************************************************************
  9. // Ice version 3.0.1
  10. // Generated from file `Hello.ice'
  11. #include <Hello.h>
  12. #include <Ice/LocalException.h>
  13. #include <Ice/ObjectFactory.h>
  14. #include <Ice/BasicStream.h>
  15. #include <Ice/Object.h>
  16. #ifndef ICE_IGNORE_VERSION
  17. #   if ICE_INT_VERSION / 100 != 300
  18. #       error Ice version mismatch!
  19. #   endif
  20. #   if ICE_INT_VERSION % 100 < 1
  21. #       error Ice patch level mismatch!
  22. #   endif
  23. #endif
  24. void
  25. IceInternal::incRef(::Demo::Transmit* p)
  26. {
  27.     p->__incRef();
  28. }
  29. void
  30. IceInternal::decRef(::Demo::Transmit* p)
  31. {
  32.     p->__decRef();
  33. }
  34. void
  35. IceInternal::incRef(::IceProxy::Demo::Transmit* p)
  36. {
  37.     p->__incRef();
  38. }
  39. void
  40. IceInternal::decRef(::IceProxy::Demo::Transmit* p)
  41. {
  42.     p->__decRef();
  43. }
  44. void
  45. IceInternal::incRef(::Demo::Hello* p)
  46. {
  47.     p->__incRef();
  48. }
  49. void
  50. IceInternal::decRef(::Demo::Hello* p)
  51. {
  52.     p->__decRef();
  53. }
  54. void
  55. IceInternal::incRef(::IceProxy::Demo::Hello* p)
  56. {
  57.     p->__incRef();
  58. }
  59. void
  60. IceInternal::decRef(::IceProxy::Demo::Hello* p)
  61. {
  62.     p->__decRef();
  63. }
  64. void
  65. Demo::__write(::IceInternal::BasicStream* __os, const ::Demo::TransmitPrx& v)
  66. {
  67.     __os->write(::Ice::ObjectPrx(v));
  68. }
  69. void
  70. Demo::__read(::IceInternal::BasicStream* __is, ::Demo::TransmitPrx& v)
  71. {
  72.     ::Ice::ObjectPrx proxy;
  73.     __is->read(proxy);
  74.     if(!proxy)
  75.     {
  76. v = 0;
  77.     }
  78.     else
  79.     {
  80. v = new ::IceProxy::Demo::Transmit;
  81. v->__copyFrom(proxy);
  82.     }
  83. }
  84. void
  85. Demo::__write(::IceInternal::BasicStream* __os, const ::Demo::TransmitPtr& v)
  86. {
  87.     __os->write(::Ice::ObjectPtr(v));
  88. }
  89. void
  90. Demo::__write(::IceInternal::BasicStream* __os, const ::Demo::HelloPrx& v)
  91. {
  92.     __os->write(::Ice::ObjectPrx(v));
  93. }
  94. void
  95. Demo::__read(::IceInternal::BasicStream* __is, ::Demo::HelloPrx& v)
  96. {
  97.     ::Ice::ObjectPrx proxy;
  98.     __is->read(proxy);
  99.     if(!proxy)
  100.     {
  101. v = 0;
  102.     }
  103.     else
  104.     {
  105. v = new ::IceProxy::Demo::Hello;
  106. v->__copyFrom(proxy);
  107.     }
  108. }
  109. void
  110. Demo::__write(::IceInternal::BasicStream* __os, const ::Demo::HelloPtr& v)
  111. {
  112.     __os->write(::Ice::ObjectPtr(v));
  113. }
  114. const ::std::string&
  115. IceProxy::Demo::Transmit::ice_staticId()
  116. {
  117.     return ::Demo::Transmit::ice_staticId();
  118. }
  119. ::IceInternal::Handle< ::IceDelegateM::Ice::Object>
  120. IceProxy::Demo::Transmit::__createDelegateM()
  121. {
  122.     return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Demo::Transmit);
  123. }
  124. ::IceInternal::Handle< ::IceDelegateD::Ice::Object>
  125. IceProxy::Demo::Transmit::__createDelegateD()
  126. {
  127.     return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Demo::Transmit);
  128. }
  129. bool
  130. IceProxy::Demo::operator==(const ::IceProxy::Demo::Transmit& l, const ::IceProxy::Demo::Transmit& r)
  131. {
  132.     return static_cast<const ::IceProxy::Ice::Object&>(l) == static_cast<const ::IceProxy::Ice::Object&>(r);
  133. }
  134. bool
  135. IceProxy::Demo::operator!=(const ::IceProxy::Demo::Transmit& l, const ::IceProxy::Demo::Transmit& r)
  136. {
  137.     return static_cast<const ::IceProxy::Ice::Object&>(l) != static_cast<const ::IceProxy::Ice::Object&>(r);
  138. }
  139. bool
  140. IceProxy::Demo::operator<(const ::IceProxy::Demo::Transmit& l, const ::IceProxy::Demo::Transmit& r)
  141. {
  142.     return static_cast<const ::IceProxy::Ice::Object&>(l) < static_cast<const ::IceProxy::Ice::Object&>(r);
  143. }
  144. void
  145. IceProxy::Demo::Hello::sayHello(const ::std::string& s)
  146. {
  147.     sayHello(s, __defaultContext());
  148. }
  149. void
  150. IceProxy::Demo::Hello::sayHello(const ::std::string& s, const ::Ice::Context& __ctx)
  151. {
  152.     int __cnt = 0;
  153.     while(true)
  154.     {
  155. try
  156. {
  157.     ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
  158.     ::IceDelegate::Demo::Hello* __del = dynamic_cast< ::IceDelegate::Demo::Hello*>(__delBase.get());
  159.     __del->sayHello(s, __ctx);
  160.     return;
  161. }
  162. catch(const ::IceInternal::NonRepeatable& __ex)
  163. {
  164.     __handleException(*__ex.get(), __cnt);
  165. }
  166. catch(const ::Ice::LocalException& __ex)
  167. {
  168.     __handleException(__ex, __cnt);
  169. }
  170.     }
  171. }
  172. ::Demo::TransmitPtr
  173. IceProxy::Demo::Hello::setClass(::Ice::Int a, ::Ice::Double d1, ::Ice::Double d2, ::Ice::Double d3)
  174. {
  175.     return setClass(a, d1, d2, d3, __defaultContext());
  176. }
  177. ::Demo::TransmitPtr
  178. IceProxy::Demo::Hello::setClass(::Ice::Int a, ::Ice::Double d1, ::Ice::Double d2, ::Ice::Double d3, const ::Ice::Context& __ctx)
  179. {
  180.     int __cnt = 0;
  181.     while(true)
  182.     {
  183. try
  184. {
  185.     __checkTwowayOnly("setClass" );
  186.     ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
  187.     ::IceDelegate::Demo::Hello* __del = dynamic_cast< ::IceDelegate::Demo::Hello*>(__delBase.get());
  188.     return __del->setClass(a, d1, d2, d3, __ctx);
  189. }
  190. catch(const ::IceInternal::NonRepeatable& __ex)
  191. {
  192.     __handleException(*__ex.get(), __cnt);
  193. }
  194. catch(const ::Ice::LocalException& __ex)
  195. {
  196.     __handleException(__ex, __cnt);
  197. }
  198.     }
  199. }
  200. void
  201. IceProxy::Demo::Hello::sendClass(const ::Demo::TransmitPtr& trans)
  202. {
  203.     sendClass(trans, __defaultContext());
  204. }
  205. void
  206. IceProxy::Demo::Hello::sendClass(const ::Demo::TransmitPtr& trans, const ::Ice::Context& __ctx)
  207. {
  208.     int __cnt = 0;
  209.     while(true)
  210.     {
  211. try
  212. {
  213.     ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
  214.     ::IceDelegate::Demo::Hello* __del = dynamic_cast< ::IceDelegate::Demo::Hello*>(__delBase.get());
  215.     __del->sendClass(trans, __ctx);
  216.     return;
  217. }
  218. catch(const ::IceInternal::NonRepeatable& __ex)
  219. {
  220.     __handleException(*__ex.get(), __cnt);
  221. }
  222. catch(const ::Ice::LocalException& __ex)
  223. {
  224.     __handleException(__ex, __cnt);
  225. }
  226.     }
  227. }
  228. const ::std::string&
  229. IceProxy::Demo::Hello::ice_staticId()
  230. {
  231.     return ::Demo::Hello::ice_staticId();
  232. }
  233. ::IceInternal::Handle< ::IceDelegateM::Ice::Object>
  234. IceProxy::Demo::Hello::__createDelegateM()
  235. {
  236.     return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::Demo::Hello);
  237. }
  238. ::IceInternal::Handle< ::IceDelegateD::Ice::Object>
  239. IceProxy::Demo::Hello::__createDelegateD()
  240. {
  241.     return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Demo::Hello);
  242. }
  243. bool
  244. IceProxy::Demo::operator==(const ::IceProxy::Demo::Hello& l, const ::IceProxy::Demo::Hello& r)
  245. {
  246.     return static_cast<const ::IceProxy::Ice::Object&>(l) == static_cast<const ::IceProxy::Ice::Object&>(r);
  247. }
  248. bool
  249. IceProxy::Demo::operator!=(const ::IceProxy::Demo::Hello& l, const ::IceProxy::Demo::Hello& r)
  250. {
  251.     return static_cast<const ::IceProxy::Ice::Object&>(l) != static_cast<const ::IceProxy::Ice::Object&>(r);
  252. }
  253. bool
  254. IceProxy::Demo::operator<(const ::IceProxy::Demo::Hello& l, const ::IceProxy::Demo::Hello& r)
  255. {
  256.     return static_cast<const ::IceProxy::Ice::Object&>(l) < static_cast<const ::IceProxy::Ice::Object&>(r);
  257. }
  258. static const ::std::string __Demo__Hello__sayHello_name = "sayHello";
  259. void
  260. IceDelegateM::Demo::Hello::sayHello(const ::std::string& s, const ::Ice::Context& __context)
  261. {
  262.     ::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Demo__Hello__sayHello_name, ::Ice::Nonmutating, __context, __compress);
  263.     try
  264.     {
  265. ::IceInternal::BasicStream* __os = __og.os();
  266. __os->write(s);
  267.     }
  268.     catch(const ::Ice::LocalException& __ex)
  269.     {
  270. __og.abort(__ex);
  271.     }
  272.     bool __ok = __og.invoke();
  273.     try
  274.     {
  275. ::IceInternal::BasicStream* __is = __og.is();
  276. if(!__ok)
  277. {
  278.     try
  279.     {
  280.  __is->throwException();
  281.     }
  282.     catch(const ::Ice::UserException& __ex)
  283.     {
  284.  throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
  285.     }
  286. }
  287.     }
  288.     catch(const ::Ice::LocalException& __ex)
  289.     {
  290. throw ::IceInternal::NonRepeatable(__ex);
  291.     }
  292. }
  293. static const ::std::string __Demo__Hello__setClass_name = "setClass";
  294. ::Demo::TransmitPtr
  295. IceDelegateM::Demo::Hello::setClass(::Ice::Int a, ::Ice::Double d1, ::Ice::Double d2, ::Ice::Double d3, const ::Ice::Context& __context)
  296. {
  297.     ::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Demo__Hello__setClass_name, ::Ice::Idempotent, __context, __compress);
  298.     try
  299.     {
  300. ::IceInternal::BasicStream* __os = __og.os();
  301. __os->write(a);
  302. __os->write(d1);
  303. __os->write(d2);
  304. __os->write(d3);
  305.     }
  306.     catch(const ::Ice::LocalException& __ex)
  307.     {
  308. __og.abort(__ex);
  309.     }
  310.     bool __ok = __og.invoke();
  311.     try
  312.     {
  313. ::IceInternal::BasicStream* __is = __og.is();
  314. if(!__ok)
  315. {
  316.     try
  317.     {
  318.  __is->throwException();
  319.     }
  320.     catch(const ::Ice::UserException& __ex)
  321.     {
  322.  throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
  323.     }
  324. }
  325. ::Demo::TransmitPtr __ret;
  326. __is->read(::Demo::__patch__TransmitPtr, &__ret);
  327. __is->readPendingObjects();
  328. return __ret;
  329.     }
  330.     catch(const ::Ice::LocalException& __ex)
  331.     {
  332. throw ::IceInternal::NonRepeatable(__ex);
  333.     }
  334. }
  335. static const ::std::string __Demo__Hello__sendClass_name = "sendClass";
  336. void
  337. IceDelegateM::Demo::Hello::sendClass(const ::Demo::TransmitPtr& trans, const ::Ice::Context& __context)
  338. {
  339.     ::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Demo__Hello__sendClass_name, ::Ice::Idempotent, __context, __compress);
  340.     try
  341.     {
  342. ::IceInternal::BasicStream* __os = __og.os();
  343. ::Demo::__write(__os, trans);
  344. __os->writePendingObjects();
  345.     }
  346.     catch(const ::Ice::LocalException& __ex)
  347.     {
  348. __og.abort(__ex);
  349.     }
  350.     bool __ok = __og.invoke();
  351.     try
  352.     {
  353. ::IceInternal::BasicStream* __is = __og.is();
  354. if(!__ok)
  355. {
  356.     try
  357.     {
  358.  __is->throwException();
  359.     }
  360.     catch(const ::Ice::UserException& __ex)
  361.     {
  362.  throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
  363.     }
  364. }
  365.     }
  366.     catch(const ::Ice::LocalException& __ex)
  367.     {
  368. throw ::IceInternal::NonRepeatable(__ex);
  369.     }
  370. }
  371. void
  372. IceDelegateD::Demo::Hello::sayHello(const ::std::string& s, const ::Ice::Context& __context)
  373. {
  374.     ::Ice::Current __current;
  375.     __initCurrent(__current, "sayHello", ::Ice::Nonmutating, __context);
  376.     while(true)
  377.     {
  378. ::IceInternal::Direct __direct(__current);
  379. ::Demo::Hello* __servant = dynamic_cast< ::Demo::Hello*>(__direct.servant().get());
  380. if(!__servant)
  381. {
  382.     ::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
  383.     __opEx.id = __current.id;
  384.     __opEx.facet = __current.facet;
  385.     __opEx.operation = __current.operation;
  386.     throw __opEx;
  387. }
  388. try
  389. {
  390.     __servant->sayHello(s, __current);
  391.     return;
  392. }
  393. catch(const ::Ice::LocalException& __ex)
  394. {
  395.     throw ::IceInternal::NonRepeatable(__ex);
  396. }
  397.     }
  398. }
  399. ::Demo::TransmitPtr
  400. IceDelegateD::Demo::Hello::setClass(::Ice::Int a, ::Ice::Double d1, ::Ice::Double d2, ::Ice::Double d3, const ::Ice::Context& __context)
  401. {
  402.     ::Ice::Current __current;
  403.     __initCurrent(__current, "setClass", ::Ice::Idempotent, __context);
  404.     while(true)
  405.     {
  406. ::IceInternal::Direct __direct(__current);
  407. ::Demo::Hello* __servant = dynamic_cast< ::Demo::Hello*>(__direct.servant().get());
  408. if(!__servant)
  409. {
  410.     ::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
  411.     __opEx.id = __current.id;
  412.     __opEx.facet = __current.facet;
  413.     __opEx.operation = __current.operation;
  414.     throw __opEx;
  415. }
  416. try
  417. {
  418.     return __servant->setClass(a, d1, d2, d3, __current);
  419. }
  420. catch(const ::Ice::LocalException& __ex)
  421. {
  422.     throw ::IceInternal::NonRepeatable(__ex);
  423. }
  424.     }
  425. }
  426. void
  427. IceDelegateD::Demo::Hello::sendClass(const ::Demo::TransmitPtr& trans, const ::Ice::Context& __context)
  428. {
  429.     ::Ice::Current __current;
  430.     __initCurrent(__current, "sendClass", ::Ice::Idempotent, __context);
  431.     while(true)
  432.     {
  433. ::IceInternal::Direct __direct(__current);
  434. ::Demo::Hello* __servant = dynamic_cast< ::Demo::Hello*>(__direct.servant().get());
  435. if(!__servant)
  436. {
  437.     ::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
  438.     __opEx.id = __current.id;
  439.     __opEx.facet = __current.facet;
  440.     __opEx.operation = __current.operation;
  441.     throw __opEx;
  442. }
  443. try
  444. {
  445.     __servant->sendClass(trans, __current);
  446.     return;
  447. }
  448. catch(const ::Ice::LocalException& __ex)
  449. {
  450.     throw ::IceInternal::NonRepeatable(__ex);
  451. }
  452.     }
  453. }
  454. Demo::Transmit::Transmit(::Ice::Int __ice_a, const ::Demo::array& __ice_arr) :
  455.     a(__ice_a),
  456.     arr(__ice_arr)
  457. {
  458. }
  459. ::Ice::ObjectPtr
  460. Demo::Transmit::ice_clone() const
  461. {
  462.     ::Demo::TransmitPtr __p = new ::Demo::Transmit(*this);
  463.     return __p;
  464. }
  465. static const ::std::string __Demo__Transmit_ids[2] =
  466. {
  467.     "::Demo::Transmit",
  468.     "::Ice::Object"
  469. };
  470. bool
  471. Demo::Transmit::ice_isA(const ::std::string& _s, const ::Ice::Current& ) const
  472. {
  473.     return ::std::binary_search(__Demo__Transmit_ids, __Demo__Transmit_ids + 2, _s);
  474. }
  475. ::std::vector< ::std::string>
  476. Demo::Transmit::ice_ids(const ::Ice::Current& ) const
  477. {
  478.     return ::std::vector< ::std::string>(&__Demo__Transmit_ids[0], &__Demo__Transmit_ids[2]);
  479. }
  480. const ::std::string&
  481. Demo::Transmit::ice_id(const ::Ice::Current& ) const
  482. {
  483.     return __Demo__Transmit_ids[0];
  484. }
  485. const ::std::string&
  486. Demo::Transmit::ice_staticId()
  487. {
  488.     return __Demo__Transmit_ids[0];
  489. }
  490. void
  491. Demo::Transmit::__write(::IceInternal::BasicStream* __os) const
  492. {
  493.     __os->writeTypeId(ice_staticId());
  494.     __os->startWriteSlice();
  495.     __os->write(a);
  496.     __os->write(arr);
  497.     __os->endWriteSlice();
  498. #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
  499.     Object::__write(__os);
  500. #else
  501.     ::Ice::Object::__write(__os);
  502. #endif
  503. }
  504. void
  505. Demo::Transmit::__read(::IceInternal::BasicStream* __is, bool __rid)
  506. {
  507.     if(__rid)
  508.     {
  509. ::std::string myId;
  510. __is->readTypeId(myId);
  511.     }
  512.     __is->startReadSlice();
  513.     __is->read(a);
  514.     __is->read(arr);
  515.     __is->endReadSlice();
  516. #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
  517.     Object::__read(__is, true);
  518. #else
  519.     ::Ice::Object::__read(__is, true);
  520. #endif
  521. }
  522. void
  523. Demo::Transmit::__write(const ::Ice::OutputStreamPtr& ) const
  524. {
  525.     Ice::MarshalException ex(__FILE__, __LINE__);
  526.     ex.reason = "type Demo::Transmit was not generated with stream support";
  527.     throw ex;
  528. }
  529. void
  530. Demo::Transmit::__read(const ::Ice::InputStreamPtr&, bool)
  531. {
  532.     Ice::MarshalException ex(__FILE__, __LINE__);
  533.     ex.reason = "type Demo::Transmit was not generated with stream support";
  534.     throw ex;
  535. }
  536. class __F__Demo__Transmit : public ::Ice::ObjectFactory
  537. {
  538. public:
  539.     virtual ::Ice::ObjectPtr
  540.     create(const ::std::string& type)
  541.     {
  542. assert(type == ::Demo::Transmit::ice_staticId());
  543. return new ::Demo::Transmit;
  544.     }
  545.     virtual void
  546.     destroy()
  547.     {
  548.     }
  549. };
  550. static ::Ice::ObjectFactoryPtr __F__Demo__Transmit_Ptr = new __F__Demo__Transmit;
  551. const ::Ice::ObjectFactoryPtr&
  552. Demo::Transmit::ice_factory()
  553. {
  554.     return __F__Demo__Transmit_Ptr;
  555. }
  556. class __F__Demo__Transmit__Init
  557. {
  558. public:
  559.     __F__Demo__Transmit__Init()
  560.     {
  561. ::IceInternal::factoryTable->addObjectFactory(::Demo::Transmit::ice_staticId(), ::Demo::Transmit::ice_factory());
  562.     }
  563.     ~__F__Demo__Transmit__Init()
  564.     {
  565. ::IceInternal::factoryTable->removeObjectFactory(::Demo::Transmit::ice_staticId());
  566.     }
  567. };
  568. static __F__Demo__Transmit__Init __F__Demo__Transmit__i;
  569. #ifdef __APPLE__
  570. extern "C" { void __F__Demo__Transmit__initializer() {} }
  571. #endif
  572. void
  573. Demo::__patch__TransmitPtr(void* __addr, ::Ice::ObjectPtr& v)
  574. {
  575.     ::Demo::TransmitPtr* p = static_cast< ::Demo::TransmitPtr*>(__addr);
  576.     assert(p);
  577.     *p = ::Demo::TransmitPtr::dynamicCast(v);
  578.     if(v && !*p)
  579.     {
  580. ::Ice::NoObjectFactoryException e(__FILE__, __LINE__);
  581. e.type = ::Demo::Transmit::ice_staticId();
  582. throw e;
  583.     }
  584. }
  585. bool
  586. Demo::operator==(const ::Demo::Transmit& l, const ::Demo::Transmit& r)
  587. {
  588.     return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
  589. }
  590. bool
  591. Demo::operator!=(const ::Demo::Transmit& l, const ::Demo::Transmit& r)
  592. {
  593.     return static_cast<const ::Ice::Object&>(l) != static_cast<const ::Ice::Object&>(r);
  594. }
  595. bool
  596. Demo::operator<(const ::Demo::Transmit& l, const ::Demo::Transmit& r)
  597. {
  598.     return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
  599. }
  600. ::Ice::ObjectPtr
  601. Demo::Hello::ice_clone() const
  602. {
  603.     throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);
  604. }
  605. static const ::std::string __Demo__Hello_ids[2] =
  606. {
  607.     "::Demo::Hello",
  608.     "::Ice::Object"
  609. };
  610. bool
  611. Demo::Hello::ice_isA(const ::std::string& _s, const ::Ice::Current& ) const
  612. {
  613.     return ::std::binary_search(__Demo__Hello_ids, __Demo__Hello_ids + 2, _s);
  614. }
  615. ::std::vector< ::std::string>
  616. Demo::Hello::ice_ids(const ::Ice::Current& ) const
  617. {
  618.     return ::std::vector< ::std::string>(&__Demo__Hello_ids[0], &__Demo__Hello_ids[2]);
  619. }
  620. const ::std::string&
  621. Demo::Hello::ice_id(const ::Ice::Current& ) const
  622. {
  623.     return __Demo__Hello_ids[0];
  624. }
  625. const ::std::string&
  626. Demo::Hello::ice_staticId()
  627. {
  628.     return __Demo__Hello_ids[0];
  629. }
  630. ::IceInternal::DispatchStatus
  631. Demo::Hello::___sayHello(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) const
  632. {
  633.     __checkMode(::Ice::Nonmutating, __current.mode);
  634.     ::IceInternal::BasicStream* __is = __inS.is();
  635.     ::std::string s;
  636.     __is->read(s);
  637.     sayHello(s, __current);
  638.     return ::IceInternal::DispatchOK;
  639. }
  640. ::IceInternal::DispatchStatus
  641. Demo::Hello::___setClass(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
  642. {
  643.     __checkMode(::Ice::Idempotent, __current.mode);
  644.     ::IceInternal::BasicStream* __is = __inS.is();
  645.     ::IceInternal::BasicStream* __os = __inS.os();
  646.     ::Ice::Int a;
  647.     ::Ice::Double d1;
  648.     ::Ice::Double d2;
  649.     ::Ice::Double d3;
  650.     __is->read(a);
  651.     __is->read(d1);
  652.     __is->read(d2);
  653.     __is->read(d3);
  654.     ::Demo::TransmitPtr __ret = setClass(a, d1, d2, d3, __current);
  655.     ::Demo::__write(__os, __ret);
  656.     __os->writePendingObjects();
  657.     return ::IceInternal::DispatchOK;
  658. }
  659. ::IceInternal::DispatchStatus
  660. Demo::Hello::___sendClass(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
  661. {
  662.     __checkMode(::Ice::Idempotent, __current.mode);
  663.     ::IceInternal::BasicStream* __is = __inS.is();
  664.     ::Demo::TransmitPtr trans;
  665.     __is->read(::Demo::__patch__TransmitPtr, &trans);
  666.     __is->readPendingObjects();
  667.     sendClass(trans, __current);
  668.     return ::IceInternal::DispatchOK;
  669. }
  670. static ::std::string __Demo__Hello_all[] =
  671. {
  672.     "ice_id",
  673.     "ice_ids",
  674.     "ice_isA",
  675.     "ice_ping",
  676.     "sayHello",
  677.     "sendClass",
  678.     "setClass"
  679. };
  680. ::IceInternal::DispatchStatus
  681. Demo::Hello::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
  682. {
  683.     ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__Demo__Hello_all, __Demo__Hello_all + 7, current.operation);
  684.     if(r.first == r.second)
  685.     {
  686. return ::IceInternal::DispatchOperationNotExist;
  687.     }
  688.     switch(r.first - __Demo__Hello_all)
  689.     {
  690. case 0:
  691. {
  692.     return ___ice_id(in, current);
  693. }
  694. case 1:
  695. {
  696.     return ___ice_ids(in, current);
  697. }
  698. case 2:
  699. {
  700.     return ___ice_isA(in, current);
  701. }
  702. case 3:
  703. {
  704.     return ___ice_ping(in, current);
  705. }
  706. case 4:
  707. {
  708.     return ___sayHello(in, current);
  709. }
  710. case 5:
  711. {
  712.     return ___sendClass(in, current);
  713. }
  714. case 6:
  715. {
  716.     return ___setClass(in, current);
  717. }
  718.     }
  719.     assert(false);
  720.     return ::IceInternal::DispatchOperationNotExist;
  721. }
  722. void
  723. Demo::Hello::__write(::IceInternal::BasicStream* __os) const
  724. {
  725.     __os->writeTypeId(ice_staticId());
  726.     __os->startWriteSlice();
  727.     __os->endWriteSlice();
  728. #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
  729.     Object::__write(__os);
  730. #else
  731.     ::Ice::Object::__write(__os);
  732. #endif
  733. }
  734. void
  735. Demo::Hello::__read(::IceInternal::BasicStream* __is, bool __rid)
  736. {
  737.     if(__rid)
  738.     {
  739. ::std::string myId;
  740. __is->readTypeId(myId);
  741.     }
  742.     __is->startReadSlice();
  743.     __is->endReadSlice();
  744. #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
  745.     Object::__read(__is, true);
  746. #else
  747.     ::Ice::Object::__read(__is, true);
  748. #endif
  749. }
  750. void
  751. Demo::Hello::__write(const ::Ice::OutputStreamPtr& ) const
  752. {
  753.     Ice::MarshalException ex(__FILE__, __LINE__);
  754.     ex.reason = "type Demo::Hello was not generated with stream support";
  755.     throw ex;
  756. }
  757. void
  758. Demo::Hello::__read(const ::Ice::InputStreamPtr&, bool)
  759. {
  760.     Ice::MarshalException ex(__FILE__, __LINE__);
  761.     ex.reason = "type Demo::Hello was not generated with stream support";
  762.     throw ex;
  763. }
  764. void
  765. Demo::__patch__HelloPtr(void* __addr, ::Ice::ObjectPtr& v)
  766. {
  767.     ::Demo::HelloPtr* p = static_cast< ::Demo::HelloPtr*>(__addr);
  768.     assert(p);
  769.     *p = ::Demo::HelloPtr::dynamicCast(v);
  770.     if(v && !*p)
  771.     {
  772. ::Ice::NoObjectFactoryException e(__FILE__, __LINE__);
  773. e.type = ::Demo::Hello::ice_staticId();
  774. throw e;
  775.     }
  776. }
  777. bool
  778. Demo::operator==(const ::Demo::Hello& l, const ::Demo::Hello& r)
  779. {
  780.     return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
  781. }
  782. bool
  783. Demo::operator!=(const ::Demo::Hello& l, const ::Demo::Hello& r)
  784. {
  785.     return static_cast<const ::Ice::Object&>(l) != static_cast<const ::Ice::Object&>(r);
  786. }
  787. bool
  788. Demo::operator<(const ::Demo::Hello& l, const ::Demo::Hello& r)
  789. {
  790.     return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
  791. }


 
 
voici mes erreurs :
 

Code :
  1. Performing Custom Build Step on .\Hello.ice
  2. Compiling...
  3. Hello.cpp
  4. HelloI.cpp
  5. Server.cpp
  6. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : error C2259: 'HelloI' : cannot instantiate abstract class due to following members:
  7.         .\HelloI.h(18) : see declaration of 'HelloI'
  8. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : warning C4259: 'void __thiscall Demo::Hello::sayHello(const class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > &,const struct Ice::Current & ) const' :
  9. pure virtual function was not defined
  10.         .\Hello.h(286) : see declaration of 'sayHello'
  11. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : warning C4259: 'class IceInternal::Handle<class Demo::Transmit> __thiscall Demo::Hello::setClass(int,double,double,double,const struct Ice::Current & )' : pure virtual function was not defin
  12. ed
  13.         .\Hello.h(289) : see declaration of 'setClass'
  14. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : warning C4259: 'void __thiscall Demo::Hello::sendClass(const class IceInternal::Handle<class Demo::Transmit> &,const struct Ice::Current & )' : pure virtual function was not defined
  15.         .\Hello.h(292) : see declaration of 'sendClass'
  16. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : error C2259: 'HelloI' : cannot instantiate abstract class due to following members:
  17.         .\HelloI.h(18) : see declaration of 'HelloI'
  18. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : warning C4259: 'void __thiscall Demo::Hello::sayHello(const class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > &,const struct Ice::Current & ) const' :
  19. pure virtual function was not defined
  20.         .\Hello.h(286) : see declaration of 'sayHello'
  21. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : warning C4259: 'class IceInternal::Handle<class Demo::Transmit> __thiscall Demo::Hello::setClass(int,double,double,double,const struct Ice::Current & )' : pure virtual function was not defin
  22. ed
  23.         .\Hello.h(289) : see declaration of 'setClass'
  24. C:\Ice-3.0.1-VC60\demo\Ice\Copy of minimal\Server.cpp(26) : warning C4259: 'void __thiscall Demo::Hello::sendClass(const class IceInternal::Handle<class Demo::Transmit> &,const struct Ice::Current & )' : pure virtual function was not defined
  25.         .\Hello.h(292) : see declaration of 'sendClass'
  26. Generating Code...
  27. Error executing cl.exe.
  28. server.exe - 2 error(s), 6 warning(s)


 
J'espere avoir ete assez clair !!
 
Je vous remerciepour votre aide  :jap:

mood
Publicité
Posté le 07-03-2006 à 09:53:11  profilanswer
 

n°1320002
chrisbk
-
Posté le 07-03-2006 à 10:51:58  profilanswer
 

[:moule_bite] t'as pas plus long ?
 
Sinon les erreurs sont bien expliquées par le compilo : t'as des fonctions virtuelles pure(=fonction abstract en java), ce qui rends ta classe abstraite, et t'essaye d'instancier une de ces classes


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  de java vers c++

 

Sujets relatifs
[JAVA] Migration d'une applet vers un logiciel[java][debutant] string vers date
[Resolu * 2]solution de mapping java vers javatomcat jsp: comment fonctionne l'encodage URL vers java?
exportation du contenu d'une base de donnée vers xml avec javaexportation du contenu d'une base de donnée vers xml avec java
exportation du contenu d'une base de donnée vers xml avec javaApplet Java : Redimensioner une image + upload vers FTP
[java] une lib de conversion texte vers html ?Migrer un projet java vers linux
Plus de sujets relatifs à : de java vers c++


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR