[med-svn] [aghermann] 53/85: every little debugging helps
andrei zavada
hmmr-guest at alioth.debian.org
Thu Sep 26 23:46:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch master
in repository aghermann.
commit e493ebcd43f7d01b215e839e6d6a845556401864
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Fri Sep 20 03:02:45 2013 +0300
every little debugging helps
---
upstream/src/aghermann/expdesign/dirlevel.cc | 10 ++++++
upstream/src/aghermann/expdesign/dirlevel.hh | 1 +
upstream/src/aghermann/patterns/patterns.cc | 33 ++++++++++++++++++++
upstream/src/aghermann/patterns/patterns.hh | 4 +--
.../src/aghermann/ui/dirlevel-storable-adapter.ii | 3 +-
5 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc
index fd67777..86b76a8 100644
--- a/upstream/src/aghermann/expdesign/dirlevel.cc
+++ b/upstream/src/aghermann/expdesign/dirlevel.cc
@@ -137,6 +137,16 @@ save()
}
+string
+CStorablePPack::
+serialize() const
+{
+ return move(
+ str::sasprintf(
+ "%s/%s %s (%s/%s/%s)",
+ subdir.c_str(), name.c_str(), exp_dir_level_s(), level_id.g.c_str(), level_id.j.c_str(), level_id.d.c_str()));
+}
+
// Local Variables:
// Mode: c++
diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh
index 65c575c..f512806 100644
--- a/upstream/src/aghermann/expdesign/dirlevel.hh
+++ b/upstream/src/aghermann/expdesign/dirlevel.hh
@@ -90,6 +90,7 @@ class CStorablePPack {
virtual int load();
virtual int save();
+ virtual string serialize() const;
void touch()
{ saved = false; }
diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc
index 8bb6434..380d3d4 100644
--- a/upstream/src/aghermann/patterns/patterns.cc
+++ b/upstream/src/aghermann/patterns/patterns.cc
@@ -174,6 +174,39 @@ load()
template <>
+string
+SPattern<TFloat>::
+serialize() const
+{
+ return CStorablePPack::serialize() +
+ str::sasprintf(
+ " ::"
+ " env_scope: %g;"
+ " bwf_ffrom: %g;"
+ " bwf_fupto: %g;"
+ " bwf_order: %d;"
+ " dzcdf_step: %g;"
+ " dzcdf_sigma: %g;"
+ " dzcdf_smooth: %d;"
+ " criteria: %g %g %g %g;"
+ " thing: %zu smpl;",
+ Pp.env_scope,
+ Pp.bwf_ffrom,
+ Pp.bwf_fupto,
+ Pp.bwf_order,
+ Pp.dzcdf_step,
+ Pp.dzcdf_sigma,
+ Pp.dzcdf_smooth,
+ get<0>(criteria),
+ get<1>(criteria),
+ get<2>(criteria),
+ get<3>(criteria),
+ thing.size());
+}
+
+
+
+template <>
SPattern<TFloat>::
SPattern (const string& name_, TExpDirLevel level_, CExpDesign& ED_, const SExpDirLevelId& level_id_)
: CStorablePPack (".patterns", name_, level_, ED_, level_id_),
diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh
index 6407f42..7138f76 100644
--- a/upstream/src/aghermann/patterns/patterns.hh
+++ b/upstream/src/aghermann/patterns/patterns.hh
@@ -192,9 +192,9 @@ struct SPattern
int load();
int save();
+ string serialize() const;
- int
- delete_file();
+ int delete_file();
valarray<T>
thing;
diff --git a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii
index 12c1125..23a13fe 100644
--- a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii
+++ b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii
@@ -143,7 +143,8 @@ set_profile_manage_buttons_visibility()
bool have_active = current_profile != profiles.end(),
is_transient = have_active && current_profile->level == agh::TExpDirLevel::transient,
is_modified = have_active && not (*current_profile == Pp2);
- //printf( "active %d %s %d\n", have_active, have_active ? agh::exp_dir_level_s(current_profile->level) : "-", have_active ? not (*current_profile == Pp2) : -1);
+ printf( "active %d %s %d\n", have_active, have_active ? agh::exp_dir_level_s(current_profile->level) : "-", have_active ? not (*current_profile == Pp2) : -1);
+ printf( "%s\n-vs-\n%s\n", have_active ? current_profile->serialize().c_str() : "??", Pp2.serialize().c_str());
gtk_widget_set_visible( (GtkWidget*)bXProfileSave, have_active);
gtk_widget_set_visible( (GtkWidget*)bXProfileRevert, have_active and not is_transient and is_modified);
gtk_widget_set_visible( (GtkWidget*)bXProfileDiscard, have_active and not is_transient);
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list