[Paraview] STL, Template, Vector, Map and vtkWrapClientServer

Diego Mazala diegomazala at gmail.com
Wed Mar 29 07:18:46 EST 2006


Hi.

I have found problems when trying to compile my vtkClasses and those classes
have templates definitions.

Example:

#ifndef _vtkHMSimplifiedModel_h_
#define _vtkHMSimplifiedModel_h_

#include <vtkObject.h>
#include <vtkObjectFactory.h>
#include "hmCommonConfigure.h"

class vtkHMTreeElement;
class vtkArrayMap;

class VTK_hmCommon_EXPORT vtkHMSimplifiedModel:public vtkObject
{
protected:
  vtkArrayMap<int, vtkHMTreeElement*> TreeNode;

public:
  static vtkHMSimplifiedModel *New();
  vtkTypeRevisionMacro(vtkHMSimplifiedModel,vtkObject);
  void PrintSelf(ostream& os, vtkIndent indent);

  void SetName(const char* name){this->name = name;return;}
  const char* GetName(){return name;};

protected:
    vtkHMSimplifiedModel();
    virtual ~vtkHMSimplifiedModel();

  // Description:
  // Class/object name.
  const char* name;
};

#endif /*_vtkHMSimplifiedModel_h_*/


This example return a: "SYNTAX ERROR" before class declaration line, when
generating vtkHMSimplifiedModelClientServer.cxx
In my debugs, I have verified that the use of templates, for example STL
structures(vector,string,map) do not work. We found out that when a
class name does not have the vtk prefix, this error also occurs. The classes
vtkArrayMap, vtkQueue, etc, where designed with this in mind?
How can I to resolve this?, is this a bug or architectural design feature?,
do you have any suggestion or comments?.

Another question:
What are the tags "//BTX" and "//ETX"? I think they might be related. (??)

Best regards,

--
Diego Mazala
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20060329/3b973387/attachment.htm


More information about the ParaView mailing list