bool XMLElement::SetResourceRef(const ResourceRef& value) { if (!file_ || (!node_ && !xpathNode_)) return false; // Need the context to query for the type Context* context = file_->GetContext(); return SetAttribute("value", ea::string(context->GetTypeName(value.type_)) + ";" + value.name_); }
void JSONValue::AddResourceRefList(const ResourceRefList& value) { Context* context = file_->GetContext(); String str(context->GetTypeName(value.type_)); for (unsigned i = 0; i < value.names_.Size(); ++i) { str += ";"; str += value.names_[i]; } AddString(str); }
bool XMLElement::SetResourceRefList(const ResourceRefList& value) { if (!file_ || (!node_ && !xpathNode_)) return false; // Need the context to query for the type Context* context = file_->GetContext(); ea::string str(context->GetTypeName(value.type_)); for (unsigned i = 0; i < value.names_.size(); ++i) { str += ";"; str += value.names_[i]; } return SetAttribute("value", str.c_str()); }
void JSONValue::AddResourceRef(const ResourceRef& value) { Context* context = file_->GetContext(); AddString(String(context->GetTypeName(value.type_)) + ";" + value.name_); }
void JSONValue::SetResourceRef(const String& name, const ResourceRef& value) { Context* context = file_->GetContext(); SetString(name, String(context->GetTypeName(value.type_)) + ";" + value.name_); }