NetCDFTimeAnnotationPlugin_server_manager_data.h
Go to the documentation of this file.
1 // Loadable modules
2 //
3 // Generated by ../../bin/vtkProcessXML-pv5.9
4 //
5 #ifndef NetCDFTimeAnnotationPlugin_server_manager_data_h
6 #define NetCDFTimeAnnotationPlugin_server_manager_data_h
7 
8 #include <string.h>
9 #include <cassert>
10 #include <algorithm>
11 
12 
13 // From file /builds/gitlab-kitware-sciviz-ci/Plugins/NetCDFTimeAnnotationPlugin/NetCDFTimeAnnotation.xml
15 "<ServerManagerConfiguration>\n"
16 " <ProxyGroup name=\"filters\">\n"
17 " <CompoundSourceProxy name=\"NetCDFTimeAnnotation\" label=\"NetCDF Time Annotation\">\n"
18 " <Proxy group=\"filters\" type=\"ProgrammableFilter\" id=\"6868\" servers=\"1\" compound_name=\"ProgrammableFilter1\">\n"
19 " <Property name=\"CopyArrays\" id=\"6868.CopyArrays\" number_of_elements=\"1\">\n"
20 " <Element index=\"0\" value=\"0\"/>\n"
21 " <Domain name=\"bool\" id=\"6868.CopyArrays.bool\"/>\n"
22 " </Property>\n"
23 " <Property name=\"InformationScript\" id=\"6868.InformationScript\" number_of_elements=\"1\">\n"
24 " <Element index=\"0\" value=\"\"/>\n"
25 " </Property>\n"
26 " <Property name=\"Input\" id=\"6868.Input\" number_of_elements=\"1\">\n"
27 " <Domain name=\"groups\" id=\"6868.Input.groups\"/>\n"
28 " <Domain name=\"input_type\" id=\"6868.Input.input_type\"/>\n"
29 " </Property>\n"
30 " <Property name=\"OutputDataSetType\" id=\"6868.OutputDataSetType\" number_of_elements=\"1\">\n"
31 " <Element index=\"0\" value=\"8\"/>\n"
32 " <Domain name=\"enum\" id=\"6868.OutputDataSetType.enum\">\n"
33 " <Entry value=\"8\" text=\"Same as Input\"/>\n"
34 " <Entry value=\"0\" text=\"vtkPolyData\"/>\n"
35 " <Entry value=\"2\" text=\"vtkStructuredGrid\"/>\n"
36 " <Entry value=\"3\" text=\"vtkRectilinearGrid\"/>\n"
37 " <Entry value=\"4\" text=\"vtkUnstructuredGrid\"/>\n"
38 " <Entry value=\"6\" text=\"vtkImageData\"/>\n"
39 " <Entry value=\"10\" text=\"vtkUniformGrid\"/>\n"
40 " <Entry value=\"13\" text=\"vtkMultiblockDataSet\"/>\n"
41 " <Entry value=\"15\" text=\"vtkHierarchicalBoxDataSet\"/>\n"
42 " <Entry value=\"19\" text=\"vtkTable\"/>\n"
43 " <Entry value=\"33\" text=\"vtkMolecule\"/>\n"
44 " </Domain>\n"
45 " </Property>\n"
46 " <Property name=\"PythonPath\" id=\"6868.PythonPath\" number_of_elements=\"1\">\n"
47 " <Element index=\"0\" value=\"\"/>\n"
48 " </Property>\n"
49 " <Property name=\"Script\" id=\"6868.Script\" number_of_elements=\"1\">\n"
50 " <Element index=\"0\" value=\"from netcdftime import utime&#xa;from netcdftime import datetime&#xa;&#xa;inp = self.GetInputDataObject(0,0)&#xa;outp = self.GetOutputDataObject(0)&#xa;&#xa;currentTime = inp.GetInformation().Get(vtk.vtkDataObject.DATA_TIME_STEP())&#xa;timeUnitsArray = inp.GetFieldData().GetAbstractArray(&#x22;time_units&#x22;)&#xa;if timeUnitsArray:&#xa; timeUnits = timeUnitsArray.GetValue(0)&#xa;&#xa; cdftime = utime(timeUnits)&#xa; t = cdftime.num2date(currentTime)&#xa;&#xa; fdate = vtk.vtkStringArray()&#xa; fdate.SetName(&#x22;FullDate&#x22;)&#xa; fdate.SetNumberOfValues(1)&#xa; fdate.SetValue(0, str(t))&#xa; outp.GetFieldData().AddArray(fdate)&#xa;&#xa; date = vtk.vtkIntArray()&#xa; date.SetName(&#x22;Date&#x22;)&#xa; date.SetNumberOfValues(6)&#xa; date.SetValue(0, t.year)&#xa; date.SetValue(1, t.month)&#xa; date.SetValue(2, t.day)&#xa; date.SetValue(3, t.hour)&#xa; date.SetValue(4, t.minute)&#xa; date.SetValue(5, t.second)&#xa; outp.GetFieldData().AddArray(date)&#xa;\"/>\n"
51 " </Property>\n"
52 " <Property name=\"UpdateExtentScript\" id=\"6868.UpdateExtentScript\" number_of_elements=\"1\">\n"
53 " <Element index=\"0\" value=\"\"/>\n"
54 " </Property>\n"
55 " </Proxy>\n"
56 " <Proxy group=\"filters\" type=\"PythonAnnotation\" id=\"7137\" servers=\"1\" compound_name=\"PythonAnnotation1\">\n"
57 " <Property name=\"AnnotationValue\" id=\"7137.AnnotationValue\" number_of_elements=\"1\">\n"
58 " <Element index=\"0\" value=\"On 2001.01.00 at 00:00\"/>\n"
59 " </Property>\n"
60 " <Property name=\"ArrayAssociation\" id=\"7137.ArrayAssociation\" number_of_elements=\"1\">\n"
61 " <Element index=\"0\" value=\"2\"/>\n"
62 " <Domain name=\"enum\" id=\"7137.ArrayAssociation.enum\">\n"
63 " <Entry value=\"0\" text=\"Point Data\"/>\n"
64 " <Entry value=\"1\" text=\"Cell Data\"/>\n"
65 " <Entry value=\"2\" text=\"Field Data\"/>\n"
66 " <Entry value=\"6\" text=\"Row Data\"/>\n"
67 " </Domain>\n"
68 " </Property>\n"
69 " <Property name=\"Expression\" id=\"7137.Expression\" number_of_elements=\"1\">\n"
70 " <Element index=\"0\" value=\"&#x22;On %02i.%02i.%02i at %02i:%02i&#x22; % (Date[0], Date[1], Date[2], Date[3], Date[4])\"/>\n"
71 " </Property>\n"
72 " <Property name=\"Input\" id=\"7137.Input\" number_of_elements=\"1\">\n"
73 " <Proxy value=\"6868\" output_port=\"0\"/>\n"
74 " <Domain name=\"groups\" id=\"7137.Input.groups\"/>\n"
75 " <Domain name=\"input_type\" id=\"7137.Input.input_type\"/>\n"
76 " </Property>\n"
77 " </Proxy>\n"
78 " <ExposedProperties>\n"
79 " <Property name=\"Input\" proxy_name=\"ProgrammableFilter1\" exposed_name=\"Input\"/>\n"
80 " <!--Property name=\"Script\" proxy_name=\"ProgrammableFilter1\" exposed_name=\"Script\"/-->\n"
81 " <Property name=\"Expression\" proxy_name=\"PythonAnnotation1\" exposed_name=\"Expression\"/>\n"
82 " </ExposedProperties>\n"
83 " <OutputPort name=\"Output\" proxy=\"PythonAnnotation1\" port_index=\"0\"/>\n"
84 " <Hints>\n"
85 " <ShowInMenu category=\"Annotation\" />\n"
86 " <Visibility replace_input=\"0\" />\n"
87 " <OutputPort index=\"0\"\n"
88 " name=\"Output-0\"\n"
89 " type=\"text\" />\n"
90 " </Hints>\n"
91 " </CompoundSourceProxy>\n"
92 " </ProxyGroup>\n"
93 "</ServerManagerConfiguration>\n"
94 "\n";
95 // Get single string
97 {
98 
100  size_t len = ( 0
101  + len0 );
102  char* res = new char[ len + 1];
103  size_t offset = 0;
105  assert(offset == len);
106  res[offset] = 0;
107  return res;
108 }
109 
110 
111 
112 #endif
offset
static const char *const NetCDFTimeAnnotationPlugin_server_managerNetCDFTimeAnnotationInterface0
char * NetCDFTimeAnnotationPlugin_server_managerNetCDFTimeAnnotationGetInterfaces()