gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window-cpp.h
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年10月26日 14:22:07 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年10月26日 14:22:07 +0200
commit7e665c04ea2063264a6415bfbd03ae0de2da0bcd (patch)
tree93667d65eff9d3e910cfb25edcd0c98a6c875f1f /agg-plot/window-cpp.h
parent071e8359e6c9019b3f3ddc41d8185d391458906b (diff)
downloadgsl-shell-7e665c04ea2063264a6415bfbd03ae0de2da0bcd.tar.gz
added error handling when an invalid split string is given
Diffstat (limited to 'agg-plot/window-cpp.h')
-rw-r--r--agg-plot/window-cpp.h 11
1 files changed, 9 insertions, 2 deletions
diff --git a/agg-plot/window-cpp.h b/agg-plot/window-cpp.h
index 1af65010..0bb13e91 100644
--- a/agg-plot/window-cpp.h
+++ b/agg-plot/window-cpp.h
@@ -18,6 +18,11 @@ extern "C" {
class window : public canvas_window {
public:
+ enum error_e {
+ invalid_split_string,
+ invalid_slot,
+ };
+
typedef plot<drawable, lua_management> plot_type;
typedef agg::trans_affine bmatrix;
@@ -62,12 +67,12 @@ private:
public:
window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0)
{
- this->split(".");
+ this->split(".");
};
~window() { if (m_tree) delete m_tree; };
- void split(const char *spec);
+ bool split(const char *spec);
int attach(lua_plot *plot, const char *spec);
void draw_slot(int slot_id, bool update_req);
void refresh_slot(int slot_id);
@@ -84,4 +89,6 @@ public:
virtual void on_draw();
virtual void on_resize(int sx, int sy);
+
+ static const char * error_message(error_e code);
};
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月13日 19:47:51 +0000

AltStyle によって変換されたページ (->オリジナル) /