4 #include <model_server/lib/toolkit_class_macros.hpp> 5 #include <model_server/lib/toolkit_function_macros.hpp> 6 #include <visualization/server/transformation.hpp> 7 #include <model_server/lib/extensions/model_base.hpp> 9 #include <capi/TuriCreate.h> 14 #include <CoreGraphics/CoreGraphics.h> 16 #endif // TC_BUILD_IOS 20 namespace visualization {
22 class Plot:
public model_base {
24 mutable std::string m_id;
25 std::string m_vega_spec;
27 std::shared_ptr<transformation_base> m_transformer;
31 explicit Plot(
const std::string& vega_spec);
32 Plot(
const std::string& vega_spec, std::shared_ptr<transformation_base> transformer,
double size_array);
33 void show(
const std::string& path_to_client, tc_plot_variation variation = tc_plot_variation_default);
34 void materialize()
const;
35 std::string get_url()
const;
36 const std::string& get_id()
const;
39 std::string get_spec(tc_plot_variation variation=tc_plot_variation_default,
40 bool include_data=
false)
const;
43 double get_percent_complete()
const;
44 bool finished_streaming()
const;
45 std::string get_next_data()
const;
48 std::string get_data()
const;
55 bool render(CGContextRef context, tc_plot_variation variation=tc_plot_variation_default);
58 static void render(
const std::string& vega_spec, CGContextRef context);
59 #endif // TC_BUILD_IOS 71 std::shared_ptr<Plot> plot_from_vega_spec(const
std::
string& vega_spec);
#define BEGIN_CLASS_MEMBER_REGISTRATION(python_facing_classname)
#define REGISTER_CLASS_MEMBER_FUNCTION(function,...)
#define END_CLASS_MEMBER_REGISTRATION