source: SMSSender/lib/libdatatypes/src/business/BCBinary.cpp @ 41:680c6a482e9d

3.0
Last change on this file since 41:680c6a482e9d was 41:680c6a482e9d, checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
File size: 548 bytes
Line 
1/*
2 * BCBinary.cpp
3 *
4 *  Created on: Jun 17, 2009
5 *      Author: saemy
6 */
7
8#include "BCBinary.h"
9#include <string.h>
10
11BCBinary::BCBinary(){
12    data_ = (char*)"";
13    size_ = 0;
14}
15
16BCBinary::BCBinary(const char* data, const std::size_t& size){
17    BCBinary();
18
19    setData(data, size);
20}
21
22
23char* BCBinary::data() const{
24    return data_;
25}
26
27std::size_t BCBinary::size() const{
28    return size_;
29}
30
31
32void BCBinary::setData(const char* data, const std::size_t& size){
33    size_ = size;
34    data_ = new char[size];
35    memcpy(data_, data, size);
36}
Note: See TracBrowser for help on using the repository browser.