MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025525Community[OCCT] OCCT:Application Frameworkpublic2014-11-27 16:002017-05-25 15:23
ReporterVico Liang 
Assigned Tompv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version[OCCT] 6.8.0 
Target Version[OCCT] UnscheduledFixed in Version 
Summary0025525: TObj_Model shoulde not call its virtual method GetApplication() in constructor.
DescriptionCode snippet:
TObj_Model::TObj_Model ()
{
  myMessenger = GetApplication()->Messenger(); // VICO: Calling virtual method GetApplication().
}

const Handle(TObj_Application) TObj_Model::GetApplication()
{
  return TObj_Application::GetInstance();
}
Steps To ReproduceCalling virtual method in constructor is not recommended.
It might not work as expected. It make user failed to derive TObj_Application even if user overrides the GetApplication() method in TObj_Model.
What about removing the codes in constructor? The Messenger can be set after model creation.
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-11-27 16:00 Vico Liang New Issue
2014-11-27 16:00 Vico Liang Assigned To => szy
2015-12-15 14:06 abv Target Version 7.0.0 => 7.1.0
2016-02-17 18:19 szy Assigned To szy => mpv
2016-10-25 16:10 mpv Target Version 7.1.0 => 7.2.0
2017-05-25 15:23 mpv Target Version 7.2.0 => Unscheduled


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker