MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000359JANAFeature Requestpublic2013-06-24 13:332013-12-13 17:00
Reporterdavidl 
Assigned Todavidl 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000359: Add CopyTo method to JFactory_base
DescriptionSeveral instances have occurred where it would be very convenient to be able to copy pointers to externally produced objects into a factory using only the JFactory_base pointer and not the templated JFactory<> pointer. This happens in event sources where several types of objects may be produced but it's not convenient to list al types od data at multiple places in the code.

The CopyTo method should probably take a vector<JObject*> reference and be virtual so that the JFactory<T> method can do the appropriate dynamic_cast before storing it in the factory's _data vector.

It may also be handy to have a templated method of JFactory_base that can take vector<T*>& that it can then use to try and dynamic_cast itself into JFactory<T> and then call the old CopyTo method. (There may be some issues with plugins here so thorough testing will be required.)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000582)
davidl (administrator)
2013-12-13 17:00

Added a CopyTo method to JFactory_base and corresponding one to JFactory. The second suggestion was not implemented. Note that only a compilation test was done here. No testing was done.

This change will appear in JANA 0.7.0

- Issue History
Date Modified Username Field Change
2013-06-24 13:33 davidl New Issue
2013-12-13 17:00 davidl Note Added: 0000582
2013-12-13 17:00 davidl Status new => resolved
2013-12-13 17:00 davidl Resolution open => fixed
2013-12-13 17:00 davidl Assigned To => davidl


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker