[vtkusers] Troubles with New() and vtkTypeMacro
Heidler, Kirstin (GE Oil & Gas)
Kirstin.Heidler at ge.com
Fri Aug 24 07:29:17 EDT 2012
Hello,
I am having some troubles with this header file:
#ifndef VTKKEYPRESSINTERACTORSTYLE_H
#define VTKKEYPRESSINTERACTORSTYLE_H
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkSmartPointer.h>
#include <vtkObjectFactory.h>
#include <vtkPolyData.h>
#include <vtkSetGet.h>
#include <vtkObject.h>
class vtkKeyPressInteractorStyle : public
vtkInteractorStyleTrackballCamera
{
public:
static KeyPressInteractorStyle* New();
vtkTypeMacro(vtkKeyPressInteractorStyle,
vtkInteractorStyleTrackballActor);
};
#endif // VTKKEYPRESSINTERACTORSTYLE_H
The complier says there is an Error with the New() function. Supposedly
there is a ';' missing before the '*'.
I don't get why though. So this cannot be the source of the error.
With the vtkTypeMacto the IDE(qtCreator) says there is a ';' too many
but on the other hand the compiler says a ';' is missing before the
superclass identifier. Also it says types are missing, so it assumes
int.
I cannot understand what else I would need to include for this to work?
I tried including vtkSetGet.h because it is supposed to hold the
definition of vtkTypeMacro.
I am pretty sure this a really dumb mistake I made. I copied the code
from here: http://www.vtk.org/Wiki/VTK_Coding_Standards:
class VTK_COMMON_EXPORT vtkBox : public vtkImplicitFunction
{
public:
vtkTypeMacro(vtkBox,vtkImplicitFunction);
void PrintSelf(ostream& os, vtkIndent indent);
...
}
If I do need to add type definitions which types would it be?
Thank you very much,
Kirstin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120824/56760153/attachment.htm>
More information about the vtkusers
mailing list