Skip to content
Snippets Groups Projects
Commit 8ce6134e authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Added operator=() for attributes

parent 64016a22
No related branches found
No related tags found
No related merge requests found
......@@ -92,6 +92,22 @@ namespace mjcf
return *this;
}
/// Copy assignment operator for writing an attribute value.
template <class OtherDerived, class OtherAttrT>
Attribute& operator=(const Attribute<OtherDerived, OtherAttrT>& attribute)
{
this->set(attribute.get());
return *this;
}
/// Copy assignment operator for writing an attribute value.
template <class OtherDerived, class OtherAttrT>
Attribute& operator=(Attribute<OtherDerived, OtherAttrT>&& attribute)
{
this->set(attribute.get());
return *this;
}
/// Indicate whether the attribute is required (implies no default).
virtual bool isRequired() const = 0;
/// Indicate whether the attribute is optional or has a default.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment