From 153b34e490032d22fa71a7125fb78a120f9f848d Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 10 Aug 2023 00:04:24 -0700 Subject: Added some handy operators to Bu::BlobBuilder --- src/unstable/blobbuilder.cpp | 18 ++++++++++++++++++ src/unstable/blobbuilder.h | 3 +++ 2 files changed, 21 insertions(+) (limited to 'src/unstable') diff --git a/src/unstable/blobbuilder.cpp b/src/unstable/blobbuilder.cpp index 901c72e..3c55e3c 100644 --- a/src/unstable/blobbuilder.cpp +++ b/src/unstable/blobbuilder.cpp @@ -396,3 +396,21 @@ Bu::BlobBuilder &Bu::BlobBuilder::operator+=( const char chr ) return *this; } +Bu::BlobBuilder &Bu::BlobBuilder::operator<<( const Blob &rSrc ) +{ + append( rSrc ); + return *this; +} + +Bu::BlobBuilder &Bu::BlobBuilder::operator<<( const char *pSrc ) +{ + append( pSrc ); + return *this; +} + +Bu::BlobBuilder &Bu::BlobBuilder::operator<<( const char chr ) +{ + append( chr ); + return *this; +} + diff --git a/src/unstable/blobbuilder.h b/src/unstable/blobbuilder.h index 7ad4255..fd368fa 100644 --- a/src/unstable/blobbuilder.h +++ b/src/unstable/blobbuilder.h @@ -120,6 +120,9 @@ namespace Bu BlobBuilder &operator+=( const Blob &rSrc ); BlobBuilder &operator+=( const char *pSrc ); BlobBuilder &operator+=( const char chr ); + BlobBuilder &operator<<( const Blob &rSrc ); + BlobBuilder &operator<<( const char *pSrc ); + BlobBuilder &operator<<( const char chr ); private: }; }; -- cgit v1.2.3