<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<div class="moz-forward-container"> I am having really hard times
passing on reference to the objects that are stored as
vtkSmartPointer<T> as private data within a class. E.g.:<br>
<tt>class MyClass </tt><tt><br>
</tt><tt>{</tt><tt><br>
</tt><tt> public:</tt><tt><br>
</tt><tt> ...</tt><tt><br>
</tt><tt> private:</tt><tt><br>
</tt><tt> vtkSmartPointer<vtkPolyData> surface;</tt><tt><br>
</tt><tt>};</tt><tt><br>
</tt><br>
What is the best way to pass 'surface' via signal/slot mechanism
of Qt? <br>
I thought I'd create a public method<br>
<tt>vtkPolyData * MyClass::getSurface() { return
surface.GetPointer(); }</tt><br>
The problem is that GetPointer() returns <b>const</b> T* which
the compiler complains about when I later want to use it. As a
matter of fact, all vtkSmartPointer's public methods return const
something. <br>
<br>
What would be the preferred way to pass objects stored as
vtkSmartPointer<T> object?<br>
1.) T* MyClass::getT() const { return object.GetPointer(); }<br>
2.) vtkSmartPointer<T> MyClass::getT() { return object; }<br>
3.) something else?<br>
<br>
I want to pass the object via signal/slot mechanism. What would be
the best way?<br>
A.) signal doneSurfaceProcessing(vtkPolyData &); <br>
B.) signal doneSurfaceProcessing(vtkPolyData *);<br>
C.) signal
doneSurfaceProcessing(vtkSmartPointer<vtkPolyData>);<br>
<br>
Thank you!!<br>
Miro<br>
<br>
</div>
<br>
</body>
</html>