[med-svn] [aghermann] 09/85: whitespaaace and a little ICM
andrei zavada
hmmr-guest at alioth.debian.org
Thu Sep 26 23:46:23 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 fd52b8418d97a371d1af9bdb57d73b25fe236768
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Fri Sep 6 19:53:08 2013 +0300
whitespaaace and a little ICM
---
upstream/src/aghermann/main.cc | 11 +--
upstream/src/aghermann/rk1968/rk1968.hh | 2 +-
upstream/src/common/alg.hh | 2 +-
upstream/src/common/config-validate.hh | 8 +-
upstream/src/common/containers.hh | 2 +-
upstream/src/common/fs.hh | 2 +-
upstream/src/common/lang.hh | 2 +-
upstream/src/common/string.hh | 2 +-
upstream/src/common/subject_id.hh | 2 +-
upstream/src/libmetrics/all.hh | 2 +-
upstream/src/libmetrics/bands.hh | 2 +-
upstream/src/libmetrics/forward-decls.hh | 2 +-
upstream/src/libmetrics/mc-artifacts.hh | 2 +-
upstream/src/libmetrics/mc.hh | 2 +-
upstream/src/libmetrics/page-metrics-base.hh | 2 +-
upstream/src/libmetrics/psd.hh | 2 +-
upstream/src/libmetrics/swu.hh | 2 +-
upstream/src/libsigfile/all.hh | 2 +-
upstream/src/libsigfile/channel.hh | 32 +++-----
upstream/src/libsigfile/edf.hh | 68 ++++++++--------
upstream/src/libsigfile/forward-decls.hh | 2 +-
upstream/src/libsigfile/page.hh | 26 +++---
upstream/src/libsigfile/source-base.hh | 112 ++++++++++++--------------
upstream/src/libsigfile/tsv.hh | 26 +++---
upstream/src/libsigfile/typed-source.hh | 2 +-
upstream/src/libsigproc/exstrom.hh | 2 +-
upstream/src/libsigproc/ext-filters.hh | 2 +-
upstream/src/libsigproc/sigproc.hh | 2 +-
upstream/src/libsigproc/winfun.hh | 2 +-
29 files changed, 151 insertions(+), 176 deletions(-)
diff --git a/upstream/src/aghermann/main.cc b/upstream/src/aghermann/main.cc
index b533709..685f78e 100644
--- a/upstream/src/aghermann/main.cc
+++ b/upstream/src/aghermann/main.cc
@@ -24,12 +24,13 @@
#include "ui/ui.hh"
#include "ui/sm/sm.hh"
+using namespace std;
using namespace agh;
void print_version();
namespace {
-UniqueResponse message_received_cb( UniqueApp*, UniqueCommand, UniqueMessageData*, const guint, gpointer);
+UniqueResponse message_received_cb( UniqueApp*, UniqueCommand, UniqueMessageData*, guint, gpointer);
void print_usage( const char*);
}
@@ -40,7 +41,7 @@ main( int argc, char **argv)
print_version();
bool headless = false;
- int c;
+ int c;
while ( (c = getopt( argc, argv, "hn")) != -1 )
switch ( c ) {
case 'n': // headless
@@ -107,9 +108,9 @@ namespace {
UniqueResponse
message_received_cb(
UniqueApp*,
- const UniqueCommand command,
- UniqueMessageData *message,
- const guint time_,
+ const UniqueCommand command,
+ UniqueMessageData *message,
+ const guint time_,
gpointer)
{
if ( ui::global::main_window == NULL )
diff --git a/upstream/src/aghermann/rk1968/rk1968.hh b/upstream/src/aghermann/rk1968/rk1968.hh
index 926faef..84bfd7d 100644
--- a/upstream/src/aghermann/rk1968/rk1968.hh
+++ b/upstream/src/aghermann/rk1968/rk1968.hh
@@ -18,7 +18,7 @@ namespace agh {
namespace rk1968 {
struct SScoreAssistantPPack {
- double nrem3_delta_theta_ratio;
+ double nrem3_delta_theta_ratio;
SScoreAssistantPPack (const SScoreAssistantPPack&) = default;
SScoreAssistantPPack ()
diff --git a/upstream/src/common/alg.hh b/upstream/src/common/alg.hh
index 7a3b422..1a91f5d 100644
--- a/upstream/src/common/alg.hh
+++ b/upstream/src/common/alg.hh
@@ -191,7 +191,7 @@ double sensible_scale_reduction_factor( double display_scale,
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/common/config-validate.hh b/upstream/src/common/config-validate.hh
index cde3f2c..65e8596 100644
--- a/upstream/src/common/config-validate.hh
+++ b/upstream/src/common/config-validate.hh
@@ -28,17 +28,17 @@
# include "config.h"
#endif
+using namespace std;
+
namespace agh {
namespace confval {
-using namespace std;
-
template <typename T> libconfig::Setting::Type libconfig_type_id();
template <> libconfig::Setting::Type inline libconfig_type_id<bool> () { return libconfig::Setting::Type::TypeBoolean; }
template <> libconfig::Setting::Type inline libconfig_type_id<int> () { return libconfig::Setting::Type::TypeInt; }
template <> libconfig::Setting::Type inline libconfig_type_id<size_t> () { return libconfig::Setting::Type::TypeInt64; }
-template <> libconfig::Setting::Type inline libconfig_type_id<const char*> () { return libconfig::Setting::Type::TypeString; }
+template <> libconfig::Setting::Type inline libconfig_type_id<const char*> () { return libconfig::Setting::Type::TypeString; }
template <> libconfig::Setting::Type inline libconfig_type_id<string> () { return libconfig::Setting::Type::TypeString; }
template <> libconfig::Setting::Type inline libconfig_type_id<double> () { return libconfig::Setting::Type::TypeFloat; }
template <> libconfig::Setting::Type inline libconfig_type_id<float> () { return libconfig::Setting::Type::TypeFloat; }
@@ -215,7 +215,7 @@ put( forward_list<SValidator<T>>& vl,
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/common/containers.hh b/upstream/src/common/containers.hh
index 29ea4e0..1620e62 100644
--- a/upstream/src/common/containers.hh
+++ b/upstream/src/common/containers.hh
@@ -61,7 +61,7 @@ member( const K& x, const map<K, V>& m)
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/common/fs.hh b/upstream/src/common/fs.hh
index 85cfea8..2dd5f4d 100644
--- a/upstream/src/common/fs.hh
+++ b/upstream/src/common/fs.hh
@@ -90,7 +90,7 @@ extern size_t total_supported_sigfiles;
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/common/lang.hh b/upstream/src/common/lang.hh
index a3b6985..404ed3b 100644
--- a/upstream/src/common/lang.hh
+++ b/upstream/src/common/lang.hh
@@ -65,7 +65,7 @@ typedef unsigned long hash_t;
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/common/string.hh b/upstream/src/common/string.hh
index 475f186..42fb302 100644
--- a/upstream/src/common/string.hh
+++ b/upstream/src/common/string.hh
@@ -106,7 +106,7 @@ string dhms_colon( double seconds, int decimal_digits = 0) __attribute__ ((pure)
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/common/subject_id.hh b/upstream/src/common/subject_id.hh
index a1b7894..2f77b4e 100644
--- a/upstream/src/common/subject_id.hh
+++ b/upstream/src/common/subject_id.hh
@@ -105,7 +105,7 @@ struct SSubjectId {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/all.hh b/upstream/src/libmetrics/all.hh
index 3e689af..e2e2eb3 100644
--- a/upstream/src/libmetrics/all.hh
+++ b/upstream/src/libmetrics/all.hh
@@ -21,7 +21,7 @@
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/bands.hh b/upstream/src/libmetrics/bands.hh
index cb80d0c..9c01fa1 100644
--- a/upstream/src/libmetrics/bands.hh
+++ b/upstream/src/libmetrics/bands.hh
@@ -37,7 +37,7 @@ enum TBand {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/forward-decls.hh b/upstream/src/libmetrics/forward-decls.hh
index f85db7b..b9a074b 100644
--- a/upstream/src/libmetrics/forward-decls.hh
+++ b/upstream/src/libmetrics/forward-decls.hh
@@ -44,7 +44,7 @@ namespace phasic {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/mc-artifacts.hh b/upstream/src/libmetrics/mc-artifacts.hh
index d5ca1f8..77005cf 100644
--- a/upstream/src/libmetrics/mc-artifacts.hh
+++ b/upstream/src/libmetrics/mc-artifacts.hh
@@ -80,7 +80,7 @@ estimate_E( const valarray<T>& sssu_diff,
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/mc.hh b/upstream/src/libmetrics/mc.hh
index c7f2ac9..ec6b23a 100644
--- a/upstream/src/libmetrics/mc.hh
+++ b/upstream/src/libmetrics/mc.hh
@@ -210,7 +210,7 @@ do_sssu_reduction( const valarray<T>& S,
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/page-metrics-base.hh b/upstream/src/libmetrics/page-metrics-base.hh
index b3ae84a..8d71ae8 100644
--- a/upstream/src/libmetrics/page-metrics-base.hh
+++ b/upstream/src/libmetrics/page-metrics-base.hh
@@ -188,7 +188,7 @@ class CProfile {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/psd.hh b/upstream/src/libmetrics/psd.hh
index 269f13b..90612d3 100644
--- a/upstream/src/libmetrics/psd.hh
+++ b/upstream/src/libmetrics/psd.hh
@@ -173,7 +173,7 @@ class CProfile
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libmetrics/swu.hh b/upstream/src/libmetrics/swu.hh
index 717ed7f..15645a1 100644
--- a/upstream/src/libmetrics/swu.hh
+++ b/upstream/src/libmetrics/swu.hh
@@ -96,7 +96,7 @@ class CProfile
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/all.hh b/upstream/src/libsigfile/all.hh
index 63ff097..6a678ee 100644
--- a/upstream/src/libsigfile/all.hh
+++ b/upstream/src/libsigfile/all.hh
@@ -20,7 +20,7 @@
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/channel.hh b/upstream/src/libsigfile/channel.hh
index 1905746..b5a81ff 100644
--- a/upstream/src/libsigfile/channel.hh
+++ b/upstream/src/libsigfile/channel.hh
@@ -112,9 +112,7 @@ struct SChannel {
static tuple<TType, int> figure_type_and_name( const string&);
static bool is_fftable( TType type)
- {
- return type == TType::eeg;
- }
+ { return type == TType::eeg; }
// ctor
SChannel (const string& h)
@@ -160,13 +158,11 @@ struct SChannel {
{ return _idx; }
bool is_fftable() const
- {
- return is_fftable( _type);
- }
+ { return is_fftable( _type); }
private:
- TType _type;
- int _idx;
- string _custom_name;
+ TType _type;
+ int _idx;
+ string _custom_name;
public:
// compares by channel actual locations, antero-posteriorly
@@ -182,21 +178,11 @@ struct SChannel {
} else
return _type < rv._type;
}
+
bool operator==( const SChannel& rv) const
- {
- return _type == rv._type && _idx == rv._idx;
- }
+ { return _type == rv._type && _idx == rv._idx; }
bool operator==( const char* rv) const
- {
- return 0 == strcasecmp( name(), rv);
- }
-
- // void operator=( const SChannel& rv)
- // {
- // _type = rv._type;
- // _idx = rv._idx;
- // _custom_name = rv._custom_name;
- // }
+ { return 0 == strcasecmp( name(), rv); }
};
template <typename C>
@@ -220,7 +206,7 @@ join_channel_names( const C& l, const char* sep)
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/edf.hh b/upstream/src/libsigfile/edf.hh
index 7f40b26..bca5ed9 100644
--- a/upstream/src/libsigfile/edf.hh
+++ b/upstream/src/libsigfile/edf.hh
@@ -60,7 +60,7 @@ class CEDFFile
case TSubtype::edf: return "edf";
case TSubtype::edfplus_c: return "edf+c";
case TSubtype::edfplus_d: return "edf+d";
- default: return "(invalid)";
+ default: return "(invalid)";
}
}
const char*
@@ -74,8 +74,8 @@ class CEDFFile
throw invalid_argument("nono");
}
enum TFlags {
- no_mmap = 1<<3,
- no_cache = 1<<4, // just considering
+ no_mmap = 1<<3,
+ no_cache = 1<<4, // just considering
};
// open existing
CEDFFile (const string& fname, int flags = 0);
@@ -251,28 +251,28 @@ class CEDFFile
// static fields (mmapped)
struct SEDFHeader {
- char *version_number , //[ 8],
- *patient_id , //[80], // maps to subject name
- *recording_id , //[80], // maps to episode_name (session_name)
- *recording_date , //[ 8],
- *recording_time , //[ 8],
- *header_length , //[ 8],
- *reserved , //[44],
- *n_data_records , //[ 8],
+ char *version_number , //[ 8],
+ *patient_id , //[80], // maps to subject name
+ *recording_id , //[80], // maps to episode_name (session_name)
+ *recording_date , //[ 8],
+ *recording_time , //[ 8],
+ *header_length , //[ 8],
+ *reserved , //[44],
+ *n_data_records , //[ 8],
*data_record_size, //[ 8],
*n_channels ; //[ 4];
};
SEDFHeader header;
// relevant converted integers
- double data_record_size;
- size_t n_data_records;
+ double data_record_size;
+ size_t n_data_records;
// channels
struct SSignal {
static const char* edf_annotations_label;
struct SEDFSignalHeader {
- char *label ,// [16],
+ char *label ,// [16],
*transducer_type ,// [80],
*physical_dim ,// [ 8],
*physical_min ,// [ 8],
@@ -284,17 +284,17 @@ class CEDFFile
*reserved ;// [32];
};
SEDFSignalHeader
- header;
+ header;
SChannel
ucd; // Universal Channel Designation, епта
- string transducer_type,
+ string transducer_type,
physical_dim,
filtering_info,
reserved;
- int digital_min,
+ int digital_min,
digital_max;
- double physical_min,
+ double physical_min,
physical_max,
scale;
void set_physical_range( double, double);
@@ -302,13 +302,9 @@ class CEDFFile
size_t samples_per_record;
bool operator==( const SChannel& h) const
- {
- return ucd == h;
- }
+ { return ucd == h; }
bool operator==( const string& h) const
- {
- return ucd.name() == h;
- }
+ { return ucd.name() == h; }
list<SAnnotation>
annotations;
@@ -318,7 +314,7 @@ class CEDFFile
filters;
private:
friend class CEDFFile;
- size_t _at; // offset of our chunk within record, in samples
+ size_t _at; // offset of our chunk within record, in samples
};
vector<SSignal>
channels;
@@ -357,15 +353,15 @@ class CEDFFile
enum TStatus : int_least32_t {
- bad_version = (1 << (COMMON_STATUS_BITS + 1)),
+ bad_version = (1 << (COMMON_STATUS_BITS + 1)),
file_truncated = (1 << (COMMON_STATUS_BITS + 2)),
trailing_junk = (1 << (COMMON_STATUS_BITS + 3)),
- mmap_error = (1 << (COMMON_STATUS_BITS + 4)),
- nogain = (1 << (COMMON_STATUS_BITS + 5)),
+ mmap_error = (1 << (COMMON_STATUS_BITS + 4)),
+ nogain = (1 << (COMMON_STATUS_BITS + 5)),
nonconforming_patient_id = (1 << (COMMON_STATUS_BITS + 6)),
extra_patientid_subfields = (1 << (COMMON_STATUS_BITS + 7)),
- inoperable = (bad_header
+ inoperable = (bad_header
| bad_version
| bad_numfld
| bad_datetime
@@ -378,9 +374,10 @@ class CEDFFile
};
private:
- TSubtype _subtype;
+ TSubtype
+ _subtype;
- string _patient_id, // this is trimmed, raw; parsed into SSubjectId fields
+ string _patient_id, // this is trimmed, raw; parsed into SSubjectId fields
_recording_id,
// take care of file being named 'episode-1.edf'
_episode,
@@ -392,14 +389,14 @@ class CEDFFile
int _parse_header();
int _extract_embedded_annotations();
- size_t header_length,
+ size_t header_length,
_fsize,
_fld_pos,
_total_samples_per_record;
char* _get_next_field( char*&, size_t) throw (TStatus);
- void *_mmapping;
- int _fd;
+ void *_mmapping;
+ int _fd;
vector<double>
_record_offsets;
@@ -413,7 +410,8 @@ class CEDFFile
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
+
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/forward-decls.hh b/upstream/src/libsigfile/forward-decls.hh
index 13c5c51..d325ed6 100644
--- a/upstream/src/libsigfile/forward-decls.hh
+++ b/upstream/src/libsigfile/forward-decls.hh
@@ -33,7 +33,7 @@ class CEDFFile;
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/page.hh b/upstream/src/libsigfile/page.hh
index ebcdb12..3aefb3a 100644
--- a/upstream/src/libsigfile/page.hh
+++ b/upstream/src/libsigfile/page.hh
@@ -31,8 +31,12 @@ namespace sigfile {
struct SPage {
enum TScore : unsigned short {
none,
- nrem1, nrem2, nrem3, nrem4,
- rem, wake,
+ nrem1,
+ nrem2,
+ nrem3,
+ nrem4,
+ rem,
+ wake,
TScore_total
};
static const char score_codes[TScore::TScore_total];
@@ -67,7 +71,7 @@ struct SPage {
}
// class proper
- float NREM, REM, Wake;
+ float NREM, REM, Wake;
TScore score() const
{
return (NREM > 3./4) ? TScore::nrem4
@@ -130,12 +134,12 @@ struct SPage {
struct SPageWithMetric : public SPage {
- TFloat metric;
- SPageWithMetric( float nrem = 0., float rem = 0., float wake = 0., TFloat metric_ = 0.)
+ TFloat metric;
+ SPageWithMetric (float nrem = 0., float rem = 0., float wake = 0., TFloat metric_ = 0.)
: SPage (nrem, rem, wake),
metric (metric_)
{}
- SPageWithMetric( const SPage& p,
+ SPageWithMetric (const SPage& p,
TFloat metric_ = 0.)
: SPage (p),
metric (metric_)
@@ -143,14 +147,14 @@ struct SPageWithMetric : public SPage {
};
struct SPageSimulated : public SPageWithMetric {
- TFloat S,
+ TFloat S,
metric_sim;
- SPageSimulated( float nrem = 0., float rem = 0., float wake = 0.,
+ SPageSimulated (float nrem = 0., float rem = 0., float wake = 0.,
TFloat metric_ = 0.)
: SPageWithMetric (nrem, rem, wake, metric_),
S (0), metric_sim (metric_)
{}
- SPageSimulated( const SPageWithMetric& p,
+ SPageSimulated (const SPageWithMetric& p,
TFloat metric_ = 0.)
: SPageWithMetric (p),
S (0), metric_sim (metric_)
@@ -169,7 +173,7 @@ struct SPageSimulated : public SPageWithMetric {
class CHypnogram {
protected:
- size_t _pagesize;
+ size_t _pagesize;
vector<SPage>
_pages;
public:
@@ -240,7 +244,7 @@ class CHypnogram {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/source-base.hh b/upstream/src/libsigfile/source-base.hh
index 0c7d487..7edcfaf 100644
--- a/upstream/src/libsigfile/source-base.hh
+++ b/upstream/src/libsigfile/source-base.hh
@@ -92,19 +92,13 @@ struct SArtifacts {
list<agh::alg::SSpan<double>>&
operator() ()
- {
- return obj;
- }
+ { return obj; }
const list<agh::alg::SSpan<double>>&
operator() () const
- {
- return obj;
- }
+ { return obj; }
bool empty() const
- {
- return obj.empty();
- }
+ { return obj.empty(); }
size_t total() const
{
size_t q = 0;
@@ -116,9 +110,7 @@ struct SArtifacts {
void mark_artifact( double aa, double az);
void clear_artifact( double aa, double az);
void clear_all()
- {
- obj.clear();
- }
+ { obj.clear(); }
float region_dirty_fraction( double a, double z) const;
@@ -237,28 +229,28 @@ class CSource {
no_field_consistency_check = 1<<2,
};
enum TStatus : int_least32_t {
- ok = 0,
- bad_header = (1 << 0),
- bad_numfld = (1 << 1),
- bad_datetime = (1 << 2),
- bad_session_or_episode = (1 << 3),
- nonkemp_signaltype = (1 << 4),
- non1020_channel = (1 << 5),
- dup_channels = (1 << 6),
- sysfail = (1 << 7),
- too_many_channels = (1 << 8),
+ ok = 0,
+ bad_header = (1 << 0),
+ bad_numfld = (1 << 1),
+ bad_datetime = (1 << 2),
+ bad_session_or_episode = (1 << 3),
+ nonkemp_signaltype = (1 << 4),
+ non1020_channel = (1 << 5),
+ dup_channels = (1 << 6),
+ sysfail = (1 << 7),
+ too_many_channels = (1 << 8),
missing_patient_id = (1 << 9),
invalid_subject_details = (1 << 10),
conflicting_channel_type = (1 << 11),
};
const static unsigned COMMON_STATUS_BITS = 11;
protected:
- string _filename;
+ string _filename;
int_least32_t
_status;
- int _flags;
+ int _flags;
agh::SSubjectId
_subject;
@@ -282,31 +274,29 @@ class CSource {
/// for similar reasons, some methods will revert to pure when called from CSource dtor
}
- int status() const { return _status; }
- int flags() const { return _flags; }
+ int status() const { return _status; }
+ int flags() const { return _flags; }
static string explain_status( int);
virtual string explain_status() const
{ return move(explain_status( _status)); }
enum TDetails { with_channels = 1, with_annotations = 2 };
- virtual string details( int which_details) const = 0;
+ virtual string details( int which_details) const = 0;
// identification
- const char* filename() const
- {
- return _filename.c_str();
- }
- const agh::SSubjectId& subject() const
- {
- return _subject;
- }
- virtual const char* patient_id() const = 0;
- virtual const char* recording_id() const = 0;
- virtual const char* comment() const = 0;
+ const char*
+ filename() const
+ { return _filename.c_str(); }
+ const agh::SSubjectId&
+ subject() const
+ { return _subject; }
+ virtual const char* patient_id() const = 0;
+ virtual const char* recording_id() const = 0;
+ virtual const char* comment() const = 0;
// probably parsed out of recording_id
- virtual const char* episode() const = 0;
- virtual const char* session() const = 0;
+ virtual const char* episode() const = 0;
+ virtual const char* session() const = 0;
// recording time and duration
time_t _start_time,
@@ -315,7 +305,7 @@ class CSource {
{ return _start_time; }
virtual time_t end_time() const
{ return _end_time; }
- virtual double recording_time() const = 0;
+ virtual double recording_time() const = 0;
virtual int set_start_time( time_t);
virtual int set_recording_date( const string&) = 0;
@@ -324,46 +314,44 @@ class CSource {
// channels
const static size_t max_channels = 1024;
- virtual size_t n_channels() const = 0;
- virtual list<SChannel> channel_list() const = 0;
- virtual bool have_channel( const SChannel&) const = 0;
- virtual int channel_id( const SChannel&) const = 0;
- virtual const SChannel& channel_by_id( int) const = 0;
+ virtual size_t n_channels() const = 0;
+ virtual list<SChannel> channel_list() const = 0;
+ virtual bool have_channel( const SChannel&) const = 0;
+ virtual int channel_id( const SChannel&) const = 0;
+ virtual const SChannel& channel_by_id( int) const = 0;
virtual SChannel::TType
signal_type( int) const = 0;
- virtual size_t samplerate( int) const = 0;
+ virtual size_t samplerate( int) const = 0;
// the following methods are pass-through:
// 1. annotations
// (a) per-channel
virtual list<SAnnotation>&
- annotations( int) = 0;
+ annotations( int) = 0;
virtual const list<SAnnotation>&
- annotations( int) const = 0;
+ annotations( int) const = 0;
// (b) common
virtual list<SAnnotation>&
- annotations() = 0;
+ annotations() = 0;
virtual const list<SAnnotation>&
- annotations() const = 0;
+ annotations() const = 0;
// artifacts
virtual SArtifacts&
- artifacts( int) = 0;
+ artifacts( int) = 0;
virtual const SArtifacts&
- artifacts( int) const = 0;
+ artifacts( int) const = 0;
// filters
virtual SFilterPack&
- filters( int) = 0;
+ filters( int) = 0;
virtual const SFilterPack&
- filters( int) const = 0;
+ filters( int) const = 0;
unsigned long
dirty_signature( int id) const
- {
- return artifacts(id).dirty_signature() + filters(id).dirty_signature();
- }
+ { return artifacts(id).dirty_signature() + filters(id).dirty_signature(); }
virtual int load_ancillary_files();
virtual int save_ancillary_files();
@@ -371,9 +359,9 @@ class CSource {
// setters
virtual int set_patient_id( const string&) = 0;
virtual int set_recording_id( const string&) = 0;
- virtual int set_episode( const string&) = 0;
- virtual int set_session( const string&) = 0;
- virtual int set_comment( const string&) = 0;
+ virtual int set_episode( const string&) = 0;
+ virtual int set_session( const string&) = 0;
+ virtual int set_comment( const string&) = 0;
// get samples
// original
@@ -474,7 +462,7 @@ class CSource {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/tsv.hh b/upstream/src/libsigfile/tsv.hh
index 03a724b..9a58805 100644
--- a/upstream/src/libsigfile/tsv.hh
+++ b/upstream/src/libsigfile/tsv.hh
@@ -34,11 +34,8 @@
using namespace std;
-
namespace sigfile {
-
-
class CTSVFile
: public CSource {
@@ -274,7 +271,7 @@ class CTSVFile
SChannel
ucd; // Universal Channel Designation, епта
- double scale;
+ double scale;
valarray<TFloat>
data;
@@ -333,9 +330,9 @@ class CTSVFile
enum TStatus : int_least32_t {
bad_channel_count = (1 << (COMMON_STATUS_BITS + 1)),
- bad_offset = (1 << (COMMON_STATUS_BITS + 2)),
- offsets_not_incteasing = (1 << (COMMON_STATUS_BITS + 3)),
- inoperable = (bad_header
+ bad_offset = (1 << (COMMON_STATUS_BITS + 2)),
+ offsets_not_incteasing = (1 << (COMMON_STATUS_BITS + 3)),
+ inoperable = (bad_header
| bad_numfld
| bad_datetime
| dup_channels
@@ -348,16 +345,17 @@ class CTSVFile
private:
// header...
- string _episode,
+ string _episode,
_session;
- TSubtype _subtype;
+ TSubtype
+ _subtype;
- size_t _samplerate;
+ size_t _samplerate;
- FILE *_f;
- char *_line0;
- size_t _line0_mallocked_bytes;
+ FILE *_f;
+ char *_line0;
+ size_t _line0_mallocked_bytes;
int _parse_header();
int _read_data();
@@ -371,7 +369,7 @@ class CTSVFile
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/typed-source.hh b/upstream/src/libsigfile/typed-source.hh
index 6e1980a..a62e6e3 100644
--- a/upstream/src/libsigfile/typed-source.hh
+++ b/upstream/src/libsigfile/typed-source.hh
@@ -102,7 +102,7 @@ struct SNamedChannel {
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigproc/exstrom.hh b/upstream/src/libsigproc/exstrom.hh
index 16a96b1..8d2d7d8 100644
--- a/upstream/src/libsigproc/exstrom.hh
+++ b/upstream/src/libsigproc/exstrom.hh
@@ -767,7 +767,7 @@ extern template valarray<TFloat> band_stop( const valarray<TFloat>&, size_t, flo
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigproc/ext-filters.hh b/upstream/src/libsigproc/ext-filters.hh
index 249a98c..8b7492a 100644
--- a/upstream/src/libsigproc/ext-filters.hh
+++ b/upstream/src/libsigproc/ext-filters.hh
@@ -213,7 +213,7 @@ class CFilterDUE
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigproc/sigproc.hh b/upstream/src/libsigproc/sigproc.hh
index b2311f6..7a1e853 100644
--- a/upstream/src/libsigproc/sigproc.hh
+++ b/upstream/src/libsigproc/sigproc.hh
@@ -333,7 +333,7 @@ phase_diff( const SSignalRef<T>& sig1,
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigproc/winfun.hh b/upstream/src/libsigproc/winfun.hh
index 8d938de..885f63d 100644
--- a/upstream/src/libsigproc/winfun.hh
+++ b/upstream/src/libsigproc/winfun.hh
@@ -46,7 +46,7 @@ extern TFloat (*winf[])(size_t, size_t);
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
--
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