I'm sorry, I did read your post, but just completely forgot to reply to it Sorry again...
Anyway, your solution sounds like it would work pretty good. A few questions though. How exactly are you overloading your functions and operators in your derived templated classes? To use the pure virtual Read function from the Attribute* class, you can't overload return types or parameter types (at least I don't think)... so how is the correct type set via the = operator (that's where I'm assuming it converts the Mem1FromFile Attribute* pointer to the correct value type to store in member1)?
I'm just confused how you are overloading these things, as in the pure virtual base class you pretty much have to have the types filled in, namely for the Read function, right? This whole construct is what I was trying to get at from my original thought all the way in post 1, but I couldn't figure out how to go about setting this up.
[edited by - Zipster on September 17, 2002 2:36:28 AM]
Generic Container
You don''t need to link to anything specific to use boost::any, as it only depends on a few header files (any.hpp and the configuration headers that ensure portability), which you could very well ship with your application.
If you want to reimplement it yourself, you might as well have a look at how it works.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
If you want to reimplement it yourself, you might as well have a look at how it works.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement