Re: Reflex Type from typeinfo

From: Nathaniel Tagg <tagg_at_minos.phy.tufts.edu>
Date: Sat, 11 Aug 2007 10:35:42 -0400


Hi,
It turns out that I hadn't correctly loaded the dictionary libraries, just the base libraries. My own silly mistake.

---Nathaniel
On Aug 11, 2007, at 8:06 AM, Axel Naumann wrote:

> Hi Nathaniel,
>
> could you - just as a cross check - do
>
> std::string SomeBaseClass::name() const
> {
> return ROOT::Reflex::Type::ByTypeName("SomeBaseClass").Name();
> }
>
> Does that return != ""? If not: do you have the dictionary for
> SomeBaseClass available?
>
> Axel.
>
> Nathaniel Tagg wrote:
>> Hi Talkers,
>>
>> I've recently been trying to use the Reflex library instead of the
>> rootcint. However, after building source code and linking in
>> dictonaries
>> with genreflex, (under Gaudi), I find that the following code snippet
>> returns null strings:
>>
>> std::string SomeBaseClass::name() const
>> {
>> return ROOT::Reflex::Type::ByTypeInfo(typeid(*this)).Name();
>> }
>>
>> The API documentation is not very clear, but I would have expected
>> this
>> to work.
>>
>> In the meantime, I'm using:
>> typeid(*this).name() + 2
>> which works under GCC, but is platform-dependent, so not a really
>> good
>> long-term solution.
>>
>> Any advice?
>>
>> Thanks,
>> Nathaniel
>>
>>
Received on Sat Aug 11 2007 - 16:35:51 CEST

This archive was generated by hypermail 2.2.0 : Sat Aug 11 2007 - 23:50:01 CEST