12#ifndef HEPMC3_ATTRIBUTE_FEATURE_H
13#define HEPMC3_ATTRIBUTE_FEATURE_H
30 return [name](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).length() != 0;};
35 return p->attribute_as_string(
m_name).length() != 0;
43 return [other, name](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).compare(other) == 0;};
50 rhs->to_string(other);
51 return [other, name](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).compare(other) == 0;};
56 const std::string &name =
m_name;
57 return [name, rhs](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).compare(rhs) == 0;};
Definition of class Attribute, class IntAttribute and class StringAttribute.
Defines Filter operations for combingin Filters.
Filter exists() const
existence
bool operator()(ConstGenParticlePtr p) const
evaluate
AttributeFeature(const std::string &name)
constructor
Filter operator==(const Attribute &rhs) const
equality operator
std::string m_name
holds name
virtual bool to_string(std::string &att) const =0
Fill string from class content.
std::function< bool(ConstGenParticlePtr)> Filter
type of Filter