6 #ifndef MATERIALX_PROPERTY_H
7 #define MATERIALX_PROPERTY_H
155 Element(parent, CATEGORY, name)
170 return addChild<Property>(
name);
176 return getChildOfType<Property>(
name);
182 return getChildrenOfType<Property>();
188 removeChildOfType<Property>(
name);
203 property = addProperty(name);
204 property->setValue(value,
type);
215 return property ?
property->getValue() :
ValuePtr();
PropertyPtr getProperty(const string &name) const
Return the Property, if any, with the given name.
shared_ptr< PropertySetAssign > PropertySetAssignPtr
A shared pointer to a PropertySetAssign.
shared_ptr< Collection > CollectionPtr
A shared pointer to a Collection.
const string & getPropertySetString() const
Return the property set string of this element.
virtual ~PropertySetAssign()
static const string PROPERTY_SET_ATTRIBUTE
shared_ptr< Property > PropertyPtr
A shared pointer to a Property.
#define MATERIALX_NAMESPACE_BEGIN
shared_ptr< const PropertySet > ConstPropertySetPtr
A shared pointer to a const PropertySet.
MATERIALX_NAMESPACE_BEGIN MX_CORE_API const string EMPTY_STRING
const string & getAttribute(const string &attrib) const
const string & getCollectionString() const
Return the collection string of this element.
static const string CATEGORY
void removeProperty(const string &name)
Remove the Property with the given name, if present.
void setProperty(const string &property)
Set the property string of this element.
vector< PropertyPtr > getProperties() const
Return a vector of all Property elements in the set.
PropertyAssign(ElementPtr parent, const string &name)
shared_ptr< PropertySet > PropertySetPtr
A shared pointer to a PropertySet.
static const string PROPERTY_ATTRIBUTE
bool hasCollectionString() const
Return true if this element has a collection string.
virtual ~PropertyAssign()
static const string GEOM_ATTRIBUTE
bool hasProperty() const
Return true if this element has a property string.
shared_ptr< PropertyAssign > PropertyAssignPtr
A shared pointer to a PropertyAssign.
const string & getProperty() const
Return the property string of this element.
GLuint const GLchar * name
shared_ptr< const PropertySetAssign > ConstPropertySetAssignPtr
A shared pointer to a const PropertySetAssign.
void setPropertySetString(const string &propertySet)
Set the property set string of this element.
PropertyPtr setPropertyValue(const string &name, const T &value, const string &type=EMPTY_STRING)
bool hasGeom() const
Return true if this element has a geometry string.
void setAttribute(const string &attrib, const string &value)
Set the value string of the given attribute.
void setGeom(const string &geom)
Set the geometry string of this element.
PropertySetAssign(ElementPtr parent, const string &name)
void setCollectionString(const string &collection)
Set the collection string of this element.
bool hasAttribute(const string &attrib) const
Return true if the given attribute is present.
static const string CATEGORY
PropertySet(ElementPtr parent, const string &name)
PropertyPtr addProperty(const string &name)
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
const string & getGeom() const
Return the geometry string of this element.
shared_ptr< const Collection > ConstCollectionPtr
A shared pointer to a const Collection.
#define MATERIALX_NAMESPACE_END
shared_ptr< const PropertyAssign > ConstPropertyAssignPtr
A shared pointer to a const PropertyAssign.
static const string COLLECTION_ATTRIBUTE
Property(ElementPtr parent, const string &name)
shared_ptr< Value > ValuePtr
A shared pointer to a Value.
ValuePtr getPropertyValue(const string &name) const
shared_ptr< const Property > ConstPropertyPtr
A shared pointer to a const Property.
bool hasPropertySetString() const
Return true if this element has a property set string.
static const string CATEGORY
static const string CATEGORY