GPUdb C++ API  Version 7.2.3.0
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 
300  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_):
301  tableName( tableName_ ),
302  xColumnNames( xColumnNames_ ),
303  yColumnNames( yColumnNames_ ),
304  minX( minX_ ),
305  maxX( maxX_ ),
306  minY( minY_ ),
307  maxY( maxY_ ),
308  width( width_ ),
309  height( height_ ),
310  bgColor( bgColor_ ),
311  styleOptions( styleOptions_ ),
312  options( options_ )
313  {
314  }
315 
322  std::string tableName;
323 
328  std::vector<std::string> xColumnNames;
329 
334  std::vector<std::string> yColumnNames;
335 
340  double minX;
341 
346  double maxX;
347 
352  double minY;
353 
358  double maxY;
359 
363  int32_t width;
364 
368  int32_t height;
369 
373  std::string bgColor;
374 
500  std::map<std::string, std::vector<std::string> > styleOptions;
501 
524  std::map<std::string, std::string> options;
525  };
526 } // end namespace gpudb
527 
528 namespace avro
529 {
530  template<> struct codec_traits<gpudb::VisualizeImageChartRequest>
531  {
532  static void encode(Encoder& e, const gpudb::VisualizeImageChartRequest& v)
533  {
534  ::avro::encode(e, v.tableName);
535  ::avro::encode(e, v.xColumnNames);
536  ::avro::encode(e, v.yColumnNames);
537  ::avro::encode(e, v.minX);
538  ::avro::encode(e, v.maxX);
539  ::avro::encode(e, v.minY);
540  ::avro::encode(e, v.maxY);
541  ::avro::encode(e, v.width);
542  ::avro::encode(e, v.height);
543  ::avro::encode(e, v.bgColor);
544  ::avro::encode(e, v.styleOptions);
545  ::avro::encode(e, v.options);
546  }
547 
548  static void decode(Decoder& d, gpudb::VisualizeImageChartRequest& v)
549  {
550  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
551  {
552  const std::vector<size_t> fo = rd->fieldOrder();
553 
554  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
555  {
556  switch (*it)
557  {
558  case 0:
559  ::avro::decode(d, v.tableName);
560  break;
561 
562  case 1:
563  ::avro::decode(d, v.xColumnNames);
564  break;
565 
566  case 2:
567  ::avro::decode(d, v.yColumnNames);
568  break;
569 
570  case 3:
571  ::avro::decode(d, v.minX);
572  break;
573 
574  case 4:
575  ::avro::decode(d, v.maxX);
576  break;
577 
578  case 5:
579  ::avro::decode(d, v.minY);
580  break;
581 
582  case 6:
583  ::avro::decode(d, v.maxY);
584  break;
585 
586  case 7:
587  ::avro::decode(d, v.width);
588  break;
589 
590  case 8:
591  ::avro::decode(d, v.height);
592  break;
593 
594  case 9:
595  ::avro::decode(d, v.bgColor);
596  break;
597 
598  case 10:
599  ::avro::decode(d, v.styleOptions);
600  break;
601 
602  case 11:
603  ::avro::decode(d, v.options);
604  break;
605 
606  default:
607  break;
608  }
609  }
610  }
611  else
612  {
613  ::avro::decode(d, v.tableName);
614  ::avro::decode(d, v.xColumnNames);
615  ::avro::decode(d, v.yColumnNames);
616  ::avro::decode(d, v.minX);
617  ::avro::decode(d, v.maxX);
618  ::avro::decode(d, v.minY);
619  ::avro::decode(d, v.maxY);
620  ::avro::decode(d, v.width);
621  ::avro::decode(d, v.height);
622  ::avro::decode(d, v.bgColor);
623  ::avro::decode(d, v.styleOptions);
624  ::avro::decode(d, v.options);
625  }
626  }
627  };
628 } // end namespace avro
629 
630 namespace gpudb
631 {
638  {
644  minX(double()),
645  maxX(double()),
646  minY(double()),
647  maxY(double()),
648  width(int32_t()),
649  height(int32_t()),
650  bgColor(std::string()),
651  imageData(std::vector<uint8_t>()),
652  axesInfo(std::map<std::string, std::vector<std::string> >()),
653  info(std::map<std::string, std::string>())
654  {
655  }
656 
662  double minX;
663 
669  double maxX;
670 
676  double minY;
677 
683  double maxY;
684 
689  int32_t width;
690 
695  int32_t height;
696 
701  std::string bgColor;
702 
706  std::vector<uint8_t> imageData;
707 
726  std::map<std::string, std::vector<std::string> > axesInfo;
727 
731  std::map<std::string, std::string> info;
732  };
733 } // end namespace gpudb
734 
735 namespace avro
736 {
737  template<> struct codec_traits<gpudb::VisualizeImageChartResponse>
738  {
739  static void encode(Encoder& e, const gpudb::VisualizeImageChartResponse& v)
740  {
741  ::avro::encode(e, v.minX);
742  ::avro::encode(e, v.maxX);
743  ::avro::encode(e, v.minY);
744  ::avro::encode(e, v.maxY);
745  ::avro::encode(e, v.width);
746  ::avro::encode(e, v.height);
747  ::avro::encode(e, v.bgColor);
748  ::avro::encode(e, v.imageData);
749  ::avro::encode(e, v.axesInfo);
750  ::avro::encode(e, v.info);
751  }
752 
753  static void decode(Decoder& d, gpudb::VisualizeImageChartResponse& v)
754  {
755  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
756  {
757  const std::vector<size_t> fo = rd->fieldOrder();
758 
759  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
760  {
761  switch (*it)
762  {
763  case 0:
764  ::avro::decode(d, v.minX);
765  break;
766 
767  case 1:
768  ::avro::decode(d, v.maxX);
769  break;
770 
771  case 2:
772  ::avro::decode(d, v.minY);
773  break;
774 
775  case 3:
776  ::avro::decode(d, v.maxY);
777  break;
778 
779  case 4:
780  ::avro::decode(d, v.width);
781  break;
782 
783  case 5:
784  ::avro::decode(d, v.height);
785  break;
786 
787  case 6:
788  ::avro::decode(d, v.bgColor);
789  break;
790 
791  case 7:
792  ::avro::decode(d, v.imageData);
793  break;
794 
795  case 8:
796  ::avro::decode(d, v.axesInfo);
797  break;
798 
799  case 9:
800  ::avro::decode(d, v.info);
801  break;
802 
803  default:
804  break;
805  }
806  }
807  }
808  else
809  {
810  ::avro::decode(d, v.minX);
811  ::avro::decode(d, v.maxX);
812  ::avro::decode(d, v.minY);
813  ::avro::decode(d, v.maxY);
814  ::avro::decode(d, v.width);
815  ::avro::decode(d, v.height);
816  ::avro::decode(d, v.bgColor);
817  ::avro::decode(d, v.imageData);
818  ::avro::decode(d, v.axesInfo);
819  ::avro::decode(d, v.info);
820  }
821  }
822  };
823 } // end namespace avro
824 
825 #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.