Skip to content

Commit 385f6fa

Browse files
A simple way to inherit GalleyVectorStr to create a stamp, when your basic stamp is not parameterised. We can use templates in this case.
1 parent 98bc791 commit 385f6fa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

blobstamper/galley.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ class GalleyVectorStr: public GalleyVectorBase
5959
std::vector<std::string> ExtractStrVector(Blob &blob);
6060
};
6161

62+
template<class T> class GalleyVectorStrStampBase: public GalleyVectorStr, public StampBaseStr
63+
{
64+
protected:
65+
T * item_stamp_p;
66+
public:
67+
GalleyVectorStrStampBase(): GalleyVectorStr(*(item_stamp_p = new T())) {};
68+
~GalleyVectorStrStampBase() {delete item_stamp_p;};
69+
};
70+
71+
6272
class GalleyVectorBin: public GalleyVectorBase
6373
{
6474
StampBaseBin & b_stamp;

0 commit comments

Comments
 (0)