00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef _CORBA_UTILITY_H_
00035 #define _CORBA_UTILITY_H_
00036
00037
00038
00039
00040 #include <vector>
00041
00042
00043 #include "tao/PortableServer/PortableServer.h"
00044
00045 #include "chrono.h"
00046 #include "osbid.h"
00047
00048
00049 #include "corba_utilityC.h"
00050 #include "exceptionC.h"
00051
00052
00053 namespace OSB_LIB {
00054 class OsbError;
00055 class BaseError;
00056 class OsbErrors;
00057 }
00058
00059
00060
00061 namespace OSB_CORBA {
00062
00063 using corba::common::Date;
00064 using corba::common::DateTime;
00065 using corba::common::CfgError;
00066 using corba::common::CfgErrorSeq;
00067 using corba::common::CfgStatus;
00068 using corba::common::OsbCorbaException;
00069 using corba::common::Utf8String;
00070
00072 template<typename T>
00073 PortableServer::ObjectId_var idToObjectId(
00074 const OSB_LIB::Id<T>& id
00075 )
00076 {
00077 return idToObjectId(id.id());
00078 }
00079
00081 template<typename T>
00082 PortableServer::ObjectId_var idToObjectId(
00083 const OSB_LIB::Id2<T>& id
00084 )
00085 {
00086 return idToObjectId(id.id1, id.id2);
00087 }
00088
00090 PortableServer::ObjectId_var idToObjectId(
00091 long id1
00092 );
00093
00095 PortableServer::ObjectId_var idToObjectId(
00096 long id1,
00097 long id2
00098 );
00099
00101 PortableServer::ObjectId_var idToObjectId(
00102 long id1,
00103 long id2,
00104 long id3
00105 );
00106
00113 OsbCorbaException osbCorbaException(
00114 const OSB_LIB::BaseError& error
00115 );
00116
00130 Utf8String * utf8Ptr(
00131 const std::string& src
00132 );
00133
00146 Utf8String utf8(
00147 const std::string& src
00148 );
00149
00157 Date libToCorbaDate(
00158 const OSB_LIB::Date& tmpDate
00159 );
00160
00168 Date libToCorbaDate(
00169 const OSB_LIB::DateTime& tmpDateTime
00170 );
00171
00179 OSB_LIB::Date corbaToLibDate(
00180 const Date& tmpDate
00181 );
00182
00190 OSB_LIB::DateTime corbaToLibDateTime(
00191 const Date& tmpDate
00192 );
00193
00201 OSB_LIB::DateTime corbaToLibDateTime(
00202 const DateTime& tmpDate
00203 );
00204
00212 DateTime libToCorbaDateTime(
00213 const OSB_LIB::DateTime& tmpDate
00214 );
00215
00222 CfgError osbToCfgError(
00223 const OSB_LIB::BaseError& error
00224 );
00225
00232 CfgErrorSeq* osbToCfgError(
00233 const OSB_LIB::OsbErrors& osbErrors
00234 );
00235
00246 CfgErrorSeq* osbToCfgError(
00247 const std::vector<OSB_LIB::OsbError>& osbErrors
00248 );
00249
00257 CfgStatus cfgStatus(
00258 const OSB_LIB::CfgStatus status
00259 );
00260
00262 OSB_LIB::CfgStatus cfgStatus(
00263 const CfgStatus status
00264 );
00265 }
00266 #endif // #ifndef _CORBA_UTILITY_H_