strk wrote:
Is there a best practice to pass hierarchical sets of parameters
around ? I'd need this for a new View->MovieInfo menu itam.

The idea is that the VM would implement an:

         InfoObject VM::getMovieInfo() const;

Where InfoObject is the hierarchical thing.
An initial layout for the InfoObject for movie information would be:

        VM Version : SWF#
        Loaded Movies:
                _level0
                        URL : <url>
                        Type : SWF
                        Version : <number>
                _level1
                        URL : <url>
                        Type : SWF
                        Version : SWF#
                ...
                _level0.mc4.image
                        URL : <url>
                        Type : bitmap
                ...

The point is I don't want to define the whole structure right now, but
rather have the liberty of changing it arbitrarely w/out touching the
code in the GUI everytime. So the GUI would have a function like:

        void Gui::showInfo(InfoObject& o);

Which would show whatever it gets passed (initially for movie information,
but eventually for every kind of thing, like we may add DisplayList info).

So, back to the question : is there a best practice for this kind of extendible
structure (XML-like) or should we forge one ourselves ?
Take a look at http://www.aei.mpg.de/~peekas/tree/ which is an STL style tree class, released under the GPL. By creating a parameter class, you could have a tree of parameters. It also shouldn't be hard to tag the nodes with names in the tree and use those to find things, rather than relying solely on the iterators provided.

Chad Musick



_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to