12 #ifndef HEPMC3_ATTRIBUTE_FEATURE_H
13 #define HEPMC3_ATTRIBUTE_FEATURE_H
27 std::string name = m_name;
28 return [name](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).length() != 0;};
31 bool operator()(ConstGenParticlePtr p)
const {
32 return p->attribute_as_string(m_name).length() != 0;
36 std::string name = m_name;
39 return [other, name](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).compare(other) == 0;};
42 Filter operator == (std::shared_ptr<const Attribute> rhs)
const {
43 std::string name = m_name;
45 rhs->to_string(other);
46 return [other, name](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).compare(other) == 0;};
49 Filter operator == (std::string rhs)
const {
50 const std::string &name = m_name;
51 return [name, rhs](ConstGenParticlePtr p)->
bool{
return p->attribute_as_string(name).compare(rhs) == 0;};
Forward declaration of GenParticle.
virtual bool to_string(std::string &att) const =0
Fill string from class content.
Defines Filter operations for combingin Filters.
std::function< bool(ConstGenParticlePtr)> Filter
type of Filter
Annotation for function names.
Definition of class Attribute, class IntAttribute and class StringAttribute.