This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 162205 - [call graph] Lacks support for template instantiation (parameter dependent)
Summary: [call graph] Lacks support for template instantiation (parameter dependent)
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.0
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-08 11:54 UTC by rmartins
Modified: 2013-05-07 11:21 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rmartins 2009-04-08 11:54:50 UTC
Hi,

class C{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};
template <class T>
class B{
public:
    typedef int basic_type;
    B(){}
    ~B(){}
    virtual void doit(){}
};
template <typename X>
class A: public B<X>{
public:        
    A(){}
    A(X* x):m_x(x){}
    ~A(){}

    void doit(){}
    void doit2(){
        doit();
        m_x->doit();
    }
    X* getX(){return m_x;}
protected:
    X* m_x;
};


int main()
{
   A<C> a;
   a.doit2(); <------------- calling "call graph" here
   return 0;
}

At "a.doit2()" the call graph only outputs:
A::doit2 ---> A::doit  , omitting the C::doit (given by m_x->doit(), with m_x type being C).


Thanks,
Rolando
Comment 1 rmartins 2009-04-08 12:03:33 UTC
Hi,
I am not sure, but perhaps when we have the http://editor.netbeans.org/issues/show_bug.cgi?id=158692 implemented, we
could have multiple "sub-graphs" per a function call. Example:

class C{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};

class D{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};

class E{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};


template <typename X>
class A{
public:        
    A(){}
    A(X* x):m_x(x){}
    ~A(){}

    void doit(){}
    void doit2(){             <---- Calling call graph here
        doit();
        m_x->doit();
    }
    X* getX(){return m_x;}
protected:
    X* m_x;
};

if we called "call graph" on A::doit2 we could obtain the following:
             
                A::doit2
                   |
                   V 
                A::doit
                   |                   
         ---------------------
         |         |         |
    C::doit    D::doit    E::doit

Thanks,
Rolando