[med-svn] [aghermann] 17/23: ICM and some straightening up of things in primaries.hh

andrei zavada hmmr-guest at alioth.debian.org
Sat Aug 17 18:05:43 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 8e00c4efbe829ad307c0889dda0c56b4b42d1873
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Sun Aug 11 14:44:55 2013 +0300

    ICM and some straightening up of things in primaries.hh
---
 src/aghermann/expdesign/primaries.hh |   36 ++++++++++++++--------------------
 1 file changed, 15 insertions(+), 21 deletions(-)

diff --git a/src/aghermann/expdesign/primaries.hh b/src/aghermann/expdesign/primaries.hh
index 1e865c7..f3c83b8 100644
--- a/src/aghermann/expdesign/primaries.hh
+++ b/src/aghermann/expdesign/primaries.hh
@@ -65,16 +65,15 @@ class CSubject : public SSubjectId {
 		{}
 
       // identification
-	const string&
+	const char*
 	dir() const
-		{ return _dir; }
+		{ return _dir.c_str(); }
 
 	int try_update_subject_details( const agh::SSubjectId& j)
 		{
 			return SSubjectId::update_from( j);
 		}
 
-
 	float age( const string& d) const // age when recordings in this session were made
 		{
 			if ( measurements.find(d) != measurements.end() &&
@@ -101,9 +100,13 @@ class CSubject : public SSubjectId {
 		}
 
       // contents
-	class SEpisodeSequence;
-	class SEpisode {
-	    public:
+	struct SEpisodeSequence;
+	struct SEpisode {
+		SEpisode (sigfile::CTypedSource&&,
+			  const metrics::psd::SPPack&,
+			  const metrics::swu::SPPack&,
+			  const metrics::mc::SPPack&);
+
 		time_t start_time() const	{ return sources.front()().start_time(); }
 		time_t end_time() const		{ return sources.front()().end_time();	 }
 		time_t start_time()		{ return sources.front()().start_time(); }
@@ -116,11 +119,6 @@ class CSubject : public SSubjectId {
 		TRecordingSet
 			recordings; // one per channel, naturally
 
-		SEpisode (sigfile::CTypedSource&& Fmc,
-			  const metrics::psd::SPPack&,
-			  const metrics::swu::SPPack&,
-			  const metrics::mc::SPPack&);
-
 		const char*
 		name() const
 			{
@@ -139,16 +137,17 @@ class CSubject : public SSubjectId {
 			}
 
 		struct SAnnotation
-		      : public sigfile::SAnnotation {
-			const sigfile::CSource& _source;
-			int _h;
-			SAnnotation( const sigfile::CSource& _si, int _hi,
+		  : public sigfile::SAnnotation {
+			SAnnotation (const sigfile::CSource& _si, int _hi,
 				     const sigfile::SAnnotation& _a)
 			      : sigfile::SAnnotation (_a),
 				_source (_si), _h (_hi)
 				{}
 			SAnnotation( const SAnnotation&) = default;
 
+			const sigfile::CSource& _source;
+			int _h;
+
 			bool
 			operator<( const SAnnotation& rv) const
 				{
@@ -248,12 +247,7 @@ class CSubject : public SSubjectId {
 	bool
 	have_session( const string& d) const
 		{
-			try {
-				measurements.at(d);
-				return true;
-			} catch (...) {
-				return false;
-			}
+			return measurements.find(d) != measurements.end();
 		}
 
     private:

-- 
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