Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000192Rosetta[All Projects] Bad Codingpublic2013-03-01 12:372013-04-01 13:41
Assigned ToLabonte 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Fixed in VersionTrunk 
Summary0000192: Mover::reinitialize_for_each_job should be pure virtual in base class
DescriptionThankless task but it needs doing - bootcamp?

Let it return false for all cases, unless there's a reason not to from the code's author (false is the default behavior).
Tagsbootcamp, jd2, pure virtuals in base classes
Application(s) AffectedNA
Command Line UsedNA
Developer Options
Fixed in SVN VersionN/A
Attached Files

- Relationships
related to 0000191assignedLabonte Mover::clone() should be pure virtual in base class 
related to 0000201assignedLabonte Show() methods are missing for a large number of classes 
related to 0000193closedLabonte Mover::reinitialize_for_new_input should be pure virtual in base class 
related to 0000194assignedLabonte Mover::fresh_instance() should be pure virtual in base class 

-  Notes
Labonte (Developer)
2013-03-29 14:17

What is the reasoning for why this should be pure virtual and not simply virtual? As it is, the method is defined in to return false, so changing it to pure virtual and adding the method to every mover to simply return false is a lot of work with no benefit. (The situation is of course different with clone() and fresh_instance(), which depend on empty and copy constructors unique to each Mover being written.)
smlewis (Administrator)
2013-04-01 12:47

Well....fair enough. I think it would be nice for the Mover base class to implement as little as possible - to have as many pure virtuals as possible - to force everyone writing Movers to think about all the levers that might get pulled.

I nominated all of the JD2-interface classes for pure-virtualization on that logic.

I think it's okay if the two init functions stay regular-virtual with a default to has a small ideological / organizational benefit to them being pure virtual but I can see that it might be sufficiently small benefit to be worth the labor. Also, I nominated 191, 192, 193, and 194 with the boot camp in mind - relatively simple fixes have some benefit as "homework" in that context.
Labonte (Developer)
2013-04-01 13:39

Ok. I agree strongly with you that the Mover base class should implement as little as possible. But I think these two reinit. ones make more sense being normal virtual defaulting to false.

I think I'll close this one and 193 then.

As far as boot camp homework, I e-mailed Matt and he gave me the go-ahead to start on these, so I've already made some progress on 191 and 194. However, let me know when boot camp starts, and I'll check in whatever I have finished before than and will refrain from fixing more until it ends.
Labonte (Developer)
2013-04-01 13:41

See discussion in notes.

- Issue History
Date Modified Username Field Change
2013-03-01 12:37 smlewis New Issue
2013-03-01 12:38 smlewis Tag Attached: jd2
2013-03-01 12:38 smlewis Tag Attached: pure virtuals in base classes
2013-03-01 12:38 smlewis Relationship added related to 0000191
2013-03-01 12:39 smlewis Tag Attached: bootcamp
2013-03-01 12:40 smlewis Relationship added related to 0000193
2013-03-01 12:41 smlewis Relationship added related to 0000194
2013-03-07 15:49 Labonte Assigned To => Labonte
2013-03-07 15:49 Labonte Status new => assigned
2013-03-29 14:17 Labonte Note Added: 0000224
2013-03-29 16:52 Labonte Relationship added related to 0000201
2013-04-01 12:47 smlewis Note Added: 0000231
2013-04-01 13:39 Labonte Note Added: 0000232
2013-04-01 13:41 Labonte Fixed in SVN Version => N/A
2013-04-01 13:41 Labonte Note Added: 0000233
2013-04-01 13:41 Labonte Status assigned => closed
2013-04-01 13:41 Labonte Resolution open => no change required
2013-04-01 13:41 Labonte Fixed in Version => Trunk

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker