[vtkusers] how can i access to the proteced member of the VTK Function

赖瑞勋 lairuixun at 163.com
Wed Sep 22 22:32:51 EDT 2010


hi,i am worrying about this problem of how to access to the proteced member.
this is my code below:
----------------------------------------------------------------
#include "vtkTecplotReader.h"
#include "vtkMultiBlockDataSet.h"
 
main
{
//new a vtkTecplotReader and access to a .plt file ,it's work
  const char *fileName;
  vtkTecplotReader *tecR=vtkTecplotReader::New();
  fileName="C:/Program Files/VTK 5.6/mycode/Example01/bt_ds_old_bridge.plt";
  tecR->SetFileName(fileName);
  tecR->Update();
 
 //read the file data into the MultiBlockDataset,
// I got the mistake"Error 1 error C2248: 'vtkTecplotReader::ReadFile' : cannot access protected member declared in class 'vtkTecplotReader' c:\Program Files\VTK 5.6\mycode\Example01\CreatePolyData.cxx 52 
".
  vtkMultiBlockDataSet *multiBDS =vtkMultiBlockDataSet::New ();
  tecR->ReadFile(multiBDS);
}

Is there any way to access the proteced functions? Or just my code is completely wrong?
I am very glad who can help me !! thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100923/936f658c/attachment.htm>


More information about the vtkusers mailing list