00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00042 #ifndef __vtkRInterface_h
00043 #define __vtkRInterface_h
00044
00045 #include "vtkObject.h"
00046
00047 class vtkDataArray;
00048 class vtkArray;
00049 class vtkTable;
00050 class vtkImplementationRSingleton;
00051 class vtkRAdapter;
00052
00053 class VTK_GRAPHICS_EXPORT vtkRInterface : public vtkObject
00054 {
00055 public:
00056
00057 static vtkRInterface* New();
00058 vtkTypeRevisionMacro(vtkRInterface,vtkObject);
00059 void PrintSelf(ostream& os, vtkIndent indent);
00060
00063 int EvalRcommand(const char *commandName, int param);
00064
00067 int EvalRscript(const char *string, bool showRoutput = true);
00068
00071 int OutputBuffer(char* p, int n);
00072
00076 void AssignVTKDataArrayToRVariable(vtkDataArray* da, const char* RVariableName);
00077
00081 void AssignVTKArrayToRVariable(vtkArray* da, const char* RVariableName);
00082
00085 vtkDataArray* AssignRVariableToVTKDataArray(const char* RVariableName);
00086
00090 vtkArray* AssignRVariableToVTKArray(const char* RVariableName);
00091
00096 vtkTable* AssignRVariableToVTKTable(const char* RVariableName);
00097
00101 void AssignVTKTableToRVariable(vtkTable* table, const char* RVariableName);
00102
00103 protected:
00104 vtkRInterface();
00105 ~vtkRInterface();
00106
00107 private:
00108 int FillOutputBuffer();
00109 vtkRInterface(const vtkRInterface&);
00110 void operator=(const vtkRInterface&);
00111
00112 vtkImplementationRSingleton* rs;
00113
00114 char* buffer;
00115 int buffer_size;
00116 vtkRAdapter* vra;
00117
00118 };
00119
00120 #endif
00121