00001
#ifndef _ACS_BASE_EX_IML_H_
00002
#define _ACS_BASE_EX_IML_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
#ifndef __cplusplus
00034
#error This is a C++ include file and cannot be used from plain C
00035
#endif
00036
00037
#include "acserr.h"
00038
00039
namespace ACSErr
00040 {
00041
00042
00043
00044
00045
00046
00047 class ErrorTraceForBaseEx
00048 {
00049
protected:
00050
ErrorTraceForBaseEx();
00051 ErrorTraceForBaseEx(ACSErr::ErrorTrace &errortrace) :
00052
m_errorTrace (errortrace){}
00053 ErrorTraceForBaseEx(
const ACSErr::ErrorTrace &errortrace) :
00054
m_errorTrace (errortrace){}
00055
00056 ErrorTrace
m_errorTrace;
00057 };
00058
00059
00060
00061
00062
00063 class ACSbaseExImpl :
public ErrorTraceForBaseEx,
public ErrorTraceHelper
00064 {
00065
protected:
00066
00067
00068
ACSbaseExImpl (ACSErr::ACSErrType et, ACSErr::ErrorCode ec,
00069
const char* file,
int line,
const char* routine,
const char* sd,
00070 ACSErr::Severity severity);
00071
00072
00073
ACSbaseExImpl (
const ACSErr::ErrorTrace &pet,
00074 ACSErr::ACSErrType et, ACSErr::ErrorCode ec,
00075
const char* file,
int line,
const char* routine,
const char* sd,
00076 ACSErr::Severity severity);
00077
00078
00079
00080
ACSbaseExImpl(
const ACSErr::ErrorTrace &et);
00081
00082
ACSbaseExImpl(ACSErr::ErrorTrace &et);
00083
00084
00085
ACSbaseExImpl(ACSErr::ErrorTrace &et,
int depth);
00086
00087
public:
00088
00092 ACSbaseEx
getACSbaseEx() {
return ACSbaseEx(m_errorTrace); }
00093
00097
ACSbaseExImpl (
const ACSbaseExImpl &t);
00098
00102
ACSbaseExImpl&
operator=(
const ACSbaseExImpl &t);
00103
00104 };
00105
00106 };
00107
00108
template <
class T>
00109 class ETHolder
00110 {
00111
public:
00112 ETHolder(
const CORBA::UserException &ex) :
00113
m_errorTrace (((T&)ex).errorTrace) {}
00114
00115
00116 ETHolder(
const CompletionImpl &c) :
00117
m_errorTrace( const_cast<
CompletionImpl&>(c).isErrorFree() ? this->
emptyErrorTrace : const_cast<ACSErr::ErrorTrace&>(c.previousError[0])) {}
00118
00119
00120
00121
00122
00123 ETHolder(
const ACSErr::ACSbaseExImpl &ex) :
00124
m_errorTrace( const_cast<ACSErr::ACSbaseExImpl&>(ex).
getErrorTrace() ) {}
00125
00126 ETHolder(
ACSErr::ACSbaseExImpl &ex) :
00127
m_errorTrace( ex.
getErrorTrace() ) {}
00128
00129 ACSErr::ErrorTrace&
getErrorTrace()
const {
return m_errorTrace; }
00130
00131
private:
00132 ETHolder(
const ETHolder<T>&) {}
00133
00134 ACSErr::ErrorTrace &
m_errorTrace;
00135 ACSErr::ErrorTrace
emptyErrorTrace;
00136 };
00137
00138
#endif