Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    ClassLib vs Multiple Inheritance

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 244 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 03/05/2007 at 01:56, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.2 
      Platform:      
      Language(s) :     C++  ;

      ---------
      We have a ClassLib here, and the internal class uses multiple inheritance, it is derived from two other classes. The symptom we saw was that we had NULL pointers in the library struct after retreiving it with checklib/LIBOFFSET. After a while we found out, that cinema seems to expect 4byte function pointers. But for multiple inheritance the function pointer size is 8byte, for virtual inheritance it would be 16byte. I saw that for the sdk and the sdk examples the compiler switch /vms is set, which forces 4byte function pointers. Unfortunally thsi results in errors for multiple or virtual inheritance. We need at least the /vmm option here. So basically what we did here to solve the problem is that we defined the library struct twice, the second one with spare pointers after each real function pointer to achieve an 8byte addressing in the struct. In the external class of the classlib we retreive the library struct and cast it to the "patched" one.
      Did anybody have the same problem, is our solution the proper one, or is there a better possibility?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 10/05/2007 at 00:45, xxxxxxxx wrote:

        multiple inheritances of c++ classes are not supported because they can cause several problems.

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • First post
          Last post