|
@@ -9,6 +9,7 @@ class Buffer {
|
|
int length = 0;
|
|
int length = 0;
|
|
|
|
|
|
public:
|
|
public:
|
|
|
|
+
|
|
template<typename T>
|
|
template<typename T>
|
|
Buffer& add(const T& t) {
|
|
Buffer& add(const T& t) {
|
|
int bytes = N - length;
|
|
int bytes = N - length;
|
|
@@ -23,6 +24,10 @@ public:
|
|
int getLength() const {
|
|
int getLength() const {
|
|
return length;
|
|
return length;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ operator const char*() const {
|
|
|
|
+ return data;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
#endif
|
|
#endif
|