[Ns-bugs] [Bug 48] New: Create function and parameters that are from virtual classes

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri Jul 13 08:52:32 PDT 2007


http://www.nsnam.org/bugzilla/show_bug.cgi?id=48

           Summary: Create function and parameters that are from virtual
                    classes
           Product: ns-3
           Version: pre-release
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P3
         Component: simulation core
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: emmanuelle.laprise at bluekazoo.ca


Is it normal that the Create function works only if ontime and offtime are not
from a class that has virtual functions? That is, if I define them as
ConstantVariable, then it compiles, but if I define than as RandomVariable
(virtual base class) and pass in a ConstantVariable (derived class), then it
won't compile telling me that the RandomVariable class has some pure virtual
functions.

FunctionXX(const  RandomVariable& ontime, const  RandomVariable& offtime)
{
  m_onOffGenerator = Create<OnOffGenerator> (ontime, offtime);
}

Thanks,

Emmanuelle


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list