Lines Matching refs:attrName
78 inline void appendStrAttr(NodeType *e, const std::string &attrName, const std::string &attr) { in appendStrAttr() argument
79 e->SetAttribute(attrName.c_str(), attr.c_str()); in appendStrAttr()
113 inline bool getAttr(NodeType *root, const std::string &attrName, std::string *s) { in getAttr() argument
114 const char *c = root->Attribute(attrName.c_str()); in getAttr()
208 inline void appendAttr(NodeType *e, const std::string &attrName, const T &attr) const { in appendAttr()
209 return appendStrAttr(e, attrName, ::android::vintf::to_string(attr)); in appendAttr()
212 inline void appendAttr(NodeType *e, const std::string &attrName, bool attr) const { in appendAttr()
213 return appendStrAttr(e, attrName, attr ? "true" : "false"); in appendAttr()
248 inline bool parseOptionalAttr(NodeType* root, const std::string& attrName, T&& defaultValue, in parseOptionalAttr()
251 bool success = getAttr(root, attrName, &attrText) && in parseOptionalAttr()
260 inline bool parseAttr(NodeType* root, const std::string& attrName, T* attr, in parseAttr()
263 bool ret = getAttr(root, attrName, &attrText) && ::android::vintf::parse(attrText, attr); in parseAttr()
265 *error = "Could not find/parse attr with name \"" + attrName + "\" and value \"" + in parseAttr()
271 inline bool parseAttr(NodeType* root, const std::string& attrName, std::string* attr, in parseAttr()
273 bool ret = getAttr(root, attrName, attr); in parseAttr()
275 *error = "Could not find attr with name \"" + attrName + "\" for element <" + in parseAttr()