[gme-users] Fwd: RE: [udm-users] BON2 question
Zoltan Molnar
zoltan.molnar at vanderbilt.edu
Mon Jun 7 11:09:14 CDT 2004
Hi,
I think the second way:
GRATISII_BON::configuration( currentFCO) should work, but please be aware
that the casting can be done among wrapper classes (those without "impl")
and not the implementation classes (those with "impl").
I presume that this is the source of the error you get.
If this does not solve your problem let me know,
Br, Zoli
> >> -----Original Message-----
> >> From: Endre Magyari
> >> Sent: Sunday, June 06, 2004 4:00 PM
> >> To: udm-users
> >> Subject: [udm-users] BON2 question
> >>
> >>
> >>
> >> Dear All,
> >>
> >>
> >> I happily found out that there is a BON extender interpreter,
> > which
> >> generates domain specific API for me.
> >>
> >> Generating the classes went fine, but when I wanted to
> check and
> >> cast the current FCO to a certain type, I ran into an error.
> >>
> >> The documentations suggested that this should work
> >>
> >> const GRATISII_BON::configurationImpl & config = currentFCO;
> >>
> >> and this also should work:
> >>
> >> if ( GRATISII_BON::configurationImpl(currentFCO))
> >> {
> >> //....
> >> }
> >>
> >>
> >> However both syntaxes result in compiler error:
> >>
> >> c:\temp\gratis\component\bon2component.cpp(111) : error C2440:
> >> 'initializing' : cannot convert from 'class BON::FCO' to
> 'const class
> >> GRATISII_BON::configurationImpl &'
> >> Reason: cannot convert from 'class BON::FCO' to
> 'const class
> >> GRATISII_BON::configurationImpl'
> >> No constructor could take the source type, or constructor
> >> overload resolution was ambiguous
> >>
> >>
> >> What is the solution in BON2 to check the type of an FCO and
> > then
> >> cast it
> >> to that type?
> >>
> >> Thanks,
> >> Endre.
More information about the gme-users
mailing list