File tree Expand file tree Collapse file tree 2 files changed +14
-28
lines changed
Expand file tree Collapse file tree 2 files changed +14
-28
lines changed Original file line number Diff line number Diff line change 11#pragma once
22#include < Arduino.h>
3- #include < GTL.h>
43#include < StringUtils.h>
54#include < limits.h>
5+ #include < GTL.h>
66
77// ============== const ==============
88#define BS_MAX_LEN ((size_t )0b0001111111111111 )
2727#define BS_LSB (x ) ((x) & 0xff )
2828
2929// ============== class ==============
30- class BSON : private gtl ::stack_uniq<uint8_t > {
30+ class BSON : private gtl ::stack<uint8_t > {
31+ typedef gtl::stack<uint8_t > ST;
32+
3133 public:
32- using gtl::stack_uniq<uint8_t >::write;
33- using gtl::stack_uniq<uint8_t >::concat;
34- using gtl::stack_uniq<uint8_t >::reserve;
35- using gtl::stack_uniq<uint8_t >::addCapacity;
36- using gtl::stack_uniq<uint8_t >::setOversize;
37- using gtl::stack_uniq<uint8_t >::length;
38- using gtl::stack_uniq<uint8_t >::buf;
39- using gtl::stack_uniq<uint8_t >::clear;
40- using gtl::stack_uniq<uint8_t >::move;
41-
42- BSON () {}
43- BSON (BSON& b) {
44- move (b);
45- }
46- BSON (BSON&& b) {
47- move (b);
48- }
49- BSON& operator =(BSON& b) {
50- move (b);
51- return *this ;
52- }
53- BSON& operator =(BSON&& b) {
54- move (b);
55- return *this ;
56- }
34+ using ST::addCapacity;
35+ using ST::buf;
36+ using ST::clear;
37+ using ST::concat;
38+ using ST::length;
39+ using ST::move;
40+ using ST::reserve;
41+ using ST::setOversize;
42+ using ST::write;
5743
5844 // максимальная длина строк и бинарных данных
5945 static size_t maxDataLength () {
Original file line number Diff line number Diff line change 11name =BSON
2- version =2.0.5
2+ version =2.1.0
33author =AlexGyver <alex@alexgyver.ru>
44maintainer =AlexGyver <alex@alexgyver.ru>
55sentence =Binary JSON packet builder for Arduino
You can’t perform that action at this time.
0 commit comments