[med-svn] [SCM] aghermann branch, master, updated. 99b1d5a023eee9df74b0e0d6f894516fc79435ad

Andrei Zavada johnhommer at gmail.com
Sun Jul 7 23:03:40 UTC 2013


The following commit has been merged in the master branch:
commit 639c59227998eecc76c364ea6dd79693f0e22322
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Thu May 23 18:13:14 2013 +0300

    enclose confval in namespace agh

diff --git a/src/common/config-validate.hh b/src/common/config-validate.hh
index 718081b..e511d68 100644
--- a/src/common/config-validate.hh
+++ b/src/common/config-validate.hh
@@ -27,6 +27,7 @@
 #  include "config.h"
 #endif
 
+namespace agh {
 namespace confval {
 
 using namespace std;
@@ -207,6 +208,7 @@ put( forward_list<SValidator<T>>& vl,
 
 
 } // namespace confval
+} // namespace agh
 
 #endif // _AGH_CONFIG_VALIDATOR_H
 
diff --git a/src/expdesign/primaries.cc b/src/expdesign/primaries.cc
index 09c7f46..bd1e701 100644
--- a/src/expdesign/primaries.cc
+++ b/src/expdesign/primaries.cc
@@ -27,7 +27,7 @@
 
 using namespace std;
 
-using confval::SValidator;
+using agh::confval::SValidator;
 
 agh::CExpDesign::
 CExpDesign (const string& session_dir_,
diff --git a/src/ui/mw/loadsave.cc b/src/ui/mw/loadsave.cc
index 960edcc..1e0416e 100644
--- a/src/ui/mw/loadsave.cc
+++ b/src/ui/mw/loadsave.cc
@@ -85,10 +85,10 @@ load_settings()
 
 	try {
 		conf.readFile( CONF_FILE);
-		confval::get( config_keys_s, conf);
-		confval::get( config_keys_b, conf);
-		confval::get( config_keys_d, conf);
-		confval::get( config_keys_g, conf);
+		agh::confval::get( config_keys_s, conf);
+		agh::confval::get( config_keys_b, conf);
+		agh::confval::get( config_keys_d, conf);
+		agh::confval::get( config_keys_g, conf);
 
 		try {
 			auto& SC = conf.lookup("ScoreCodes");
@@ -178,21 +178,21 @@ save_settings()
 	_aghtt_placeholder = AghT();
 	_aghdd_placeholder = AghD();
 
-	confval::put( config_keys_s, conf);
-	confval::put( config_keys_b, conf);
-	confval::put( config_keys_d, conf);
-	confval::put( config_keys_g, conf);
+	agh::confval::put( config_keys_s, conf);
+	agh::confval::put( config_keys_b, conf);
+	agh::confval::put( config_keys_d, conf);
+	agh::confval::put( config_keys_g, conf);
 
-	confval::put( conf, "ScoreCodes", ext_score_codes);
+	agh::confval::put( conf, "ScoreCodes", ext_score_codes);
 
 	for ( auto &p : saving_colors() ) {
 		auto& C = CwB[p.second];
-		confval::put( conf, string("Color.") + p.first,
+		agh::confval::put( conf, string("Color.") + p.first,
 			      forward_list<double> {C.clr.red, C.clr.green, C.clr.blue, C.clr.alpha});
 	}
 
 	for ( unsigned i = metrics::psd::TBand::delta; i < metrics::psd::TBand::TBand_total; ++i )
-		confval::put( conf, string("Band.") + FreqBandNames[i],
+		agh::confval::put( conf, string("Band.") + FreqBandNames[i],
 			      forward_list<double> {freq_bands[i][0], freq_bands[i][1]});
 
 	conf.writeFile( CONF_FILE);
diff --git a/src/ui/mw/mw.cc b/src/ui/mw/mw.cc
index 087e397..793fea8 100644
--- a/src/ui/mw/mw.cc
+++ b/src/ui/mw/mw.cc
@@ -125,7 +125,7 @@ const array<double, 3>
 
 double aghui::SExpDesignUI::scroll_factor = 1.05;
 
-using confval::SValidator;
+using agh::confval::SValidator;
 
 aghui::SExpDesignUI::
 SExpDesignUI (aghui::SSessionChooser *parent,
diff --git a/src/ui/mw/mw.hh b/src/ui/mw/mw.hh
index 2bb0524..ca7d08b 100644
--- a/src/ui/mw/mw.hh
+++ b/src/ui/mw/mw.hh
@@ -351,10 +351,10 @@ class SExpDesignUI
 	SGeometry
 		geometry;
 
-	forward_list<confval::SValidator<string>>	config_keys_s;
-	forward_list<confval::SValidator<bool>>		config_keys_b;
-	forward_list<confval::SValidator<int>>		config_keys_d;
-	forward_list<confval::SValidator<double>>	config_keys_g;
+	forward_list<agh::confval::SValidator<string>>	config_keys_s;
+	forward_list<agh::confval::SValidator<bool>>	config_keys_b;
+	forward_list<agh::confval::SValidator<int>>	config_keys_d;
+	forward_list<agh::confval::SValidator<double>>	config_keys_g;
 	int load_settings();
 	int save_settings();
 
diff --git a/src/ui/sf/channel.cc b/src/ui/sf/channel.cc
index 6038024..a8ea52f 100644
--- a/src/ui/sf/channel.cc
+++ b/src/ui/sf/channel.cc
@@ -25,7 +25,7 @@ pattern::SPatternPPack<TFloat>
 	aghui::SScoringFacility::SChannel::pattern_params =
 		{.25,  0., 1.5, 1,  .1, .5, 3};
 
-using confval::SValidator;
+using agh::confval::SValidator;
 
 aghui::SScoringFacility::SChannel::
 SChannel (agh::CRecording& r,
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index 4083557..c3a44af 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -48,6 +48,8 @@ figure_display_pagesize_item( const size_t seconds)
 }
 
 
+using agh::confval::SValidator;
+
 aghui::SScoringFacility::
 SScoringFacility (agh::CSubject& J,
 		  const string& D, const string& E,
@@ -70,17 +72,17 @@ SScoringFacility (agh::CSubject& J,
 	interchannel_gap (IntersignalSpace),
 	n_hidden (0),
 	config_keys_b ({
-		confval::SValidator<bool>("show_cur_pos_time_relative",	&show_cur_pos_time_relative),
-		confval::SValidator<bool>("draw.crosshair",		&draw_crosshair),
-		confval::SValidator<bool>("draw.alt_hypnogram",		&alt_hypnogram),
+		SValidator<bool>("show_cur_pos_time_relative",	&show_cur_pos_time_relative),
+		SValidator<bool>("draw.crosshair",		&draw_crosshair),
+		SValidator<bool>("draw.alt_hypnogram",		&alt_hypnogram),
 	}),
 	config_keys_d ({
-		confval::SValidator<int>("cur_vpage",			(int*)&_cur_vpage,	confval::SValidator<int>::SVFRangeIn (0, INT_MAX)),
-		confval::SValidator<int>("pagesize_item",		(int*)&pagesize_item,	confval::SValidator<int>::SVFRangeIn (0, DisplayPageSizeValues.size()-1)),
+		SValidator<int>("cur_vpage",			(int*)&_cur_vpage,	SValidator<int>::SVFRangeIn (0, INT_MAX)),
+		SValidator<int>("pagesize_item",		(int*)&pagesize_item,	SValidator<int>::SVFRangeIn (0, DisplayPageSizeValues.size()-1)),
 	}),
 	config_keys_g ({
-		confval::SValidator<float>("montage.interchannel_gap",	&interchannel_gap,	confval::SValidator<float>::SVFRangeIn (0., 400.)),
-		confval::SValidator<float>("montage.height",		&da_ht,			confval::SValidator<float>::SVFRangeIn (10., 4000.)),
+		SValidator<float>("montage.interchannel_gap",	&interchannel_gap,	SValidator<float>::SVFRangeIn (0., 400.)),
+		SValidator<float>("montage.height",		&da_ht,			SValidator<float>::SVFRangeIn (10., 4000.)),
 	}),
 	_patterns_d (nullptr),
 	_filters_d (nullptr),
@@ -680,13 +682,13 @@ load_montage()
 	} catch (libconfig::FileIOException ex) {
 		return;
 	}
-	confval::get( config_keys_b, conf);
-	confval::get( config_keys_d, conf);
+	agh::confval::get( config_keys_b, conf);
+	agh::confval::get( config_keys_d, conf);
 
 	for ( auto &h : channels ) {
-		confval::get( h.config_keys_b, conf);
-		confval::get( h.config_keys_d, conf);
-		confval::get( h.config_keys_g, conf);
+		agh::confval::get( h.config_keys_b, conf);
+		agh::confval::get( h.config_keys_d, conf);
+		agh::confval::get( h.config_keys_g, conf);
 
 	      // postprocess a little
 		h.selection_start = h.selection_start_time * h.samplerate();
@@ -710,13 +712,13 @@ aghui::SScoringFacility::
 save_montage()
 {
 	libconfig::Config conf;
-	confval::put( config_keys_b, conf);
-	confval::put( config_keys_d, conf);
+	agh::confval::put( config_keys_b, conf);
+	agh::confval::put( config_keys_d, conf);
 
 	for ( auto &h : channels ) {
-		confval::put( h.config_keys_b, conf);
-		confval::put( h.config_keys_d, conf);
-		confval::put( h.config_keys_g, conf);
+		agh::confval::put( h.config_keys_b, conf);
+		agh::confval::put( h.config_keys_d, conf);
+		agh::confval::put( h.config_keys_g, conf);
 	}
 	try {
 		conf.writeFile ((agh::fs::make_fname_base( channels.front().crecording.F().filename(), ".edf", true) + ".montage").c_str());
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index 08cdcfc..51f1b44 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -240,9 +240,9 @@ class SScoringFacility
 		bool	discard_marked,
 			apply_reconstituted;
 
-		forward_list<confval::SValidator<bool>>		config_keys_b;
-		forward_list<confval::SValidator<int>>		config_keys_d;
-		forward_list<confval::SValidator<double>>	config_keys_g;
+		forward_list<agh::confval::SValidator<bool>>	config_keys_b;
+		forward_list<agh::confval::SValidator<int>>	config_keys_d;
+		forward_list<agh::confval::SValidator<double>>	config_keys_g;
 		void update_channel_menu_items( double x);
 		void update_power_menu_items();
 		void selectively_enable_selection_menu_items();
@@ -466,9 +466,9 @@ class SScoringFacility
     public:
       // montage
 	// load/save/reset
-	forward_list<confval::SValidator<bool>>		config_keys_b;
-	forward_list<confval::SValidator<int>>		config_keys_d;
-	forward_list<confval::SValidator<float>>	config_keys_g;
+	forward_list<agh::confval::SValidator<bool>>	config_keys_b;
+	forward_list<agh::confval::SValidator<int>>	config_keys_d;
+	forward_list<agh::confval::SValidator<float>>	config_keys_g;
 	void load_montage();
 	void save_montage(); // using libconfig
 	void reset_montage();

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list