Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit385f6fa

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 parent98bc791 commit385f6fa

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<classT>classGalleyVectorStrStampBase:publicGalleyVectorStr,publicStampBaseStr
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
classGalleyVectorBin:publicGalleyVectorBase
6373
{
6474
StampBaseBin & b_stamp;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp