The following commit has been merged in the master branch:
commit 523700453b58b856e75fd5409fcd1119f96ea82e
Author: Andrei Zavada <[email protected]>
Date:   Sun Feb 3 11:36:18 2013 +0200

    annotation handling functions take a type parameter

diff --git a/src/libsigfile/source-base.hh b/src/libsigfile/source-base.hh
index 6cbe838..c180fb4 100644
--- a/src/libsigfile/source-base.hh
+++ b/src/libsigfile/source-base.hh
@@ -124,8 +124,9 @@ struct SAnnotation {
        TType type;;
 
        SAnnotation( size_t aa, size_t az, const string& l, TType t = 
TType::plain)
-             : span {aa, az}, label (l)
-//               origin (_origin)
+             : span {aa, az},
+               label (l),
+               type (t)
                {}
 
        bool operator==( const SAnnotation& rv) const
@@ -141,9 +142,10 @@ struct SAnnotation {
 inline void
 mark_annotation( list<SAnnotation>& annotations,
                 size_t aa, size_t az,
-                const char* label)
+                const char* label,
+                SAnnotation::TType t = SAnnotation::TType::plain)
 {
-       annotations.emplace_back( aa, az, label);
+       annotations.emplace_back( aa, az, label, t);
        annotations.sort();
 }
 
diff --git a/src/ui/sf/channel.cc b/src/ui/sf/channel.cc
index 61c1cb6..7b43068 100644
--- a/src/ui/sf/channel.cc
+++ b/src/ui/sf/channel.cc
@@ -485,12 +485,13 @@ mark_region_as_artifact( bool do_mark)
 
 void
 aghui::SScoringFacility::SChannel::
-mark_region_as_annotation( const char *label)
+mark_region_as_annotation( const char *label, sigfile::SAnnotation::TType type)
 {
        sigfile::mark_annotation(
                crecording.F().annotations(_h),
                selection_start, selection_end,
-               label);
+               label,
+               type);
 }
 
 
diff --git a/src/ui/sf/d/patterns.cc b/src/ui/sf/d/patterns.cc
index 5f7d036..6437dc2 100644
--- a/src/ui/sf/d/patterns.cc
+++ b/src/ui/sf/d/patterns.cc
@@ -132,13 +132,14 @@ find_occurrences()
 
 void
 aghui::SScoringFacility::SPatternsDialog::
-occurrences_to_annotations()
+occurrences_to_annotations( sigfile::SAnnotation::TType t)
 {
        for ( size_t o = 0; o < occurrences.size(); ++o )
                sigfile::mark_annotation(
                        field_channel->annotations,
                        occurrences[o], occurrences[o] + 
current_pattern->pattern_size_essential(),
-                       (snprintf_buf("%s (%zu)", 
current_pattern->name.c_str(), o+1), __buf__));
+                       (snprintf_buf("%s (%zu)", 
current_pattern->name.c_str(), o+1), __buf__),
+                       t);
 }
 
 void
diff --git a/src/ui/sf/d/patterns.hh b/src/ui/sf/d/patterns.hh
index b445803..aa6295f 100644
--- a/src/ui/sf/d/patterns.hh
+++ b/src/ui/sf/d/patterns.hh
@@ -136,7 +136,7 @@ struct SScoringFacility::SPatternsDialog
                *field_channel_saved;
        list<sigfile::SAnnotation>
                saved_annotations;
-       void occurrences_to_annotations();
+       void occurrences_to_annotations( sigfile::SAnnotation::TType = 
sigfile::SAnnotation::TType::plain);
        void save_annotations();
        void restore_annotations();
 
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index dae24e3..b7bb730 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -206,7 +206,7 @@ class SScoringFacility
 
              // region
                void mark_region_as_artifact( bool do_mark);
-               void mark_region_as_annotation( const char*);
+               void mark_region_as_annotation( const char*, 
sigfile::SAnnotation::TType);
                void mark_region_as_pattern();
 
              // ctor, dtor

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to