Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
VTK
VTK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 582
    • Issues 582
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 160
    • Merge Requests 160
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #17029

Closed
Open
Opened Apr 24, 2017 by David Gobbi@dgobbiDeveloper

Customize some of the vtkSetGet for the wrappers

There are many VTK methods that are wrapped even if they do not need to be, and they cause bloat in the wrappers. One example of this is the IsA() method, which is a virtual method defined in vtkObjectBase and there is therefore no need to also wrap it in all of the subclasses.

The SetGet macros offer the best opportunity to eliminate "bloat" methods from the wrappers: it is possible to use #ifdef __VTK_WRAP__ to create one macro definition for the wrappers, with an #else to create another macro definition for C++. This could even be done in a language-specific manner, by using e.g. #ifdef __VTK_WRAP_JAVA__.

Edit Jan 29, 2019:

A simpler way to block specific methods (whether defined in a macro or not) would be to add a [[vtk::wrapexclude]] attribute to the wrapper tools:

#ifdef __VTK_WRAP__
#define VTK_WRAPEXCLUDE [[vtk::wrapexclude]]
#else
#define VTK_WRAPEXCLUDE
#endif

VTK_WRAPEXCLUDE vtkTypeBool IsA(const char *type)
Edited Jan 29, 2019 by David Gobbi
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: vtk/vtk#17029