[vtkusers] VTK Wrapping Problems (once again)
kent williams
nkwmailinglists at gmail.com
Wed May 13 10:36:33 EDT 2009
I wouldn't even use VTK wrapping at all if it wasn't integral to
KWWidgets. Not that it's horrible, but sometimes I get frustrated by
how touchy it is, how uninformative its error messages are, and how
completely un-documented it is.
Below is a header file I'm trying to compile. As far as I know I'm
following all the VTK wrapping rules, but it gives me this message:
*** SYNTAX ERROR found in parsing the header file
/scratch/kent/BT/BRAINSTracer/vtkBTPointSetWidget.h before line 30 ***
Which is the first line of the second class defined. The only problem
I can see -- possibly -- is that it objects to trying to wrap two
classes in one file. Is THAT not permitted? It seems like I've done
that before and it worked out. If I put //BTX-//ETX around the whole
vtkBTPointWidget class, it doesn't throw the error
And yes, I'm calling these 'Widgets' even though they don't derive
from vtkAbstractWidget; I'm not sure what I gain by doing that, and
I'm a little scared about what it might entail to do so directly.
--------------------------------------------------------------------------------------------------vtkBTPointSetWidget.h-----------------------------------------------------------------------------------------------
#if !defined(vtkBTPointSetWidget_h)
#define vtkBTPointSetWidget_h
#include <vtkObject.h>
#include <string>
class vtkViewImage;
class vtkBTPointWidget : public vtkObject
{
public:
//BTX
static vtkBTPointWidget *New();
vtkTypeRevisionMacro(vtkBTPointWidget,vtkObject);
void SetView(unsigned i, vtkViewImage *view);
std::string GetName();
void SetName(const std::string &name);
//ETX
void Create();
void Hide();
void Show();
void Disable();
void Enable();
private:
//BTX
std::string m_Name;
vtkViewImage *m_View[4];
//ETX
};
class vtkBTPointSetWidget : public vtkObject
{
public:
//BTX
vtkTypeRevisionMacro(vtkBTPointSetWidget,vtkObject);
typedef vtkObject SuperClass;
const std::string &GetName();
void SetName(const std::string &name);
//ETX
static vtkBTPointSetWidget *New();
void Create();
void Hide();
void Show();
void Disable();
void Enable();
void AddPoint();
//BTX
void SetView(unsigned i, vtkViewImage *view);
//ETX
private:
//BTX
vtkViewImage *m_View[4];
std::string m_Name;
//ETX
};
#endif // vtkBTPointSetWidget_h
More information about the vtkusers
mailing list