Menu

#10 children factory methods

open
5
2008-03-22
2008-02-15
No

We miss a lot of convenience methods to create and add children elements into the DOM. The call to createAndPlace is not type safe (compile time). As user of the API you only know which children could be set be looking at the getters or by reading the spec.

E.g. domGeometry::createAndPlaceMesh() or
domMesh::createAndPlaceTriangles()

Discussion

  • Steven Thomas

    Steven Thomas - 2008-03-22

    Logged In: YES
    user_id=1783832
    Originator: NO

    > The call to createAndPlace is not type safe (compile time). As user of the API you only know which children could be set be looking at the getters or by reading the spec.

    If you're concerned about simple typos, you could use the COLLADA_ELEMENT_* constants to help with that.

    I agree it'd be better to have more specific create functions, but I don't view it as a huge problem so I don't know if/when I'll get around to working on this.

    Steve

     
  • Steven Thomas

    Steven Thomas - 2008-03-22
    • assigned_to: nobody --> steve314
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.