Exemple #1
0
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_);
}
Exemple #2
0
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);
}
Exemple #3
0
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());
}
Exemple #4
0
void JSONValue::AddResourceRef(const ResourceRef& value)
{
    Context* context = file_->GetContext();
    AddString(String(context->GetTypeName(value.type_)) + ";" + value.name_);
}
Exemple #5
0
void JSONValue::SetResourceRef(const String& name, const ResourceRef& value)
{
    Context* context = file_->GetContext();
    SetString(name, String(context->GetTypeName(value.type_)) + ";" + value.name_);
}