Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement isArray() and arrayLength() #1692

Merged
merged 1 commit into from Dec 5, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions FWCore/Utilities/interface/TypeWithDict.h
Expand Up @@ -84,6 +84,7 @@ class TypeWithDict {
long getProperty() const;
bool isClass() const;
bool isConst() const;
bool isArray() const;
bool isEnum() const;
bool isFundamental() const;
bool isPointer() const;
Expand All @@ -98,6 +99,7 @@ class TypeWithDict {
std::string friendlyClassName() const;
std::string templateName() const;
size_t size() const;
size_t arrayLength() const;
size_t dataMemberSize() const;
size_t functionMemberSize() const;
MemberWithDict dataMemberByName(const std::string&) const;
Expand Down
20 changes: 20 additions & 0 deletions FWCore/Utilities/src/TypeWithDict.cc
Expand Up @@ -386,6 +386,16 @@ isConst() const
return gInterpreter->Type_IsConst(type_) || (property_ & (long) kIsConstant);
}

bool
TypeWithDict::
isArray() const
{
if (type_ == nullptr) {
return false;
}
return gInterpreter->Type_IsArray(type_);
}

bool
TypeWithDict::
isEnum() const
Expand Down Expand Up @@ -544,6 +554,16 @@ size() const
return gInterpreter->Type_Size(type_);
}

size_t
TypeWithDict::
arrayLength() const
{
if (type_ == nullptr) {
return 0;
}
return gInterpreter->Type_ArraySize(type_);
}

size_t
TypeWithDict::
dataMemberSize() const
Expand Down