transformation from Java to C++ (Novice)
27 Apr 2003 02:19:22 -0400

          From comp.compilers

Related articles
transformation from Java to C++ (2003-04-27)
| List of all articles for this month |

From: (Novice)
Newsgroups: comp.compilers,comp.programming
Date: 27 Apr 2003 02:19:22 -0400
Keywords: Java, C++, translator
Posted-Date: 27 Apr 2003 02:19:22 EDT

Hi, I'm working on creating a tool to automatically transform Java
code to C++ code.

I'm interested in how I could capture the "package friendly" access
qualifier from Java in C++.

I have come up with two alternatives, neither of them are particularly
appealing to me:

1. Lose the finer grain access that Java provides and fall back to
public - this would result in more classes having access to these
member variables than originally desired.

2. Use the friend qualifier between ``accessor functions'' (get and
set type functions in classes) within classes thus allowing classes in
the same namespace (analogous concept to Java's package) to access the
member variables of a class through the accessor functions.

Also, I'm not interested in using someone else's implementation of
this work, as there are some concepts that I need to implement outside
of a strict one for one transformation.

Thanks for any input,

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.