Horus Doc || Corba Reference || Corba   Client Server   Stubs C++   Stubs Java   Servant Generator  

HxEnvCorba.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (c) 1996, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *
00006  *  Author(s):
00007  *  Dennis Koelma (koelma@wins.uva.nl)
00008  *  Marc Navarro (mnavarro@wins.uva.nl)
00009  */
00010 
00011 #ifndef HxEnvCorba_h
00012 #define HxEnvCorba_h
00013 
00014 #include "HxEnvironment.h"
00015 #include "HxString.h"
00016 
00017 
00019 class HxEnvCorba : public HxEnvironment
00020 {
00021 public:
00022 
00023                             HxEnvCorba();
00024 
00025     virtual STD_OSTREAM&    errorStream();
00026     virtual void            flush();
00027 
00028     //virtual void            clearMessage();
00029     //virtual bool            hasError();
00030     //virtual char*           getMessage();
00031 
00032     virtual void            beginCapture();
00033     virtual char*           endCapture();
00034 
00035 private:
00036     char*                   _message;
00037     int                     _capturing;
00038 
00039 };
00040 
00041 
00042 // This class handles the errors in the ctor and dtor. To add error handling
00043 // to a function you just have to declare a HxEnvCorbaCapturer at the begining
00044 // of the function.
00045 
00049 template<class ExceptionT>
00050 class HxEnvCorbaCapturer
00051 {
00052 public:
00053 
00054     HxEnvCorbaCapturer()
00055     {
00056         //_env = dynamic_cast<HxEnvCorba*>(HxEnvironment::instance());
00057         //_env->beginCapture();
00058     }
00059 
00060     ~HxEnvCorbaCapturer()
00061     {
00062         //char* error = _env->endCapture();
00063         //if(error) throw ExceptionT(error);
00064     }
00065 
00066 private:
00067     HxEnvCorba* _env;
00068 };
00069 
00070 #endif

Generated on Mon Jan 27 15:20:51 2003 for CorbaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001