You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(86) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(114) |
Feb
(254) |
Mar
(166) |
Apr
(122) |
May
(131) |
Jun
(59) |
Jul
(201) |
Aug
(85) |
Sep
(80) |
Oct
(64) |
Nov
(103) |
Dec
(36) |
| 2005 |
Jan
(231) |
Feb
(204) |
Mar
(71) |
Apr
(54) |
May
(50) |
Jun
(120) |
Jul
(17) |
Aug
(124) |
Sep
(75) |
Oct
(154) |
Nov
(37) |
Dec
(143) |
| 2006 |
Jan
(346) |
Feb
(170) |
Mar
|
Apr
|
May
(273) |
Jun
(113) |
Jul
(427) |
Aug
(570) |
Sep
(212) |
Oct
(550) |
Nov
(348) |
Dec
(314) |
| 2007 |
Jan
(709) |
Feb
(223) |
Mar
(104) |
Apr
(24) |
May
(11) |
Jun
(3) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <lmj...@us...> - 2003-11-25 21:56:21
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_interface In directory sc8-pr-cvs1:/tmp/cvs-serv2082/supports_interface Removed Files: Hello.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Hello.idl DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:21
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/facet_interface In directory sc8-pr-cvs1:/tmp/cvs-serv2082/facet_interface Removed Files: Hello.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Hello.idl DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:21
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_types
In directory sc8-pr-cvs1:/tmp/cvs-serv2082/supports_types
Modified Files:
Hello.idl
Log Message:
+ moving interface tests to types tests
+ removing attribute tests (duplicated in home tests)
+ removing include tests (duplicated in owudb and calculator tests)
Index: Hello.idl
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_types/Hello.idl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Hello.idl 19 Nov 2003 21:09:11 -0000 1.1
--- Hello.idl 25 Nov 2003 21:56:18 -0000 1.2
***************
*** 14,17 ****
--- 14,19 ----
typedef double doubleArray[10];
+ interface iface { long println(in string s); };
+
interface Console {
/* basic types */
***************
*** 33,36 ****
--- 35,41 ----
map foo4(in map p1, inout map p2, out map p3);
doubleArray foo5(in doubleArray p1, inout doubleArray p2, out doubleArray p3);
+
+ /* interface types */
+ iface operate(in iface i1, inout iface i2, out iface i3);
};
|
|
From: <lmj...@us...> - 2003-11-25 21:56:21
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_types/src
In directory sc8-pr-cvs1:/tmp/cvs-serv2082/receptacle_types/src
Modified Files:
Hello_app.cc Hello_mirror_app.cc
Log Message:
+ moving interface tests to types tests
+ removing attribute tests (duplicated in home tests)
+ removing include tests (duplicated in owudb and calculator tests)
Index: Hello_app.cc
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_types/src/Hello_app.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Hello_app.cc 19 Nov 2003 21:45:50 -0000 1.1
--- Hello_app.cc 25 Nov 2003 21:56:18 -0000 1.2
***************
*** 122,125 ****
--- 122,142 ----
}
+ /* Test Case for: typedef long longMatrix[5][5]; */
+ longMatrix Matrix_1(5,5), Matrix_2(5,5), Matrix_3(5,5), Matrix_r(5,5);
+ for(int i=0;i<5;i++) {
+ for(int j=0;j<5;i++) {
+ Matrix_1.at(i).at(j) = i+j;
+ Matrix_2.at(i).at(j) = i+i+j+j;
+ }
+ }
+ Matrix_r = console.ptr()->foo6(Matrix_1,Matrix_2,Matrix_3);
+ for(int i=0;i<5;i++) {
+ for(int j=0;j<5;j++) {
+ assert(Matrix_r.at(i).at(j) == i+j);
+ assert(Matrix_2.at(i).at(j) == i+j);
+ assert(Matrix_3.at(i).at(j) == i+i+j+j);
+ }
+ }
+
/* Test case: short println1(in short p1, inout short p2, out short p3); */
short short_2=3, short_3, short_r;
Index: Hello_mirror_app.cc
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_types/src/Hello_mirror_app.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Hello_mirror_app.cc 19 Nov 2003 21:45:50 -0000 1.1
--- Hello_mirror_app.cc 25 Nov 2003 21:56:18 -0000 1.2
***************
*** 118,121 ****
--- 118,138 ----
}
+ longMatrix
+ console_mirror_impl::foo6 ( const longMatrix& p1, longMatrix& p2, longMatrix& p3 )
+
+ {
+ DEBUGNL ( " console_impl->foo6 ( p1, p2, p3 )" );
+
+ longMatrix r(5,5);
+ for(int i=0; i<p1.size(); i++) {
+ for(int j=0; j<p2.size(); j++) {
+ r.at(i).at(j) = p1.at(i).at(j);
+ p3.at(i).at(j) = p2.at(i).at(j);
+ p2.at(i).at(j) = p1.at(i).at(j);
+ }
+ }
+ return r;
+ }
+
short
console_mirror_impl::println1 ( const short p1, short& p2, short& p3 )
|
|
From: <lmj...@us...> - 2003-11-25 21:56:20
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/include_dir/ifaces In directory sc8-pr-cvs1:/tmp/cvs-serv2082/include_dir/ifaces Removed Files: Console.idl Lcd.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Console.idl DELETED --- --- Lcd.idl DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:20
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_interface In directory sc8-pr-cvs1:/tmp/cvs-serv2082/receptacle_interface Removed Files: Hello.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Hello.idl DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:20
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/include_dir/comp In directory sc8-pr-cvs1:/tmp/cvs-serv2082/include_dir/comp Removed Files: Hello.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Hello.idl DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:20
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/home_types
In directory sc8-pr-cvs1:/tmp/cvs-serv2082/home_types
Modified Files:
Hello.idl
Log Message:
+ moving interface tests to types tests
+ removing attribute tests (duplicated in home tests)
+ removing include tests (duplicated in owudb and calculator tests)
Index: Hello.idl
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/home_types/Hello.idl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Hello.idl 19 Nov 2003 21:45:50 -0000 1.1
--- Hello.idl 25 Nov 2003 21:56:16 -0000 1.2
***************
*** 14,17 ****
--- 14,22 ----
typedef double doubleArray[10];
+ interface LongCommon {
+ void set_attrib_long(in long param);
+ long get_attrib_long();
+ };
+
component Hello {
/* basic types */
***************
*** 33,36 ****
--- 38,44 ----
attribute map sequence_value;
attribute doubleArray array_value;
+
+ /* interface types */
+ attribute LongCommon the_long;
};
***************
*** 54,57 ****
--- 62,68 ----
factory create_with_sequence(in map p);
factory create_with_array(in doubleArray p);
+
+ /* interface types */
+ factory copy_from(in LongCommon the_long);
};
|
|
From: <lmj...@us...> - 2003-11-25 21:56:19
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/facet_types
In directory sc8-pr-cvs1:/tmp/cvs-serv2082/facet_types
Modified Files:
Hello.idl
Log Message:
+ moving interface tests to types tests
+ removing attribute tests (duplicated in home tests)
+ removing include tests (duplicated in owudb and calculator tests)
Index: Hello.idl
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/facet_types/Hello.idl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Hello.idl 19 Nov 2003 21:09:11 -0000 1.1
--- Hello.idl 25 Nov 2003 21:56:16 -0000 1.2
***************
*** 14,17 ****
--- 14,19 ----
typedef double doubleArray[10];
+ interface iface { long println(in string s); };
+
interface Console {
/* basic types */
***************
*** 33,36 ****
--- 35,41 ----
map foo4(in map p1, inout map p2, out map p3);
doubleArray foo5(in doubleArray p1, inout doubleArray p2, out doubleArray p3);
+
+ /* interface types */
+ iface println(in iface p1, inout iface p2, out iface p3);
};
|
|
From: <lmj...@us...> - 2003-11-25 21:56:19
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/attribute_types/CCM_Test In directory sc8-pr-cvs1:/tmp/cvs-serv2082/attribute_types/CCM_Test Removed Files: _check_CCM_Local_CCM_Session_Hello.cc Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- _check_CCM_Local_CCM_Session_Hello.cc DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:19
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/attribute_types In directory sc8-pr-cvs1:/tmp/cvs-serv2082/attribute_types Removed Files: Hello.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Hello.idl DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:19
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/attribute_interface/CCM_Test In directory sc8-pr-cvs1:/tmp/cvs-serv2082/attribute_interface/CCM_Test Removed Files: _check_CCM_Local_CCM_Session_Hello.cc Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- _check_CCM_Local_CCM_Session_Hello.cc DELETED --- |
|
From: <lmj...@us...> - 2003-11-25 21:56:19
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/attribute_interface In directory sc8-pr-cvs1:/tmp/cvs-serv2082/attribute_interface Removed Files: Hello.idl Log Message: + moving interface tests to types tests + removing attribute tests (duplicated in home tests) + removing include tests (duplicated in owudb and calculator tests) --- Hello.idl DELETED --- |
|
From: <tei...@us...> - 2003-11-25 16:10:51
|
Update of /cvsroot/ccmtools/ccmtools/CppGenerator
In directory sc8-pr-cvs1:/tmp/cvs-serv24082
Modified Files:
CppRemoteGeneratorImpl.java
Log Message:
I did some refactorings in the remote generator
Index: CppRemoteGeneratorImpl.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteGeneratorImpl.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** CppRemoteGeneratorImpl.java 21 Nov 2003 14:54:58 -0000 1.27
--- CppRemoteGeneratorImpl.java 25 Nov 2003 16:10:47 -0000 1.28
***************
*** 732,736 ****
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCorbaToCpp(p, idl_struct, false));
}
else if(idl_type instanceof MAliasDef) {
--- 732,736 ----
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCorbaToCpp(p, idl_struct, "", "parameter_"));
}
else if(idl_type instanceof MAliasDef) {
***************
*** 763,769 ****
List ret = new ArrayList();
! ret.add(" "
! + cpp_type + " parameter_"
! + p.getIdentifier() + ";");
if(direction != MParameterMode.PARAM_OUT) {
--- 763,767 ----
List ret = new ArrayList();
! ret.add(" " + cpp_type + " parameter_" + p.getIdentifier() + ";");
if(direction != MParameterMode.PARAM_OUT) {
***************
*** 777,797 ****
protected String convertStructParameterFromCorbaToCpp(MParameterDef p,
MStructDef idl_struct,
! boolean isSequenceItem)
{
MParameterMode direction = p.getDirection();
- String item ="";
- String index = "";
- String indent = "";
- if(isSequenceItem) {
- item = "_item";
- index = "[i]";
- indent = " ";
- }
-
List ret = new ArrayList();
! ret.add(indent + " CCM_Local::"
! + idl_struct.getIdentifier() + " parameter_"
! + p.getIdentifier() + item +";");
if(direction != MParameterMode.PARAM_OUT) {
--- 775,786 ----
protected String convertStructParameterFromCorbaToCpp(MParameterDef p,
MStructDef idl_struct,
! String CorbaPrefix,
! String CppPrefix)
{
MParameterMode direction = p.getDirection();
List ret = new ArrayList();
! ret.add(" CCM_Local::" + idl_struct.getIdentifier() + " " + CppPrefix
! + p.getIdentifier() + ";");
if(direction != MParameterMode.PARAM_OUT) {
***************
*** 803,811 ****
if(member_idl instanceof MPrimitiveDef
|| member_idl instanceof MStringDef) {
! ret.add(indent + " "
! + "parameter_" + p.getIdentifier() + item + "."
+ member.getIdentifier() + " = CCM::CORBA"
+ base_type + "_to_" + base_type + "("
! + p.getIdentifier() + index + "."
+ member.getIdentifier() + ");");
}
--- 792,800 ----
if(member_idl instanceof MPrimitiveDef
|| member_idl instanceof MStringDef) {
! ret.add(" "
! + CppPrefix + p.getIdentifier() + "."
+ member.getIdentifier() + " = CCM::CORBA"
+ base_type + "_to_" + base_type + "("
! + CorbaPrefix + p.getIdentifier() + "."
+ member.getIdentifier() + ");");
}
***************
*** 813,821 ****
// all other idl_types
// TODO
! ret.add(indent + " // unhandled idl type in convertStructFromCorbaToCpp()");
}
}
}
! return join("\n", ret) + "\n";
}
--- 802,810 ----
// all other idl_types
// TODO
! ret.add(" // unhandled idl type in convertStructFromCorbaToCpp()");
}
}
}
! return join("\n", ret);
}
***************
*** 843,847 ****
else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
!
ret.add(" CCM_Local::" + alias.getIdentifier() + " parameter_"
+ p.getIdentifier() + ";");
--- 832,837 ----
else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
! String CorbaPrefix = "CORBA_item_";
! String CppPrefix = "Cpp_item_";
ret.add(" CCM_Local::" + alias.getIdentifier() + " parameter_"
+ p.getIdentifier() + ";");
***************
*** 849,855 ****
if(p.getDirection() != MParameterMode.PARAM_OUT) {
ret.add(" for(unsigned long i=0; i< " + p.getIdentifier() + ".length(); i++) {");
! ret.add(convertStructParameterFromCorbaToCpp(p,idl_struct, true));
! ret.add(" parameter_" + p.getIdentifier()
! + ".push_back(parameter_" + p.getIdentifier() + "_item);");
ret.add(" }");
}
--- 839,848 ----
if(p.getDirection() != MParameterMode.PARAM_OUT) {
ret.add(" for(unsigned long i=0; i< " + p.getIdentifier() + ".length(); i++) {");
! ret.add(" " + idl_struct.getIdentifier() + " " + CorbaPrefix + p.getIdentifier()
! + " = " + p.getIdentifier() + "[i];");
! ret.add(convertStructParameterFromCorbaToCpp(p,idl_struct,
! CorbaPrefix, CppPrefix));
! ret.add(" parameter_" + p.getIdentifier()
! + ".push_back(" + CppPrefix + p.getIdentifier() + ");");
ret.add(" }");
}
***************
*** 980,984 ****
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCppToCorba(p, idl_struct));
}
else if(idl_type instanceof MAliasDef) {
--- 973,978 ----
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCppToCorba(p, idl_struct,
! "", "parameter_"));
}
else if(idl_type instanceof MAliasDef) {
***************
*** 1021,1025 ****
protected String convertStructParameterFromCppToCorba(MParameterDef p,
! MStructDef idl_struct)
{
MParameterMode direction = p.getDirection();
--- 1015,1021 ----
protected String convertStructParameterFromCppToCorba(MParameterDef p,
! MStructDef idl_struct,
! String CorbaPrefix,
! String CppPrefix)
{
MParameterMode direction = p.getDirection();
***************
*** 1031,1035 ****
}
else if(direction == MParameterMode.PARAM_OUT) {
! ret.add(" " + p.getIdentifier() + " = new " + idl_struct.getIdentifier() + ";");
ItemAccess = "->";
}
--- 1027,1032 ----
}
else if(direction == MParameterMode.PARAM_OUT) {
! ret.add(" " + CorbaPrefix + p.getIdentifier() + " = new "
! + idl_struct.getIdentifier() + ";");
ItemAccess = "->";
}
***************
*** 1046,1052 ****
|| member_idl instanceof MStringDef) {
ret.add(" "
! + p.getIdentifier() + ItemAccess + member.getIdentifier()
+ " = CCM::" + base_type + "_to_CORBA" + base_type
! + "(parameter_" + p.getIdentifier() + "." + member.getIdentifier() + ");");
}
else {
--- 1043,1049 ----
|| member_idl instanceof MStringDef) {
ret.add(" "
! + CorbaPrefix + p.getIdentifier() + ItemAccess + member.getIdentifier()
+ " = CCM::" + base_type + "_to_CORBA" + base_type
! + "(" + CppPrefix + p.getIdentifier() + "." + member.getIdentifier() + ");");
}
else {
***************
*** 1059,1104 ****
}
- protected String convertStructParameterFromCppToCorba2(MParameterDef p,
- MStructDef idl_struct)
- {
- MParameterMode direction = p.getDirection();
- List ret = new ArrayList();
-
- for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
- MFieldDef member = (MFieldDef)members.next();
- MIDLType member_idl = ((MTyped)member).getIdlType();
- String base_type = getBaseIdlType((MTyped)member);
-
- String corba_parameter ="";
- String cpp_parameter = "";
-
- if(direction == MParameterMode.PARAM_IN) {
- return "";
- }
- else if(direction == MParameterMode.PARAM_OUT) {
- corba_parameter = "(*" + p.getIdentifier() + ")[i]";
- cpp_parameter = "parameter_" + p.getIdentifier() + "[i]";
- }
- else {
- corba_parameter = p.getIdentifier() + "[i]";
- cpp_parameter = "parameter_" + p.getIdentifier() + "[i]";
- }
-
- if(member_idl instanceof MPrimitiveDef
- || member_idl instanceof MStringDef) {
- ret.add(" "
- + corba_parameter + "." + member.getIdentifier()
- + " = CCM::" + base_type + "_to_CORBA" + base_type
- + "(" + cpp_parameter + "." + member.getIdentifier() + ");");
- }
- else {
- // all other idl_types
- // TODO
- ret.add("// unhandled idl type in convertStructParameterFromCppToCorba2()");
- }
- }
- return join("\n", ret);
- }
-
protected String convertSequenceParameterFromCppToCorba(MParameterDef p,
MAliasDef alias)
--- 1056,1059 ----
***************
*** 1139,1153 ****
else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
! String item_access = ".";
if(p.getDirection() == MParameterMode.PARAM_OUT) {
ret.add(" " + p.getIdentifier() + " = new " + alias.getIdentifier() + ";");
! item_access = "->";
}
- ret.add(" " + p.getIdentifier() + item_access + "length(parameter_"
- + p.getIdentifier() + ".size());");
-
- ret.add(" for(unsigned long i=0; i< parameter_" + p.getIdentifier() + ".size(); i++) {");
- ret.add(convertStructParameterFromCppToCorba2(p,idl_struct));
- ret.add(" }");
}
else {
--- 1094,1129 ----
else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
! String CorbaPrefix = "CORBA_item_";
! String CppPrefix = "Cpp_item_";
!
if(p.getDirection() == MParameterMode.PARAM_OUT) {
ret.add(" " + p.getIdentifier() + " = new " + alias.getIdentifier() + ";");
! ret.add(" " + p.getIdentifier() + "->length(parameter_"
! + p.getIdentifier() + ".size());");
! ret.add(" for(unsigned long i=0; i< parameter_" + p.getIdentifier()
! + ".size(); i++) {");
! ret.add(" CCM_Local::" + idl_struct.getIdentifier() + " " + CppPrefix
! + p.getIdentifier() + "= parameter_" + p.getIdentifier() + "[i];");
! ret.add(" " + idl_struct.getIdentifier() + "_var " + CorbaPrefix
! + p.getIdentifier() + ";");
! ret.add(convertStructParameterFromCppToCorba(p,idl_struct,CorbaPrefix, CppPrefix));
! ret.add(" (*" + p.getIdentifier() + ")[i] = " + CorbaPrefix
! + p.getIdentifier() + ";");
! ret.add(" }");
! }
! else {
! ret.add(" " + p.getIdentifier() + ".length(parameter_"
! + p.getIdentifier() + ".size());");
! ret.add(" for(unsigned long i=0; i< parameter_" + p.getIdentifier()
! + ".size(); i++) {");
! ret.add(" CCM_Local::" + idl_struct.getIdentifier() + " " + CppPrefix
! + p.getIdentifier() + "= parameter_" + p.getIdentifier() + "[i];");
! ret.add(" " + idl_struct.getIdentifier() + " " + CorbaPrefix
! + p.getIdentifier() + ";");
! ret.add(convertStructParameterFromCppToCorba(p,idl_struct,CorbaPrefix, CppPrefix));
! ret.add(" " + p.getIdentifier() + "[i] = " + CorbaPrefix
! + p.getIdentifier() + ";");
! ret.add(" }");
}
}
else {
***************
*** 1177,1196 ****
"CppRemoteGeneratorImpl.getParameterConvertResult()");
! String ret_string = "";
MIDLType idl_type = op.getIdlType();
if(idl_type instanceof MPrimitiveDef ||
idl_type instanceof MStringDef) {
! ret_string = convertPrimitiveResultFromCppToCorba(op);
}
else if(idl_type instanceof MStructDef) {
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret_string = convertStructResultFromCppToCorba(idl_struct);
}
else if(idl_type instanceof MAliasDef) {
MAliasDef alias = (MAliasDef)idl_type;
if(alias.getIdlType() instanceof MSequenceDef) {
! ret_string = convertSequenceResultFromCppToCorba(alias);
}
else {
--- 1153,1175 ----
"CppRemoteGeneratorImpl.getParameterConvertResult()");
! List ret = new ArrayList();
MIDLType idl_type = op.getIdlType();
if(idl_type instanceof MPrimitiveDef ||
idl_type instanceof MStringDef) {
! ret.add(convertPrimitiveResultFromCppToCorba(op));
}
else if(idl_type instanceof MStructDef) {
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructResultFromCppToCorba(idl_struct,
! "return_value","result"));
! ret.add(" return return_value._retn();");
}
else if(idl_type instanceof MAliasDef) {
MAliasDef alias = (MAliasDef)idl_type;
if(alias.getIdlType() instanceof MSequenceDef) {
! ret.add(convertSequenceResultFromCppToCorba(alias));
! ret.add(" return return_value._retn();");
}
else {
***************
*** 1203,1209 ****
// all other idl_types
// TODO
! ret_string = "// unhandled idl type in convertResultToCorba()";
}
! return ret_string;
}
--- 1182,1188 ----
// all other idl_types
// TODO
! ret.add("// unhandled idl type in convertResultToCorba()");
}
! return join("\n", ret);
}
***************
*** 1221,1230 ****
}
! protected String convertStructResultFromCppToCorba(MStructDef idl_struct)
{
- String ret_string = "";
List ret = new ArrayList();
ret.add(" "
! + idl_struct.getIdentifier() + "_var return_value = new "
+ idl_struct.getIdentifier() + ";");
--- 1200,1210 ----
}
! protected String convertStructResultFromCppToCorba(MStructDef idl_struct,
! String CorbaPrefix,
! String CppPrefix)
{
List ret = new ArrayList();
ret.add(" "
! + idl_struct.getIdentifier() + "_var " + CorbaPrefix + " = new "
+ idl_struct.getIdentifier() + ";");
***************
*** 1237,1243 ****
|| member_idl instanceof MStringDef) {
ret.add(" "
! + "return_value->" + member.getIdentifier()
+ " = CCM::" + base_type + "_to_CORBA" + base_type
! + "(result." + member.getIdentifier() + ");");
}
else {
--- 1217,1223 ----
|| member_idl instanceof MStringDef) {
ret.add(" "
! + CorbaPrefix + "->" + member.getIdentifier()
+ " = CCM::" + base_type + "_to_CORBA" + base_type
! + "(" + CppPrefix + "." + member.getIdentifier() + ");");
}
else {
***************
*** 1247,1276 ****
}
}
- ret.add(" return return_value._retn();");
- return join("\n", ret);
- }
-
- protected String convertStructResultFromCppToCorba2(MStructDef idl_struct)
- {
- String ret_string = "";
- List ret = new ArrayList();
- for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
- MFieldDef member = (MFieldDef)members.next();
- MIDLType member_idl = ((MTyped)member).getIdlType();
- String base_type = getBaseIdlType((MTyped)member);
-
- if(member_idl instanceof MPrimitiveDef
- || member_idl instanceof MStringDef) {
- ret.add(" "
- + "(*return_value)[i]." + member.getIdentifier()
- + " = CCM::" + base_type + "_to_CORBA" + base_type
- + "(result[i]." + member.getIdentifier() + ");");
- }
- else {
- // all other idl_types
- // TODO
- ret.add("// unhandled idl type in convertStructResultFromCppToCorba2()");
- }
- }
return join("\n", ret);
}
--- 1227,1230 ----
***************
*** 1288,1310 ****
+ alias.getIdentifier() + ";");
ret.add(" return_value->length(result.size());");
-
ret.add(" for(unsigned long i=0; i< result.size(); i++) {");
-
ret.add(" (*return_value)[i] = CCM::" + base_type
+ "_to_CORBA" + base_type + "(result[i]);");
ret.add(" }");
- ret.add(" return return_value._retn();");
}
else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
!
ret.add(" " + alias.getIdentifier() + "_var return_value = new "
+ alias.getIdentifier() + ";");
ret.add(" return_value->length(result.size());");
-
ret.add(" for(unsigned long i=0; i< result.size(); i++) {");
! ret.add(convertStructResultFromCppToCorba2(idl_struct));
ret.add(" }");
- ret.add(" return return_value._retn();");
}
else {
--- 1242,1263 ----
+ alias.getIdentifier() + ";");
ret.add(" return_value->length(result.size());");
ret.add(" for(unsigned long i=0; i< result.size(); i++) {");
ret.add(" (*return_value)[i] = CCM::" + base_type
+ "_to_CORBA" + base_type + "(result[i]);");
ret.add(" }");
}
else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
! String CorbaPrefix = "CORBA_item_result";
! String CppPrefix = "Cpp_item_result";
ret.add(" " + alias.getIdentifier() + "_var return_value = new "
+ alias.getIdentifier() + ";");
ret.add(" return_value->length(result.size());");
ret.add(" for(unsigned long i=0; i< result.size(); i++) {");
! ret.add(" CCM_Local::" + idl_struct.getIdentifier() + " "
! + CppPrefix + " = result[i];");
! ret.add(convertStructResultFromCppToCorba(idl_struct,CorbaPrefix, CppPrefix));
! ret.add(" (*return_value)[i] = " + CorbaPrefix + ";");
ret.add(" }");
}
else {
|
|
From: <tei...@us...> - 2003-11-25 16:07:02
|
Update of /cvsroot/ccmtools/ccmtools/UI/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv23128
Modified Files:
ccmtools-c++remote-generate
Log Message:
Now the script generates the test client (_check_*_remote.cc) only if the -d option is set.
Index: ccmtools-c++remote-generate
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/UI/scripts/ccmtools-c++remote-generate,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ccmtools-c++remote-generate 13 Nov 2003 17:55:36 -0000 1.1
--- ccmtools-c++remote-generate 25 Nov 2003 16:06:59 -0000 1.2
***************
*** 106,131 ****
index += 1
! if arg == '-c': CODE_VERSION = sys.argv[index]; index += 1
! elif arg.startswith('--c') and arg.find('=') > 0:
! CODE_VERSION = arg.split('=')[1]
!
! elif arg == '-d' or arg.startswith('--d'): ENABLE_DEBUG = 1
elif arg.startswith('-D'): CODE_DEFINES += ' ' + arg
- elif arg == '-f' or arg.startswith('--f'): FORCE_COPY = 1
elif arg == '-h' or arg.startswith('--h'): print USAGE; sys.exit(0)
- elif arg == '-i': INSTALL_DIR = sys.argv[index]; index += 1
- elif arg.startswith('--i') and arg.find('=') > 0:
- INSTALL_DIR = arg.split('=')[1]
-
elif arg.startswith('-I'): INCLUDE_PATH += ' ' + arg
elif arg == '-p': CCMTOOLS_PACKAGE = sys.argv[index]; index += 1
elif arg.startswith('--pa') and arg.find('=') > 0:
CCMTOOLS_PACKAGE = arg.split('=')[1]
-
- elif arg == '-s': SOURCE_DIR = sys.argv[index]; index += 1
- elif arg.startswith('--s') and arg.find('=') > 0:
- SOURCE_DIR = arg.split('=')[1]
-
- elif arg == '-y' or arg.startswith('--py'): ENABLE_PYTHON_TEST = 1
elif arg == '-V' or arg.startswith('--v'):
os.execlp('ccmtools-generate', 'ccmtools-generate', '--version')
--- 106,116 ----
index += 1
! if arg == '-d' or arg.startswith('--d'): ENABLE_DEBUG = 1
elif arg.startswith('-D'): CODE_DEFINES += ' ' + arg
elif arg == '-h' or arg.startswith('--h'): print USAGE; sys.exit(0)
elif arg.startswith('-I'): INCLUDE_PATH += ' ' + arg
elif arg == '-p': CCMTOOLS_PACKAGE = sys.argv[index]; index += 1
elif arg.startswith('--pa') and arg.find('=') > 0:
CCMTOOLS_PACKAGE = arg.split('=')[1]
elif arg == '-V' or arg.startswith('--v'):
os.execlp('ccmtools-generate', 'ccmtools-generate', '--version')
***************
*** 164,169 ****
cmd = 'ccmtools-generate %s -o %s' % (INCLUDE_PATH, SOURCE_DIR)
idl2cmd = 'ccmtools-generate %s -o %s' % (INCLUDE_PATH, idl2_dir)
- #run_idl_compiler_cmd = 'cd %s; make; cd ../..' % (idl2_dir)
-
if os.system('%s idl2 %s' % (idl2cmd, IDL_FILES)):
--- 149,152 ----
***************
*** 176,189 ****
sys.exit(1)
- print cmd + ' c++remote-test ' + IDL_FILES
- if os.system('%s c++remote-test %s' % (cmd, IDL_FILES)):
- print 'Error generating remote C++ component test.'
- sys.exit(1)
-
if os.system('cd %s; make; cd ../..' % (idl2_dir)):
print 'Error compiling IDL2 files.'
sys.exit(1)
!
--- 159,171 ----
sys.exit(1)
if os.system('cd %s; make; cd ../..' % (idl2_dir)):
print 'Error compiling IDL2 files.'
sys.exit(1)
! if ENABLE_DEBUG:
! print cmd + ' c++remote-test ' + IDL_FILES
! if os.system('%s c++remote-test %s' % (cmd, IDL_FILES)):
! print 'Error generating remote C++ component test.'
! sys.exit(1)
|
|
From: <tei...@us...> - 2003-11-21 14:55:02
|
Update of /cvsroot/ccmtools/ccmtools/CppGenerator
In directory sc8-pr-cvs1:/tmp/cvs-serv8088
Modified Files:
CppRemoteGeneratorImpl.java
Log Message:
The current (hack) version of the remote generator can handle basic types, structs of basic types, sequences of basic types and sequences of structs of basic types
Index: CppRemoteGeneratorImpl.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteGeneratorImpl.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** CppRemoteGeneratorImpl.java 20 Nov 2003 16:37:25 -0000 1.26
--- CppRemoteGeneratorImpl.java 21 Nov 2003 14:54:58 -0000 1.27
***************
*** 737,741 ****
MAliasDef alias = (MAliasDef)idl_type;
if(alias.getIdlType() instanceof MSequenceDef) {
-
ret.add(convertSequenceParameterFromCorbaToCpp(p, alias));
}
--- 737,740 ----
***************
*** 826,839 ****
MSequenceDef idl_sequence = (MSequenceDef)alias.getIdlType();
MIDLType sequence_type = ((MTyped)idl_sequence).getIdlType();
List ret = new ArrayList();
! if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
! ret.add(" CCM_Local::" + alias.getIdentifier() + " parameter_"
! + p.getIdentifier() + ";");
!
! if(p.getDirection() != MParameterMode.PARAM_OUT) {
! ret.add(" for(unsigned long i=0; i<" + p.getIdentifier() + ".length(); i++) {");
ret.add(convertStructParameterFromCorbaToCpp(p,idl_struct, true));
ret.add(" parameter_" + p.getIdentifier()
--- 825,852 ----
MSequenceDef idl_sequence = (MSequenceDef)alias.getIdlType();
MIDLType sequence_type = ((MTyped)idl_sequence).getIdlType();
+ String base_type = getBaseIdlType((MTyped)idl_sequence);
List ret = new ArrayList();
! if(sequence_type instanceof MPrimitiveDef
! || sequence_type instanceof MStringDef) {
! ret.add(" CCM_Local::" + alias.getIdentifier() + " parameter_"
! + p.getIdentifier() + ";");
!
! if(p.getDirection() != MParameterMode.PARAM_OUT) {
! ret.add(" for(unsigned long i=0; i< " + p.getIdentifier() + ".length(); i++) {");
! ret.add(" parameter_" + p.getIdentifier()
! + ".push_back(CCM::CORBA" + base_type + "_to_" + base_type
! + "(" + p.getIdentifier() + "[i]));");
! ret.add(" }");
! }
! }
! else if(sequence_type instanceof MStructDef) {
MStructDef idl_struct = (MStructDef)sequence_type;
! ret.add(" CCM_Local::" + alias.getIdentifier() + " parameter_"
! + p.getIdentifier() + ";");
!
! if(p.getDirection() != MParameterMode.PARAM_OUT) {
! ret.add(" for(unsigned long i=0; i< " + p.getIdentifier() + ".length(); i++) {");
ret.add(convertStructParameterFromCorbaToCpp(p,idl_struct, true));
ret.add(" parameter_" + p.getIdentifier()
***************
*** 847,853 ****
return "// unhandled idl type in convertSequenceParameterFromCorbaToCpp()";
}
!
!
! return join("\n", ret) + "\n";
}
--- 860,864 ----
return "// unhandled idl type in convertSequenceParameterFromCorbaToCpp()";
}
! return join("\n", ret);
}
***************
*** 880,883 ****
--- 891,905 ----
ret_string = " CCM_Local::" + idl_struct.getIdentifier() + " result;";
}
+ else if(idl_type instanceof MAliasDef) {
+ MAliasDef alias = (MAliasDef)idl_type;
+ if(alias.getIdlType() instanceof MSequenceDef) {
+ ret_string = " CCM_Local::" + alias.getIdentifier() + " result;";
+ }
+ else {
+ // all other idl alias types
+ // TODO
+ return "// unhandled idl alias type in declareCppResult()";
+ }
+ }
else {
// all other idl_types
***************
*** 911,916 ****
if(idl_type instanceof MPrimitiveDef
|| idl_type instanceof MStringDef
! || idl_type instanceof MStructDef) {
!
ret_string = " " + " result = local_adapter->"
+ op.getIdentifier() + "(";
--- 933,938 ----
if(idl_type instanceof MPrimitiveDef
|| idl_type instanceof MStringDef
! || idl_type instanceof MStructDef
! || idl_type instanceof MAliasDef) {
ret_string = " " + " result = local_adapter->"
+ op.getIdentifier() + "(";
***************
*** 933,936 ****
--- 955,969 ----
+
+ /**
+ * Create the code for the remote facet and supports adapter.
+ *
+ * The %(MParameterDefConvertParameterFromCppToCorba)s in the template
+ * %(MOperstaionFacetAdapterImpl)s tag forces a call to this method
+ * via getTwoStepVariables().
+ *
+ * @param op Reference to an OperationDef element in the CCM model.
+ * @return Generated code as a string.
+ **/
protected String convertParameterToCorba(MOperationDef op)
{
***************
*** 949,953 ****
--- 982,998 ----
ret.add(convertStructParameterFromCppToCorba(p, idl_struct));
}
+ else if(idl_type instanceof MAliasDef) {
+ MAliasDef alias = (MAliasDef)idl_type;
+ if(alias.getIdlType() instanceof MSequenceDef) {
+ ret.add(convertSequenceParameterFromCppToCorba(p, alias));
+ }
+ else {
+ // all other alias types
+ // TODO
+ return "// unhandled idl alias type in convertParameterToCorba()";
+ }
+ }
else {
+
// all other idl types
// TODO
***************
*** 958,962 ****
}
-
protected String convertPrimitiveParameterFromCppToCorba(MParameterDef p)
{
--- 1003,1006 ----
***************
*** 976,985 ****
}
!
! protected String convertStructParameterFromCppToCorba(MParameterDef p, MStructDef idl_struct)
{
MParameterMode direction = p.getDirection();
String ItemAccess="";
!
List ret = new ArrayList();
if(direction == MParameterMode.PARAM_IN) {
--- 1020,1029 ----
}
! protected String convertStructParameterFromCppToCorba(MParameterDef p,
! MStructDef idl_struct)
{
MParameterMode direction = p.getDirection();
String ItemAccess="";
!
List ret = new ArrayList();
if(direction == MParameterMode.PARAM_IN) {
***************
*** 1009,1013 ****
// all other idl_types
// TODO
! ret.add("// unhandled idl type in convertStructFromCppToCorba()");
}
}
--- 1053,1099 ----
// all other idl_types
// TODO
! ret.add("// unhandled idl type in convertStructParameterFromCppToCorba()");
! }
! }
! return join("\n", ret);
! }
!
! protected String convertStructParameterFromCppToCorba2(MParameterDef p,
! MStructDef idl_struct)
! {
! MParameterMode direction = p.getDirection();
! List ret = new ArrayList();
!
! for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
! MFieldDef member = (MFieldDef)members.next();
! MIDLType member_idl = ((MTyped)member).getIdlType();
! String base_type = getBaseIdlType((MTyped)member);
!
! String corba_parameter ="";
! String cpp_parameter = "";
!
! if(direction == MParameterMode.PARAM_IN) {
! return "";
! }
! else if(direction == MParameterMode.PARAM_OUT) {
! corba_parameter = "(*" + p.getIdentifier() + ")[i]";
! cpp_parameter = "parameter_" + p.getIdentifier() + "[i]";
! }
! else {
! corba_parameter = p.getIdentifier() + "[i]";
! cpp_parameter = "parameter_" + p.getIdentifier() + "[i]";
! }
!
! if(member_idl instanceof MPrimitiveDef
! || member_idl instanceof MStringDef) {
! ret.add(" "
! + corba_parameter + "." + member.getIdentifier()
! + " = CCM::" + base_type + "_to_CORBA" + base_type
! + "(" + cpp_parameter + "." + member.getIdentifier() + ");");
! }
! else {
! // all other idl_types
! // TODO
! ret.add("// unhandled idl type in convertStructParameterFromCppToCorba2()");
}
}
***************
*** 1015,1018 ****
--- 1101,1164 ----
}
+ protected String convertSequenceParameterFromCppToCorba(MParameterDef p,
+ MAliasDef alias)
+ {
+ MSequenceDef idl_sequence = (MSequenceDef)alias.getIdlType();
+ MIDLType sequence_type = ((MTyped)idl_sequence).getIdlType();
+ String base_type = getBaseIdlType((MTyped)idl_sequence);
+ List ret = new ArrayList();
+
+ if(p.getDirection() == MParameterMode.PARAM_IN) {
+ return "";
+ }
+
+ if(sequence_type instanceof MPrimitiveDef
+ || sequence_type instanceof MStringDef) {
+ if(p.getDirection() == MParameterMode.PARAM_OUT) {
+ ret.add(" " + p.getIdentifier() + " = new " + alias.getIdentifier() + ";");
+ ret.add(" " + p.getIdentifier() + "->length(parameter_"
+ + p.getIdentifier() + ".size());");
+ ret.add(" for(unsigned long i=0; i< parameter_" + p.getIdentifier()
+ + ".size(); i++) {");
+ ret.add(" (*" + p.getIdentifier() + ")[i] = CCM::"
+ + base_type + "_to_CORBA" + base_type + "(parameter_" + p.getIdentifier()
+ + "[i]);");
+ ret.add(" }");
+ }
+ else {
+ ret.add(" " + p.getIdentifier() + ".length(parameter_"
+ + p.getIdentifier() + ".size());");
+ ret.add(" for(unsigned long i=0; i< parameter_" + p.getIdentifier()
+ + ".size(); i++) {");
+ ret.add(" " + p.getIdentifier() + "[i] = CCM::"
+ + base_type + "_to_CORBA" + base_type + "(parameter_" + p.getIdentifier()
+ + "[i]);");
+ ret.add(" }");
+ }
+ }
+ else if(sequence_type instanceof MStructDef) {
+ MStructDef idl_struct = (MStructDef)sequence_type;
+ String item_access = ".";
+ if(p.getDirection() == MParameterMode.PARAM_OUT) {
+ ret.add(" " + p.getIdentifier() + " = new " + alias.getIdentifier() + ";");
+ item_access = "->";
+ }
+ ret.add(" " + p.getIdentifier() + item_access + "length(parameter_"
+ + p.getIdentifier() + ".size());");
+
+ ret.add(" for(unsigned long i=0; i< parameter_" + p.getIdentifier() + ".size(); i++) {");
+ ret.add(convertStructParameterFromCppToCorba2(p,idl_struct));
+ ret.add(" }");
+ }
+ else {
+ // all other idl types
+ // TODO
+ return "// unhandled idl type in convertSequenceParameterFromCppToCorba()";
+ }
+ return join("\n", ret) + "\n";
+ }
+
+
+
/**
***************
*** 1043,1046 ****
--- 1189,1203 ----
ret_string = convertStructResultFromCppToCorba(idl_struct);
}
+ else if(idl_type instanceof MAliasDef) {
+ MAliasDef alias = (MAliasDef)idl_type;
+ if(alias.getIdlType() instanceof MSequenceDef) {
+ ret_string = convertSequenceResultFromCppToCorba(alias);
+ }
+ else {
+ // all other alias types
+ // TODO
+ return "// unhandled idl alias type in convertResultToCorba()";
+ }
+ }
else {
// all other idl_types
***************
*** 1093,1096 ****
--- 1250,1320 ----
return join("\n", ret);
}
+
+ protected String convertStructResultFromCppToCorba2(MStructDef idl_struct)
+ {
+ String ret_string = "";
+ List ret = new ArrayList();
+ for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
+ MFieldDef member = (MFieldDef)members.next();
+ MIDLType member_idl = ((MTyped)member).getIdlType();
+ String base_type = getBaseIdlType((MTyped)member);
+
+ if(member_idl instanceof MPrimitiveDef
+ || member_idl instanceof MStringDef) {
+ ret.add(" "
+ + "(*return_value)[i]." + member.getIdentifier()
+ + " = CCM::" + base_type + "_to_CORBA" + base_type
+ + "(result[i]." + member.getIdentifier() + ");");
+ }
+ else {
+ // all other idl_types
+ // TODO
+ ret.add("// unhandled idl type in convertStructResultFromCppToCorba2()");
+ }
+ }
+ return join("\n", ret);
+ }
+
+ protected String convertSequenceResultFromCppToCorba(MAliasDef alias)
+ {
+ MSequenceDef idl_sequence = (MSequenceDef)alias.getIdlType();
+ MIDLType sequence_type = ((MTyped)idl_sequence).getIdlType();
+ String base_type = getBaseIdlType((MTyped)idl_sequence);
+ List ret = new ArrayList();
+
+ if(sequence_type instanceof MPrimitiveDef
+ || sequence_type instanceof MStringDef) {
+ ret.add(" " + alias.getIdentifier() + "_var return_value = new "
+ + alias.getIdentifier() + ";");
+ ret.add(" return_value->length(result.size());");
+
+ ret.add(" for(unsigned long i=0; i< result.size(); i++) {");
+
+ ret.add(" (*return_value)[i] = CCM::" + base_type
+ + "_to_CORBA" + base_type + "(result[i]);");
+ ret.add(" }");
+ ret.add(" return return_value._retn();");
+ }
+ else if(sequence_type instanceof MStructDef) {
+ MStructDef idl_struct = (MStructDef)sequence_type;
+
+ ret.add(" " + alias.getIdentifier() + "_var return_value = new "
+ + alias.getIdentifier() + ";");
+ ret.add(" return_value->length(result.size());");
+
+ ret.add(" for(unsigned long i=0; i< result.size(); i++) {");
+ ret.add(convertStructResultFromCppToCorba2(idl_struct));
+ ret.add(" }");
+ ret.add(" return return_value._retn();");
+ }
+ else {
+ // all other idl types
+ // TODO
+ return "// unhandled idl type in convertSequenceResultFromCppToCorba()";
+ }
+ return join("\n", ret);
+ }
+
+
|
|
From: <lmj...@us...> - 2003-11-20 19:17:01
|
Update of /cvsroot/ccmtools/ccmtools/IDL3Parser
In directory sc8-pr-cvs1:/tmp/cvs-serv8284/IDL3Parser
Modified Files:
ParserManager.java
Log Message:
+ further fixes to get C++ tests working again
Index: ParserManager.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/IDL3Parser/ParserManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ParserManager.java 20 Nov 2003 08:06:59 -0000 1.7
--- ParserManager.java 20 Nov 2003 19:16:42 -0000 1.8
***************
*** 165,168 ****
--- 165,169 ----
setOriginalFile(filename);
+ setSourceFile(filename);
symbolTable.pushFile();
|
|
From: <tei...@us...> - 2003-11-20 16:38:03
|
Update of /cvsroot/ccmtools/ccmtools/CppGenerator
In directory sc8-pr-cvs1:/tmp/cvs-serv12541
Modified Files:
CppRemoteGeneratorImpl.java
Log Message:
started with generation of sequence adapters
Index: CppRemoteGeneratorImpl.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteGeneratorImpl.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** CppRemoteGeneratorImpl.java 20 Nov 2003 14:28:49 -0000 1.25
--- CppRemoteGeneratorImpl.java 20 Nov 2003 16:37:25 -0000 1.26
***************
*** 732,736 ****
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCorbaToCpp(p, idl_struct));
}
else {
--- 732,748 ----
MTypedefDef idl_typedef = (MTypedefDef)idl_type;
MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCorbaToCpp(p, idl_struct, false));
! }
! else if(idl_type instanceof MAliasDef) {
! MAliasDef alias = (MAliasDef)idl_type;
! if(alias.getIdlType() instanceof MSequenceDef) {
!
! ret.add(convertSequenceParameterFromCorbaToCpp(p, alias));
! }
! else {
! // all other alias types
! // TODO
! return "// unhandled idl alias type in convertParameterToCpp()";
! }
}
else {
***************
*** 743,746 ****
--- 755,760 ----
}
+
+
protected String convertPrimitiveParameterFromCorbaToCpp(MParameterDef p)
{
***************
*** 762,773 ****
}
! protected String convertStructParameterFromCorbaToCpp(MParameterDef p, MStructDef idl_struct)
{
MParameterMode direction = p.getDirection();
List ret = new ArrayList();
! ret.add(" CCM_Local::"
+ idl_struct.getIdentifier() + " parameter_"
! + p.getIdentifier() + ";");
if(direction != MParameterMode.PARAM_OUT) {
--- 776,798 ----
}
! protected String convertStructParameterFromCorbaToCpp(MParameterDef p,
! MStructDef idl_struct,
! boolean isSequenceItem)
{
MParameterMode direction = p.getDirection();
+
+ String item ="";
+ String index = "";
+ String indent = "";
+ if(isSequenceItem) {
+ item = "_item";
+ index = "[i]";
+ indent = " ";
+ }
List ret = new ArrayList();
! ret.add(indent + " CCM_Local::"
+ idl_struct.getIdentifier() + " parameter_"
! + p.getIdentifier() + item +";");
if(direction != MParameterMode.PARAM_OUT) {
***************
*** 779,791 ****
if(member_idl instanceof MPrimitiveDef
|| member_idl instanceof MStringDef) {
! ret.add(" "
! + "parameter_" + p.getIdentifier() + "." + member.getIdentifier()
! + " = CCM::CORBA" + base_type + "_to_" + base_type
! + "(" + p.getIdentifier() + "." + member.getIdentifier() + ");");
}
else {
// all other idl_types
// TODO
! ret.add("// unhandled idl type in convertStructFromCorbaToCpp()");
}
}
--- 804,818 ----
if(member_idl instanceof MPrimitiveDef
|| member_idl instanceof MStringDef) {
! ret.add(indent + " "
! + "parameter_" + p.getIdentifier() + item + "."
! + member.getIdentifier() + " = CCM::CORBA"
! + base_type + "_to_" + base_type + "("
! + p.getIdentifier() + index + "."
! + member.getIdentifier() + ");");
}
else {
// all other idl_types
// TODO
! ret.add(indent + " // unhandled idl type in convertStructFromCorbaToCpp()");
}
}
***************
*** 794,797 ****
--- 821,854 ----
}
+ protected String convertSequenceParameterFromCorbaToCpp(MParameterDef p,
+ MAliasDef alias)
+ {
+ MSequenceDef idl_sequence = (MSequenceDef)alias.getIdlType();
+ MIDLType sequence_type = ((MTyped)idl_sequence).getIdlType();
+ List ret = new ArrayList();
+
+ if(sequence_type instanceof MStructDef) {
+ MStructDef idl_struct = (MStructDef)sequence_type;
+
+ ret.add(" CCM_Local::" + alias.getIdentifier() + " parameter_"
+ + p.getIdentifier() + ";");
+
+ if(p.getDirection() != MParameterMode.PARAM_OUT) {
+ ret.add(" for(unsigned long i=0; i<" + p.getIdentifier() + ".length(); i++) {");
+ ret.add(convertStructParameterFromCorbaToCpp(p,idl_struct, true));
+ ret.add(" parameter_" + p.getIdentifier()
+ + ".push_back(parameter_" + p.getIdentifier() + "_item);");
+ ret.add(" }");
+ }
+ }
+ else {
+ // all other idl types
+ // TODO
+ return "// unhandled idl type in convertSequenceParameterFromCorbaToCpp()";
+ }
+
+
+ return join("\n", ret) + "\n";
+ }
/**
|
|
From: <tei...@us...> - 2003-11-20 14:29:28
|
Update of /cvsroot/ccmtools/ccmtools/CppGenerator
In directory sc8-pr-cvs1:/tmp/cvs-serv17717
Modified Files:
CppRemoteGeneratorImpl.java
Log Message:
added struct adapter generation
Index: CppRemoteGeneratorImpl.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteGeneratorImpl.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** CppRemoteGeneratorImpl.java 18 Nov 2003 17:09:52 -0000 1.24
--- CppRemoteGeneratorImpl.java 20 Nov 2003 14:28:49 -0000 1.25
***************
*** 318,329 ****
vars.put("MParameterDefConvertResult" , convertResultToCorba(operation));
vars.put("MParameterDefConvertExceptions", convertExceptionsToCorba(operation));
// Used for receptacle adapter generation
! vars.put("MParameterDefConvertParameterToCorba",convertParameterToCorba(operation));
! vars.put("MParameterDefDeclareCorbaResult" ,declareCorbaResult(operation));
! vars.put("MParameterDefConvertMethodToCorba" ,
! convertMethodToCorba(operation, container.getIdentifier()));
! vars.put("MParameterDefConvertResultToCpp" ,convertResultToCpp(operation));
! vars.put("MParameterDefConvertExceptionsToCpp" ,convertExceptionsToCpp(operation));
if (! lang_type.equals("void"))
--- 318,334 ----
vars.put("MParameterDefConvertResult" , convertResultToCorba(operation));
vars.put("MParameterDefConvertExceptions", convertExceptionsToCorba(operation));
+ vars.put("MParameterDefConvertParameterFromCppToCorba", convertParameterToCorba(operation));
// Used for receptacle adapter generation
! vars.put("MParameterDefConvertReceptacleParameterToCorba",
! convertReceptacleParameterToCorba(operation));
! vars.put("MParameterDefDeclareReceptacleCorbaResult",
! declareReceptacleCorbaResult(operation));
! vars.put("MParameterDefConvertReceptacleMethodToCorba" ,
! convertReceptacleMethodToCorba(operation, container.getIdentifier()));
! vars.put("MParameterDefConvertReceptacleResultToCpp",
! convertReceptacleResultToCpp(operation));
! vars.put("MParameterDefConvertReceptacleExceptionsToCpp",
! convertReceptacleExceptionsToCpp(operation));
if (! lang_type.equals("void"))
***************
*** 649,653 ****
//====================================================================
! // Handle the CORBA to C++ andption on operation level
//====================================================================
--- 654,658 ----
//====================================================================
! // Handle the CORBA to C++ adption on operation level
//====================================================================
***************
*** 718,745 ****
for (Iterator params = op.getParameters().iterator(); params.hasNext(); ) {
MParameterDef p = (MParameterDef) params.next();
- MParameterMode direction = p.getDirection();
MIDLType idl_type = ((MTyped)p).getIdlType();
- String base_type = getBaseIdlType(p);
- String cpp_type = (String)language_mappings.get(base_type);
! if(idl_type instanceof MPrimitiveDef ||
! idl_type instanceof MStringDef) {
! if(direction == MParameterMode.PARAM_OUT) {
! ret.add(" "
! + cpp_type + " parameter_"
! + p.getIdentifier() + ";");
! // Note that the out parameters must not be converted to C++
! }
! else {
! ret.add(" "
! + cpp_type + " parameter_"
! + p.getIdentifier()
! + " = CCM::CORBA" + base_type + "_to_" +
! base_type + "(" +p.getIdentifier() + ");");
! }
}
! else { // MStructDef, MAliasDef, ...
// TODO
! return "// complex type parameter";
}
}
--- 723,741 ----
for (Iterator params = op.getParameters().iterator(); params.hasNext(); ) {
MParameterDef p = (MParameterDef) params.next();
MIDLType idl_type = ((MTyped)p).getIdlType();
! if(idl_type instanceof MPrimitiveDef
! || idl_type instanceof MStringDef) {
! ret.add(convertPrimitiveParameterFromCorbaToCpp(p));
}
! else if(idl_type instanceof MStructDef) {
! MTypedefDef idl_typedef = (MTypedefDef)idl_type;
! MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCorbaToCpp(p, idl_struct));
! }
! else {
! // all other idl types
// TODO
! return "// unhandled idl type in convertParameterToCpp()";
}
}
***************
*** 747,750 ****
--- 743,798 ----
}
+ protected String convertPrimitiveParameterFromCorbaToCpp(MParameterDef p)
+ {
+ MParameterMode direction = p.getDirection();
+ String base_type = getBaseIdlType(p);
+ String cpp_type = (String)language_mappings.get(base_type);
+
+ List ret = new ArrayList();
+ ret.add(" "
+ + cpp_type + " parameter_"
+ + p.getIdentifier() + ";");
+
+ if(direction != MParameterMode.PARAM_OUT) {
+ ret.add(" " + "parameter_" + p.getIdentifier()
+ + " = CCM::CORBA" + base_type + "_to_" +
+ base_type + "(" +p.getIdentifier() + ");");
+ }
+ return join("\n", ret) + "\n";
+ }
+
+ protected String convertStructParameterFromCorbaToCpp(MParameterDef p, MStructDef idl_struct)
+ {
+ MParameterMode direction = p.getDirection();
+
+ List ret = new ArrayList();
+ ret.add(" CCM_Local::"
+ + idl_struct.getIdentifier() + " parameter_"
+ + p.getIdentifier() + ";");
+
+ if(direction != MParameterMode.PARAM_OUT) {
+ for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
+ MFieldDef member = (MFieldDef)members.next();
+ MIDLType member_idl = ((MTyped)member).getIdlType();
+ String base_type = getBaseIdlType((MTyped)member);
+
+ if(member_idl instanceof MPrimitiveDef
+ || member_idl instanceof MStringDef) {
+ ret.add(" "
+ + "parameter_" + p.getIdentifier() + "." + member.getIdentifier()
+ + " = CCM::CORBA" + base_type + "_to_" + base_type
+ + "(" + p.getIdentifier() + "." + member.getIdentifier() + ");");
+ }
+ else {
+ // all other idl_types
+ // TODO
+ ret.add("// unhandled idl type in convertStructFromCorbaToCpp()");
+ }
+ }
+ }
+ return join("\n", ret) + "\n";
+ }
+
+
/**
* Create the code that declares the variable (C++ type and name) in which the
***************
*** 769,778 ****
ret_string = " " + (String)language_mappings.get((String)getBaseIdlType(op)) +
" result;";
- return ret_string;
}
! else { // MStructDef, MAliasDef, ...
! // TODO
! return "// complex type result declaration";
}
}
--- 817,832 ----
ret_string = " " + (String)language_mappings.get((String)getBaseIdlType(op)) +
" result;";
}
! else if(idl_type instanceof MStructDef) {
! MTypedefDef idl_typedef = (MTypedefDef)idl_type;
! MStructDef idl_struct = (MStructDef)idl_typedef;
! ret_string = " CCM_Local::" + idl_struct.getIdentifier() + " result;";
}
+ else {
+ // all other idl_types
+ // TODO
+ ret_string = "// unhandled idl type in declareCppResult()";
+ }
+ return ret_string;
}
***************
*** 798,808 ****
MIDLType idl_type = op.getIdlType();
! if(idl_type instanceof MPrimitiveDef ||
! idl_type instanceof MStringDef) {
! ret_string = " "
! + " result = local_adapter->"
+ op.getIdentifier() + "(";
!
! List ret = new ArrayList();
for (Iterator params = op.getParameters().iterator(); params.hasNext(); ) {
MParameterDef p = (MParameterDef) params.next();
--- 852,863 ----
MIDLType idl_type = op.getIdlType();
! if(idl_type instanceof MPrimitiveDef
! || idl_type instanceof MStringDef
! || idl_type instanceof MStructDef) {
!
! ret_string = " " + " result = local_adapter->"
+ op.getIdentifier() + "(";
!
! List ret = new ArrayList();
for (Iterator params = op.getParameters().iterator(); params.hasNext(); ) {
MParameterDef p = (MParameterDef) params.next();
***************
*** 812,820 ****
return ret_string + join(", ", ret) + ");";
}
! else { // MStructDef, MAliasDef, ...
// TODO
! return "// complex type method call";
}
}
--- 867,959 ----
return ret_string + join(", ", ret) + ");";
}
! else {
! // all other idl_types
! // TODO
! return "// unhandled idl type in convertMethodToCpp()";
! }
! }
!
!
!
! protected String convertParameterToCorba(MOperationDef op)
! {
! List ret = new ArrayList();
! for (Iterator params = op.getParameters().iterator(); params.hasNext(); ) {
! MParameterDef p = (MParameterDef) params.next();
! MIDLType idl_type = ((MTyped)p).getIdlType();
!
! if(idl_type instanceof MPrimitiveDef
! || idl_type instanceof MStringDef) {
! ret.add(convertPrimitiveParameterFromCppToCorba(p));
! }
! else if(idl_type instanceof MStructDef) {
! MTypedefDef idl_typedef = (MTypedefDef)idl_type;
! MStructDef idl_struct = (MStructDef)idl_typedef;
! ret.add(convertStructParameterFromCppToCorba(p, idl_struct));
! }
! else {
! // all other idl types
// TODO
! return "// unhandled idl type in convertParameterToCorba()";
! }
! }
! return join("\n", ret) + "\n";
! }
!
!
! protected String convertPrimitiveParameterFromCppToCorba(MParameterDef p)
! {
! List ret = new ArrayList();
! MParameterMode direction = p.getDirection();
! if(direction != MParameterMode.PARAM_IN) {
! String parameter_base_type = getBaseIdlType(p);
! String parameter_cpp_type = (String)language_mappings.get(parameter_base_type);
! ret.add(" "
! + p.getIdentifier()
! + " = CCM::" + parameter_base_type
! + "_to_CORBA" + parameter_base_type
! + "(parameter_" +
! p.getIdentifier() + ");");
! }
! return join("\n", ret);
! }
!
+ protected String convertStructParameterFromCppToCorba(MParameterDef p, MStructDef idl_struct)
+ {
+ MParameterMode direction = p.getDirection();
+ String ItemAccess="";
+
+ List ret = new ArrayList();
+ if(direction == MParameterMode.PARAM_IN) {
+ return "";
}
+ else if(direction == MParameterMode.PARAM_OUT) {
+ ret.add(" " + p.getIdentifier() + " = new " + idl_struct.getIdentifier() + ";");
+ ItemAccess = "->";
+ }
+ else if(direction == MParameterMode.PARAM_INOUT) {
+ ItemAccess = ".";
+ }
+
+ for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
+ MFieldDef member = (MFieldDef)members.next();
+ MIDLType member_idl = ((MTyped)member).getIdlType();
+ String base_type = getBaseIdlType((MTyped)member);
+
+ if(member_idl instanceof MPrimitiveDef
+ || member_idl instanceof MStringDef) {
+ ret.add(" "
+ + p.getIdentifier() + ItemAccess + member.getIdentifier()
+ + " = CCM::" + base_type + "_to_CORBA" + base_type
+ + "(parameter_" + p.getIdentifier() + "." + member.getIdentifier() + ");");
+ }
+ else {
+ // all other idl_types
+ // TODO
+ ret.add("// unhandled idl type in convertStructFromCppToCorba()");
+ }
+ }
+ return join("\n", ret);
}
***************
*** 840,873 ****
if(idl_type instanceof MPrimitiveDef ||
idl_type instanceof MStringDef) {
! String base_type = getBaseIdlType(op);
! List ret = new ArrayList();
! // Convert the inout and out parameters
! for (Iterator params = op.getParameters().iterator(); params.hasNext(); ) {
! MParameterDef p = (MParameterDef) params.next();
! MParameterMode direction = p.getDirection();
! if(direction != MParameterMode.PARAM_IN) {
! String parameter_base_type = getBaseIdlType(p);
! String parameter_cpp_type = (String)language_mappings.get(parameter_base_type);
! ret.add(" "
! + p.getIdentifier()
! + "= CCM::" + parameter_base_type
! + "_to_CORBA" + parameter_base_type
! + "(parameter_" +
! p.getIdentifier() + ");");
! }
! }
! ret_string = join("\n", ret) + "\n";
! // Convert the result iff the result type is not void
! if(!base_type.equals("void")) {
! ret_string += " return CCM::" + base_type
! + "_to_CORBA" + base_type + "(result);";
}
! return ret_string;
! }
! else { // MStructDef, MAliasDef, ...
// TODO
! return "// complex type convert result ";
! }
}
--- 979,1038 ----
if(idl_type instanceof MPrimitiveDef ||
idl_type instanceof MStringDef) {
! ret_string = convertPrimitiveResultFromCppToCorba(op);
! }
! else if(idl_type instanceof MStructDef) {
! MTypedefDef idl_typedef = (MTypedefDef)idl_type;
! MStructDef idl_struct = (MStructDef)idl_typedef;
! ret_string = convertStructResultFromCppToCorba(idl_struct);
! }
! else {
! // all other idl_types
! // TODO
! ret_string = "// unhandled idl type in convertResultToCorba()";
! }
! return ret_string;
! }
!
! protected String convertPrimitiveResultFromCppToCorba(MOperationDef op)
! {
! String base_type = getBaseIdlType(op);
! String ret_string = "";
!
! // Convert the result iff the result type is not void
! if(!base_type.equals("void")) {
! ret_string = " return CCM::" + base_type
! + "_to_CORBA" + base_type + "(result);";
! }
! return ret_string;
! }
!
! protected String convertStructResultFromCppToCorba(MStructDef idl_struct)
! {
! String ret_string = "";
! List ret = new ArrayList();
! ret.add(" "
! + idl_struct.getIdentifier() + "_var return_value = new "
! + idl_struct.getIdentifier() + ";");
!
! for (Iterator members = idl_struct.getMembers().iterator(); members.hasNext(); ) {
! MFieldDef member = (MFieldDef)members.next();
! MIDLType member_idl = ((MTyped)member).getIdlType();
! String base_type = getBaseIdlType((MTyped)member);
! if(member_idl instanceof MPrimitiveDef
! || member_idl instanceof MStringDef) {
! ret.add(" "
! + "return_value->" + member.getIdentifier()
! + " = CCM::" + base_type + "_to_CORBA" + base_type
! + "(result." + member.getIdentifier() + ");");
}
! else {
! // all other idl_types
// TODO
! ret.add("// unhandled idl type in convertStructResultFromCorbaToCpp()");
! }
! }
! ret.add(" return return_value._retn();");
! return join("\n", ret);
}
***************
*** 911,925 ****
/**
* Creates code that converts the local C++ parameters to CORBA types.
* Note that only the in and inout parameters are converted.
*
! * The %(MParameterDefConvertParameterToCorba)s tag forces a call to this method
! * via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertParameterToCorba(MOperationDef op)
{
Debug.println(Debug.METHODS,
--- 1076,1094 ----
+
+
+
+
/**
* Creates code that converts the local C++ parameters to CORBA types.
* Note that only the in and inout parameters are converted.
*
! * The %(MParameterDefConvertReceptacleParameterToCorba)s tag forces a
! * call to this method via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertReceptacleParameterToCorba(MOperationDef op)
{
Debug.println(Debug.METHODS,
***************
*** 953,966 ****
/**
! * Create the code that declases the variable (CORBA type and name) in which the
! * result value will be stored.
*
! * The %(MParameterDefDeclareCorbaResult)s tag forces a call to this method
! * via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String declareCorbaResult(MOperationDef op)
{
Debug.println(Debug.METHODS,
--- 1122,1135 ----
/**
! * Create the code that declases the variable (CORBA type and name) in
! * which the result value will be stored.
*
! * The %(MParameterDefDeclareReceptacleCorbaResult)s tag forces a call to
! * this method via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String declareReceptacleCorbaResult(MOperationDef op)
{
Debug.println(Debug.METHODS,
***************
*** 983,993 ****
* CORBA parameters.
*
! * The %(MParameterDefConvertMethodToCorba)s tag forces a call to this method
! * via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertMethodToCorba(MOperationDef op, String receptacleName)
{
Debug.println(Debug.METHODS,
--- 1152,1162 ----
* CORBA parameters.
*
! * The %(MParameterDefConvertReceptacleMethodToCorba)s tag forces a call
! * to this method via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertReceptacleMethodToCorba(MOperationDef op, String receptacleName)
{
Debug.println(Debug.METHODS,
***************
*** 1019,1029 ****
* and out parameters from CORBA to local C++ types.
*
! * The %(MParameterDefConvertResultToCpp)s tag forces a call to this method
! * via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertResultToCpp(MOperationDef op)
{
Debug.println(Debug.METHODS,
--- 1188,1198 ----
* and out parameters from CORBA to local C++ types.
*
! * The %(MParameterDefConvertReceptacleResultToCpp)s tag forces a call
! * to this method via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertReceptacleResultToCpp(MOperationDef op)
{
Debug.println(Debug.METHODS,
***************
*** 1071,1085 ****
* //...
* }
! * %(MParameterDefConvertExceptionsToCpp)s
* catch(...) {
* throw;
* }
! * The %(MParameterDefConvertExceptionsToCpp)s tag forces a call to this method
! * via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertExceptionsToCpp(MOperationDef op)
{
Debug.println(Debug.METHODS,
--- 1240,1254 ----
* //...
* }
! * %(MParameterDefConvertReceptacleExceptionsToCpp)s
* catch(...) {
* throw;
* }
! * The %(MParameterDefConvertExceptionsToCpp)s tag forces a call to this
! * method via getTwoStepVariables().
*
* @param op Reference to an OperationDef element in the CCM model.
* @return Generated code as a string.
*/
! protected String convertReceptacleExceptionsToCpp(MOperationDef op)
{
Debug.println(Debug.METHODS,
***************
*** 1097,1101 ****
return join("\n", ret);
}
-
}
--- 1266,1269 ----
|
|
From: <tei...@us...> - 2003-11-20 14:29:28
|
Update of /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteTemplates
In directory sc8-pr-cvs1:/tmp/cvs-serv17717/CppRemoteTemplates
Modified Files:
MOperationFacetAdapterImpl MOperationReceptacleAdapterImpl
Log Message:
added struct adapter generation
Index: MOperationFacetAdapterImpl
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteTemplates/MOperationFacetAdapterImpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** MOperationFacetAdapterImpl 18 Nov 2003 17:09:52 -0000 1.7
--- MOperationFacetAdapterImpl 20 Nov 2003 14:28:50 -0000 1.8
***************
*** 12,15 ****
--- 12,16 ----
throw CORBA::SystemException();
}
+ %(MParameterDefConvertParameterFromCppToCorba)s
%(MParameterDefConvertResult)s
}
Index: MOperationReceptacleAdapterImpl
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/CppGenerator/CppRemoteTemplates/MOperationReceptacleAdapterImpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MOperationReceptacleAdapterImpl 13 Nov 2003 17:49:54 -0000 1.3
--- MOperationReceptacleAdapterImpl 20 Nov 2003 14:28:50 -0000 1.4
***************
*** 4,17 ****
DEBUGNL(" %(Object)sReceptacleAdapter->%(Identifier)s()");
! %(MParameterDefConvertParameterToCorba)s
! %(MParameterDefDeclareCorbaResult)s
try {
! %(MParameterDefConvertMethodToCorba)s
}
! %(MParameterDefConvertExceptionsToCpp)s
catch(...) {
throw;
}
! %(MParameterDefConvertResultToCpp)s
}
--- 4,17 ----
DEBUGNL(" %(Object)sReceptacleAdapter->%(Identifier)s()");
! %(MParameterDefConvertReceptacleParameterToCorba)s
! %(MParameterDefDeclareReceptacleCorbaResult)s
try {
! %(MParameterDefConvertReceptacleMethodToCorba)s
}
! %(MParameterDefConvertReceptacleExceptionsToCpp)s
catch(...) {
throw;
}
! %(MParameterDefConvertReceptacleResultToCpp)s
}
|