Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Polymorphic XML
Re: Polymorphic XML [message #24361 is a reply to message #24358] Tue, 12 January 2010 14:22 Go to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
mdelfede wrote on Tue, 12 January 2010 04:42

Quote:


Also, I believe that

void CreateClassInstance(One<BaseClass>& x);

(Note that you can do x.Create<DerivedClass>())

or even in some cases

void CreateClassInstance(Array<BaseClass>& x);

is cleaner class factory interface. (But depends on your taste).

Mirek


mhhh... I don't understand your point. I need the class creation at runtime by name, so an ascii string, not a type.



No, it is not about the class name, but you avoid "naked" pointer (naked in sense that it points to the heap and is the only reference to the heap object).

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Painter DrawLineStroke proposal
Next Topic: BUG: plugins\zip
Goto Forum:
  


Current Time: Thu May 16 17:02:38 CEST 2024

Total time taken to generate the page: 0.01218 seconds