Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#10 children factory methods

open
Steven Thomas
5
2008-03-22
2008-02-15
Kai Klesatschke
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