GPUdb C++ API  Version 7.2.2.4
visualize_image_chart.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __VISUALIZE_IMAGE_CHART_H__
7 #define __VISUALIZE_IMAGE_CHART_H__
8 
9 namespace gpudb
10 {
24  {
30  tableName(std::string()),
31  xColumnNames(std::vector<std::string>()),
32  yColumnNames(std::vector<std::string>()),
33  minX(double()),
34  maxX(double()),
35  minY(double()),
36  maxY(double()),
37  width(int32_t()),
38  height(int32_t()),
39  bgColor(std::string()),
40  styleOptions(std::map<std::string, std::vector<std::string> >()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
299  VisualizeImageChartRequest(const std::string& tableName_, const std::vector<std::string>& xColumnNames_, const std::vector<std::string>& yColumnNames_, const double minX_, const double maxX_, const double minY_, const double maxY_, const int32_t width_, const int32_t height_, const std::string& bgColor_, const std::map<std::string, std::vector<std::string> >& styleOptions_, const std::map<std::string, std::string>& options_):
300  tableName( tableName_ ),
301  xColumnNames( xColumnNames_ ),
302  yColumnNames( yColumnNames_ ),
303  minX( minX_ ),
304  maxX( maxX_ ),
305  minY( minY_ ),
306  maxY( maxY_ ),
307  width( width_ ),
308  height( height_ ),
309  bgColor( bgColor_ ),
310  styleOptions( styleOptions_ ),
311  options( options_ )
312  {
313  }
314 
321  std::string tableName;
322 
327  std::vector<std::string> xColumnNames;
328 
333  std::vector<std::string> yColumnNames;
334 
339  double minX;
340 
345  double maxX;
346 
351  double minY;
352 
357  double maxY;
358 
362  int32_t width;
363 
367  int32_t height;
368 
372  std::string bgColor;
373 
499  std::map<std::string, std::vector<std::string> > styleOptions;
500 
523  std::map<std::string, std::string> options;
524  };
525 } // end namespace gpudb
526 
527 namespace avro
528 {
529  template<> struct codec_traits<gpudb::VisualizeImageChartRequest>
530  {
531  static void encode(Encoder& e, const gpudb::VisualizeImageChartRequest& v)
532  {
533  ::avro::encode(e, v.tableName);
534  ::avro::encode(e, v.xColumnNames);
535  ::avro::encode(e, v.yColumnNames);
536  ::avro::encode(e, v.minX);
537  ::avro::encode(e, v.maxX);
538  ::avro::encode(e, v.minY);
539  ::avro::encode(e, v.maxY);
540  ::avro::encode(e, v.width);
541  ::avro::encode(e, v.height);
542  ::avro::encode(e, v.bgColor);
543  ::avro::encode(e, v.styleOptions);
544  ::avro::encode(e, v.options);
545  }
546 
547  static void decode(Decoder& d, gpudb::VisualizeImageChartRequest& v)
548  {
549  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
550  {
551  const std::vector<size_t> fo = rd->fieldOrder();
552 
553  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
554  {
555  switch (*it)
556  {
557  case 0:
558  ::avro::decode(d, v.tableName);
559  break;
560 
561  case 1:
562  ::avro::decode(d, v.xColumnNames);
563  break;
564 
565  case 2:
566  ::avro::decode(d, v.yColumnNames);
567  break;
568 
569  case 3:
570  ::avro::decode(d, v.minX);
571  break;
572 
573  case 4:
574  ::avro::decode(d, v.maxX);
575  break;
576 
577  case 5:
578  ::avro::decode(d, v.minY);
579  break;
580 
581  case 6:
582  ::avro::decode(d, v.maxY);
583  break;
584 
585  case 7:
586  ::avro::decode(d, v.width);
587  break;
588 
589  case 8:
590  ::avro::decode(d, v.height);
591  break;
592 
593  case 9:
594  ::avro::decode(d, v.bgColor);
595  break;
596 
597  case 10:
598  ::avro::decode(d, v.styleOptions);
599  break;
600 
601  case 11:
602  ::avro::decode(d, v.options);
603  break;
604 
605  default:
606  break;
607  }
608  }
609  }
610  else
611  {
612  ::avro::decode(d, v.tableName);
613  ::avro::decode(d, v.xColumnNames);
614  ::avro::decode(d, v.yColumnNames);
615  ::avro::decode(d, v.minX);
616  ::avro::decode(d, v.maxX);
617  ::avro::decode(d, v.minY);
618  ::avro::decode(d, v.maxY);
619  ::avro::decode(d, v.width);
620  ::avro::decode(d, v.height);
621  ::avro::decode(d, v.bgColor);
622  ::avro::decode(d, v.styleOptions);
623  ::avro::decode(d, v.options);
624  }
625  }
626  };
627 } // end namespace avro
628 
629 namespace gpudb
630 {
637  {
643  minX(double()),
644  maxX(double()),
645  minY(double()),
646  maxY(double()),
647  width(int32_t()),
648  height(int32_t()),
649  bgColor(std::string()),
650  imageData(std::vector<uint8_t>()),
651  axesInfo(std::map<std::string, std::vector<std::string> >()),
652  info(std::map<std::string, std::string>())
653  {
654  }
655 
661  double minX;
662 
668  double maxX;
669 
675  double minY;
676 
682  double maxY;
683 
688  int32_t width;
689 
694  int32_t height;
695 
700  std::string bgColor;
701 
705  std::vector<uint8_t> imageData;
706 
725  std::map<std::string, std::vector<std::string> > axesInfo;
726 
730  std::map<std::string, std::string> info;
731  };
732 } // end namespace gpudb
733 
734 namespace avro
735 {
736  template<> struct codec_traits<gpudb::VisualizeImageChartResponse>
737  {
738  static void encode(Encoder& e, const gpudb::VisualizeImageChartResponse& v)
739  {
740  ::avro::encode(e, v.minX);
741  ::avro::encode(e, v.maxX);
742  ::avro::encode(e, v.minY);
743  ::avro::encode(e, v.maxY);
744  ::avro::encode(e, v.width);
745  ::avro::encode(e, v.height);
746  ::avro::encode(e, v.bgColor);
747  ::avro::encode(e, v.imageData);
748  ::avro::encode(e, v.axesInfo);
749  ::avro::encode(e, v.info);
750  }
751 
752  static void decode(Decoder& d, gpudb::VisualizeImageChartResponse& v)
753  {
754  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
755  {
756  const std::vector<size_t> fo = rd->fieldOrder();
757 
758  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
759  {
760  switch (*it)
761  {
762  case 0:
763  ::avro::decode(d, v.minX);
764  break;
765 
766  case 1:
767  ::avro::decode(d, v.maxX);
768  break;
769 
770  case 2:
771  ::avro::decode(d, v.minY);
772  break;
773 
774  case 3:
775  ::avro::decode(d, v.maxY);
776  break;
777 
778  case 4:
779  ::avro::decode(d, v.width);
780  break;
781 
782  case 5:
783  ::avro::decode(d, v.height);
784  break;
785 
786  case 6:
787  ::avro::decode(d, v.bgColor);
788  break;
789 
790  case 7:
791  ::avro::decode(d, v.imageData);
792  break;
793 
794  case 8:
795  ::avro::decode(d, v.axesInfo);
796  break;
797 
798  case 9:
799  ::avro::decode(d, v.info);
800  break;
801 
802  default:
803  break;
804  }
805  }
806  }
807  else
808  {
809  ::avro::decode(d, v.minX);
810  ::avro::decode(d, v.maxX);
811  ::avro::decode(d, v.minY);
812  ::avro::decode(d, v.maxY);
813  ::avro::decode(d, v.width);
814  ::avro::decode(d, v.height);
815  ::avro::decode(d, v.bgColor);
816  ::avro::decode(d, v.imageData);
817  ::avro::decode(d, v.axesInfo);
818  ::avro::decode(d, v.info);
819  }
820  }
821  };
822 } // end namespace avro
823 
824 #endif // __VISUALIZE_IMAGE_CHART_H__
A set of parameters for GPUdb::visualizeImageChart.
VisualizeImageChartResponse()
Constructs a VisualizeImageChartResponse object with default parameters.
double maxX
Upper bound for the x column values as provided in maxX or calculated for non-numeric columns when pl...
std::map< std::string, std::vector< std::string > > axesInfo
Information returned for drawing labels for the axes associated with non-numeric columns.
double minX
Lower bound for the x column values.
int32_t height
Height of the image as provided in height.
double minX
Lower bound for the x column values as provided in minX or calculated for non-numeric columns when pl...
std::string bgColor
Background color of the image as provided in bgColor.
std::string tableName
Name of the table containing the data to be drawn as a chart, in [ schema_name. ]table_name format,...
double maxX
Upper bound for the x column values.
std::vector< std::string > yColumnNames
Names of the columns containing the data mapped to the y axis of a chart.
VisualizeImageChartRequest(const std::string &tableName_, const std::vector< std::string > &xColumnNames_, const std::vector< std::string > &yColumnNames_, const double minX_, const double maxX_, const double minY_, const double maxY_, const int32_t width_, const int32_t height_, const std::string &bgColor_, const std::map< std::string, std::vector< std::string > > &styleOptions_, const std::map< std::string, std::string > &options_)
Constructs a VisualizeImageChartRequest object with the specified parameters.
std::vector< uint8_t > imageData
The generated image data.
A set of results returned by GPUdb::visualizeImageChart.
double maxY
Upper bound for the y column values as provided in maxY or calculated for non-numeric columns when pl...
int32_t width
Width of the generated image in pixels.
double minY
Lower bound for the y column values as provided in minY or calculated for non-numeric columns when pl...
std::vector< std::string > xColumnNames
Names of the columns containing the data mapped to the x axis of a chart.
std::map< std::string, std::string > info
Additional information.
std::map< std::string, std::string > options
Optional parameters.
double minY
Lower bound for the y column values.
std::map< std::string, std::vector< std::string > > styleOptions
Rendering style options for a chart.
VisualizeImageChartRequest()
Constructs a VisualizeImageChartRequest object with default parameters.
int32_t width
Width of the image as provided in width.
double maxY
Upper bound for the y column values.
int32_t height
Height of the generated image in pixels.
std::string bgColor
Background color of the generated image.