From b8b8c746d90fe126737fba108a84ecb52dc3f5bb Mon Sep 17 00:00:00 2001 From: "Y. Sapir" Date: Sun, 25 May 2014 00:10:20 +0300 Subject: [PATCH] Make clear_regions and delete_region methods private (both Print & Layer), and remove from XSP. --- xs/src/Layer.hpp | 6 ++++-- xs/src/Print.hpp | 4 +++- xs/xsp/Layer.xsp | 3 --- xs/xsp/Print.xsp | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xs/src/Layer.hpp b/xs/src/Layer.hpp index a36d15c48..ca876be99 100644 --- a/xs/src/Layer.hpp +++ b/xs/src/Layer.hpp @@ -82,18 +82,20 @@ class Layer { size_t region_count(); - void clear_regions(); LayerRegion* get_region(int idx); LayerRegion* add_region(PrintRegion* print_region); - void delete_region(int idx); protected: int _id; // sequential number of layer, 0-based PrintObject *_object; + Layer(int id, PrintObject *object, coordf_t height, coordf_t print_z, coordf_t slice_z); virtual ~Layer(); + + void clear_regions(); + void delete_region(int idx); }; diff --git a/xs/src/Print.hpp b/xs/src/Print.hpp index e1b321653..8896ccd02 100644 --- a/xs/src/Print.hpp +++ b/xs/src/Print.hpp @@ -154,9 +154,11 @@ class Print const BoundingBoxf3 &modobj_bbox); void delete_object(int idx); - void clear_regions(); PrintRegion* get_region(int idx); PrintRegion* add_region(); + + private: + void clear_regions(); void delete_region(int idx); }; diff --git a/xs/xsp/Layer.xsp b/xs/xsp/Layer.xsp index 504dbfac9..35cf6f9ea 100644 --- a/xs/xsp/Layer.xsp +++ b/xs/xsp/Layer.xsp @@ -52,7 +52,6 @@ %code%{ THIS->lower_layer = layer; %}; size_t region_count(); - void clear_regions(); Ref get_region(int idx); Ref add_region(PrintRegion* print_region); @@ -96,10 +95,8 @@ %code%{ THIS->lower_layer = layer; %}; size_t region_count(); - void clear_regions(); Ref get_region(int idx); Ref add_region(PrintRegion* print_region); - void delete_region(int idx); Ref slices() %code%{ RETVAL = &THIS->slices; %}; diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index 329fd49a8..2e9d32e7c 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -158,7 +158,6 @@ _constant() PrintRegionPtrs* regions() %code%{ RETVAL = &THIS->regions; %}; - void clear_regions(); Ref get_region(int idx); Ref add_region(); size_t region_count()