Skip to content

Commit 46fcef5

Browse files
committed
[Core] Add method IsTemplate to TClassEdit::TSplitType class
1 parent da55c31 commit 46fcef5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

core/foundation/inc/TClassEdit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ namespace TClassEdit {
143143
int IsSTLCont(int testAlloc=0) const;
144144
ROOT::ESTLType IsInSTL() const;
145145
void ShortType(std::string &answer, int mode);
146+
bool IsTemplate();
146147

147148
private:
148149
TSplitType(const TSplitType&); // intentionally not implemented

core/foundation/src/TClassEdit.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,13 @@ void TClassEdit::TSplitType::ShortType(std::string &answ, int mode)
463463
if (tailLoc) answ += fElements[tailLoc].c_str()+tailOffset;
464464
}
465465

466+
////////////////////////////////////////////////////////////////////////////////
467+
/// Check if the type is a template
468+
bool TClassEdit::TSplitType::IsTemplate()
469+
{
470+
return !fElements[0].empty();
471+
}
472+
466473
////////////////////////////////////////////////////////////////////////////////
467474
/// Converts STL container name to number. vector -> 1, etc..
468475
/// If len is greater than 0, only look at that many characters in the string.

0 commit comments

Comments
 (0)