[orbitcpp-list] typedef implementation
Status: Beta
Brought to you by:
philipd
|
From: Phil D. <ph...@us...> - 2000-04-03 17:59:04
|
Hi Andreas, all,
I think that the way the compiler handles typedefs needs
revisiting. For example, the idl:
typedef foo bah;
interface Test {
op(in inArg);
}
writes the c++ operation stub:
void op(const foo& inArg);
and it should be:
void op(const bah& inArg);
The hack I used for the sequence typedef was to keep a ref to the
typedef in the sequence object (wired up in the
IDLSequence::writeTypeDef() method), however this only works because
sequence is a anonymous type that must be typedefd before it can be
used.
As an alternative, I suggest renaming getCPPQualifiedIdentifier() to
getCPPQualifiedTypename() and putting it in an abstract base
class. Then appending an argument to the end of each write*() method
with a pointer to the object with the identifier to use. That way,
IDLTypedef can propogate the appropriate identifier to the 'real' IDL
types.
Suggestions? Alternatives?
Cheers,
Phil.
|