   A Simple C Object Loader
  Comments for the article A Simple C++ Object Loader
  I just had a run through the article and found a couple of typographical errors:1. Under the section "Basic Types" (page 2) the indentation of the source code is a bit off.2. Under the section "Pointers" (page 4), the custom types code example contains the following line:virtual http://www.gamedev.net/reference/programming/features/cppObjLoadItem() =0which should actually be:virtual ~Item() =0Thanks,Francis Xavier   ;  Perhaps it is worth mentioning that the author of the article is also the author of the library.  That's not to say the article is just disguised advertising, it seems like a very thorough introduction to the library, but it should have been noted I think (or did I just miss that somewhere?).I have a little experience with the boost serialization library and this looks kind of similar - has anyone with more experience of both got any comments on similarities/differences or advantages/disadvantages?  Perhaps the author?   ;Quote:Original post by HinchPerhaps it is worth mentioning that the author of the article is also the author of the library. That's not to say the article is just disguised advertising, it seems like a very thorough introduction to the library, but it should have been noted I think (or did I just miss that somewhere?). Yes, the name of the article author and the project author (on sourceforge.net) is the same: Francis Xavier [smile]Quote:Original post by Hinch...has anyone with more experience of both got any comments on similarities/differences or advantages/disadvantages?  Perhaps the author?I also have very little experience with boost serialization. But AFAIK, there are some major differences:* Daabli is currently only a deserializer; it is to be used with manually defined object data.* The file format which Daabli uses is a simple "C" style format; Boost supports XML and Binary. From my experience, XML is cumbersome to manually edit, especially without a proper XML editor. XML files also tend to get much larger than required, which might be a problem for your platform.* Daabli, is much simpler to setup and use (IMHO).* Depending on your platform, and if you're not already using Boost, then using Boost Serialization just for loading objects might cause more bloat to your executable than using Daabli to load objects.Please note that the above comments are purely based on my observations alone, which is why I wrote Daabli for my needs.Could someone else with more experience comment on this?   ;  Yes having the option of a more lightweight, less bloaty format/lib is always nice, boost always does much more than I need it to!  :)   ;  I'd agree with all your points above although I also lack experience of boost's serializing.I have a similar deserializing system myself, although I provide extensibility through std::istream&operator>>(std::istream&,T&) methods and internally represent nodes as std::stringstrings which is less efficient than your approach, although slightly less work for the user to implement for their own types (IMHO) if they are less than familiar with template specialization.Much food for thought in your article, especially with the automatic population of std containers. Nice work.   ;Quote:Original post by FrancisXavierI just had a run through the article and found a couple of typographical errors...Fixed!Heh, I use the Tilde (~) as a placemarker for various file paths I need to insert into the articles (for images, anchor links, etc). So when I did a global search and replace... :P   ;Quote:Original post by GaiidenFixed! Thanks! I just noticed another small thing which would be nice if fixed: my name is mentioned as "Francias Xavier" instead of "Francis Xavier". :);Quote:Original post by FrancisXavierI also have very little experience with boost serialization. But AFAIK, there are some major differences:* Daabli is currently only a deserializer; it is to be used with manually defined object data.* The file format which Daabli uses is a simple "C" style format; Boost supports XML and Binary. From my experience, XML is cumbersome to manually edit, especially without a proper XML editor. XML files also tend to get much larger than required, which might be a problem for your platform.* Daabli, is much simpler to setup and use (IMHO).* Depending on your platform, and if you're not already using Boost, then using Boost Serialization just for loading objects might cause more bloat to your executable than using Daabli to load objects.Please note that the above comments are purely based on my observations alone, which is why I wrote Daabli for my needs.Could someone else with more experience comment on this?While I would agree that something a little more light-weight than boost::serialisation is often desirable, I am not convinced that dabbli is a good candidate for this use, especially considering the unfinished nature of the library.How would you contrast dabbli with a standardised and complete solution, such as YAML via yaml-cpp?   ;Quote:Original post by swiftcoderWhile I would agree that something a little more light-weight than boost::serialisation is often desirable, I am not convinced that dabbli is a good candidate for this use, especially considering the unfinished nature of the library. Currently Daabli is an object loader; it can't serialize objects as yet. But as far as deserialization goes, I've tried to make it as complete as possible. I use Daabli for loading various objects with my game engine, so I assume that its design is not purely theoretical and has practical utility.Quote:Original post by swiftcoderHow would you contrast dabbli with a standardised and complete solution, such as YAML via yaml-cpp? Again, yaml-cpp is a complete serializer; Daabli can only be compared to it in terms of deserialization. I haven't thus far used yaml-cpp, so I can't make any objective comparisons. I checked out the link you provided though, and did some reading on yaml-cpp; from what I saw, it seems like a pretty good library. There's one feature which I need which I couldn't find in the samples though: the built-in ability to load polymorphic objects (for e.g., a list of base class pointers populated with various derived class objects). Daabli supports such a construct with ease (see the example on page4, a list of heterogeneous item objects).Edit: Correct me if I'm wrong, but I just noticed that yaml-cpp doesn't have built-in support for loading standard STL container objects.[Edited by - FrancisXavier on October 10, 2009 9:58:33 AM]