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

    Header Files and class definitions

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 377 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 25/10/2012 at 14:27, xxxxxxxx wrote:

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

      ---------
      Hey guys,

      I have get a very unusual question to you developers.
      I never saw any plugin with a header file in res/description with more than an enum in it.

        
      #ifndef _myplugin_H_  
      #define _myplugin_H_  
        
      enum  
      {  
       ...  
      }  
      

      Where do you put your class definition in? Alltimes in the cpp files? What if you use many classes, you put them all in the same cpp file?

      Thanks in advance. 🙂

      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 25/10/2012 at 18:07, xxxxxxxx wrote:

        In a regular .h header file, ala:

        myplugin.h
        myplugin.cpp

        res/ is only for resource files which are read by Cinema 4D (.h, .res, .str).  The header files in the res folder are strictly for enumerating strings, dialog elements, and description elements.

        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 25/10/2012 at 21:09, xxxxxxxx wrote:

          Hey Robert,

          And after compiling your plugin  to cdl it is not necessary to leave your myplugin.h as source? So you can "delete" the .h file? I did not know. Thank you. 🙂

          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 25/10/2012 at 23:47, xxxxxxxx wrote:

            Yes, the actual source code is not required anymore. The only files that need to reside are the .h, .res
            and .str files, whereas only the formers are needed for compilation. Although they are saved in your
            dll, Cinema 4D needs the .h files to load them at runtime

            -Nik

            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 26/10/2012 at 08:24, xxxxxxxx wrote:

              You will want to keep these class header files on your system for your project but they are not needed for the end product that you offer to users of the plugin.  Headers are standard C/C++ practice for defining classes and other information for your software for inclusion in other headers and source code files.  They do no finalize the declaration (of methods) but just offer connection information to other files so that the compiler knows the members and methods of the class (as well as respective enumerations, defines, and so forth).

              I typically add them to my projects for direct editing purposes but that is not a requirement.  The only files that are explicitly required are the source files as long as headers are "#include"d.

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