34 m_attributes(attributes)
40 setAttributes(attributes);
46 setAttributes(attributes,n);
52 return m_attributes.size();
70 return setAttributes(attributes.begin(),attributes.end());
76 return setAttributes(attributes.begin(),attributes.end());
82 return setAttributes(attributes,attributes+n);
88 m_attributes.insert(name);
95 return addAttributes(attributes.begin(),attributes.end());
101 return addAttributes(attributes.begin(),attributes.end());
107 return addAttributes(attributes,attributes+n);
113 m_attributes.erase(name);
120 return removeAttributes(attributes.begin(),attributes.end());
126 return removeAttributes(attributes.begin(),attributes.end());
132 return removeAttributes(attributes,attributes+n);
138 m_attributes.clear();
145 return m_attributes.contains(name);
151 return hasAllAttributes(attributes.begin(), attributes.end());
157 return hasAllAttributes(attributes, attributes+n);
163 return hasOneOfAttributes(attributes.begin(), attributes.end());
169 return hasOneOfAttributes(attributes.begin(), attributes.end());
175 return hasOneOfAttributes (Attributes, Attributes + n);
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
CepsInt CepsAttribute
Used to define regions.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
constexpr CepsAttribute CepsUniversal
This attribute means "everywhere".
CepsBool hasAllAttributes(const CepsVector< CepsAttribute > &attributes) const
Tells if the entity has all the attributes in argument.
void addAttribute(const CepsAttribute &name)
Adds an attribute to the entity.
CepsBool hasOneOfAttributes(const CepsSet< CepsAttribute > &attributes) const
Tells if the entity has one of the attributes in argument.
void clearAttributes()
Removes all attributes from the entity.
void setAttributes(const CepsVector< CepsAttribute > &attributes)
Sets the attributes of the entity.
void addAttributes(const CepsVector< CepsAttribute > &attributes)
Adds several attributes to the entity.
void reset()
Equivalent to HoldsAttributes::clear()
CepsBool hasAttribute(const CepsAttribute &name) const
Tells if the entity has the attribute in argument.
CepsBool hasUniversalAttribute() const
Detect if the current entity has the attribute universal.
CepsSet< CepsAttribute > & getAttributes()
Returns the attributes of the entity.
void removeAttributes(const CepsSet< CepsAttribute > &attributes)
Removes several attributes from the entity.
HoldsAttributes()=default
Default constructor.
void removeAttribute(const CepsAttribute &name)
Removes an attribute from the entity.
CepsUInt getNumberOfAttributes() const
Returns number of attributes of the entity.