[ 
https://issues.apache.org/jira/browse/YOKO-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491633
 ] 

Matteo Vescovi commented on YOKO-352:
-------------------------------------

I have a few questions about const declarators... Let's use the following const 
declarations as examples:

const string s1 = "hello";
const string<10> s2 = "hello";
const string<10 + 2> s3 = "hello";
const string s4 = "hello" + "world";
const string s5 = "hello" << "world";
const string<10 + 2> s6 = "hello" + "world";

const long l1 = 10;
const long l2 = 10 + 20;
const long l3 = 10 + ((10 | 20 * (100 << 2)) / 2);

const float f1 = 3.14 * 10;


...and now for the questions:

- do we need to differentiate between const strings and const bounded strings? 
For example, strings s1 and s2 both have the constant value of "hello". The 
information about the bound is only used when validating the idl or when 
converting the wsdl back to idl. Can we relax our tool and generate the same 
XmlSchema and CorbaTypeMap for both?

- do expressions on const strings even make sense? Take constant strings s4 and 
s5 for example. The IDL grammar allows to produce those declarations, but are 
they semantically valid? How do you shift "hello" by "world"? Is the + operator 
overloaded to concatenate strings?

- if we differentiate between const strings and const bounded strings, then we 
will have to compute the <10 + 2> bound spec for string s6, as we can't assign 
a string to the Corba anonstring type bound member. But if we do that, we lose 
information and cannot get the original IDL back.

- in general, I think we should assign the full string of const_exp to the 
value="" attribute of the corba:const element in the corbatypemap. That is the 
value="10 + ((10 | 20 * (100 << 2)) / 2)" for the const long l3 or value="10 + 
20" for const long l2, instead of value="30". Will the code generator 
(wsdl2java) be able to handle this?


> Implement full const support 
> -----------------------------
>
>                 Key: YOKO-352
>                 URL: https://issues.apache.org/jira/browse/YOKO-352
>             Project: Yoko - CORBA Server
>          Issue Type: Bug
>          Components: Idl2Wsdl
>            Reporter: Edell Nolan
>         Assigned To: Edell Nolan
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to