Results 1 to 4 of 4

Thread: abstraction instead of copying the template files

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    10

    abstraction instead of copying the template files

    Hi,

    Is it possible to create a derived class of, say, the intgeometry class from the template folder and when we parse a collada file to load the geometry it can call the derived class createFrom and fromCollada functions ?

    I guess for this the template classes must have these two functions an accompanying abstract functions within the class of intgeometry !

    for example
    class intgeomtry : public daeIntegrationObject
    {
    ..
    virtual void userdefined_toCOLLADA()=0;
    virtual void toCOLLADA() //dreived from daeIntegrationObject
    {
    userdefined_toCOLLADA();
    }
    }

    The above implementation style will remove the need to copy each template type and modify it and also isolates when updating local copy of DOM files.

    Please correct me if I am wrong about any implementation specifics I am missing.

  2. #2
    Junior Member
    Join Date
    Nov 2007
    Posts
    10
    haa, just realized after posting...

    I think my derived class from intgeometry will not be created/registered while loading a collada file !! But again, is there some mechanism to register my derived class ?

  3. #3
    Junior Member
    Join Date
    Nov 2007
    Posts
    10
    I dont want to be a complaint box..but the documentation is not complete.

    The debug version libs have a "_d" extension for all projects and also inclusion of libcollada_stdErrPlugin is not mentioned in the documentation.
    I request these corrections to the document.

    Also I used the collada dom installer. Is there a separate place where I have to download the samples from ? As they were not included in the installer !

    -Thanks

  4. #4
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    You can do whatever you like with an integration class as long as you implement the daeIntegrationObject interface. The int[Whatever] files provide a starting point for that, but you don't have to use them if you don't want to.
    I think my derived class from intgeometry will not be created/registered while loading a collada file !! But again, is there some mechanism to register my derived class ?
    In the int[Whatever] classes this is done via the registerElement function. You need to call int[Whatever]::registerElement somewhere to register the integration class.
    The debug version libs have a "_d" extension for all projects and also inclusion of libcollada_stdErrPlugin is not mentioned in the documentation.
    Sorry about this. The problem here is that the documentation on the wiki reflects the latest code in the Subversion repository on SourceForge, not the last official release. If you use the latest code from Subversion, you'll find that there is no _d extension, and that libcollada_stdErrPlugin doesn't exist.
    Code :
    Also I used the collada dom installer. Is there a separate place where I have to download the samples from ? As they were not included in the installer !
    This is probably the same problem. The samples are in the latest code in Subversion, but not in the installer for the last release it seems.

    Another issue is that in some places the docs aren't updated to the latest stuff in Subversion, and instead reflect the last official release. I was planning on fixing that this week though. The root issue is that the wiki doesn't allow us to version the documentation very well. This is a problem I have to address soon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •