diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-01-06 11:35:35 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-01-06 11:35:35 +0100 |
commit | 3633bcc99aedda5d9ea36c143fa339139c763d3e (patch) | |
tree | 6c296bee8cfb6aabb292fe6fc040708c7e4d2e7a /src/Buffer.cpp | |
parent | 67c82c97dfcfc68d4bd71f5773d21c34c8733c83 (diff) | |
download | dabmod-3633bcc99aedda5d9ea36c143fa339139c763d3e.tar.gz dabmod-3633bcc99aedda5d9ea36c143fa339139c763d3e.tar.bz2 dabmod-3633bcc99aedda5d9ea36c143fa339139c763d3e.zip |
Replace EDI-to-ETI converter with a dedicated EDI source
Diffstat (limited to 'src/Buffer.cpp')
-rw-r--r-- | src/Buffer.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Buffer.cpp b/src/Buffer.cpp index fa7f52f..8631c42 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2,6 +2,11 @@ Copyright (C) 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) + + Copyright (C) 2016 + Matthias P. Braendli, matthias.braendli@mpb.li + + http://opendigitalradio.org */ /* This file is part of ODR-DabMod. @@ -44,6 +49,16 @@ Buffer::Buffer(size_t len, const void *data) setData(data, len); } +Buffer::Buffer(const std::vector<uint8_t> &vec) +{ + PDEBUG("Buffer::Buffer(vector [%zu])\n", vec.size()); + + this->len = 0; + this->size = 0; + this->data = NULL; + setData(vec.data(), vec.size()); +} + Buffer::~Buffer() { @@ -58,6 +73,11 @@ Buffer &Buffer::operator=(const Buffer ©) return *this; } +Buffer &Buffer::operator=(const std::vector<uint8_t> ©) +{ + setData(copy.data(), copy.size()); + return *this; +} Buffer &Buffer::operator+=(const Buffer ©) { |