-
Notifications
You must be signed in to change notification settings - Fork 0
/
dBinarySignal.h
executable file
·39 lines (38 loc) · 1.17 KB
/
dBinarySignal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// Created by Kurisu on 12/25/2020.
//
#ifndef LAB3_DBINARYSIGNAL_H
#define LAB3_DBINARYSIGNAL_H
#include <sstream>
#include <climits>
#include <numeric>
#include "state.h"
#include "util.h"
#define MAX_LENGTH 255
#define MAX_SIZE 200
using namespace std;
class dBinarySignal{
private:
struct state* data;
unsigned short size;
void resize(int size);
public:
dBinarySignal();
dBinarySignal(const dBinarySignal& old);
void flush();
~dBinarySignal();
struct state getState(int index);
void fill(stringstream& ss);
[[nodiscard]] unsigned short getSize() const;
explicit dBinarySignal(unsigned short level);
explicit dBinarySignal(const string& data);
friend ostream& operator<<(ostream& os, const dBinarySignal& bs);
friend void operator>>(istream& is, dBinarySignal& bs);
dBinarySignal& operator=(const dBinarySignal& rhs);
dBinarySignal& operator!();
dBinarySignal& operator+=(dBinarySignal rhs);
void operator()(int when, unsigned short level, unsigned char length);
dBinarySignal& operator*=(int count);
void operator()(int when, int length);
};
#endif //LAB3_DBINARYSIGNAL_H