Sha256: 547412c9430148178c94672daabd9c27532344d5ec78f9200d21deecbc3e723d

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

//#include "Object.h"

{% for namespace in config.protocol.namespace %}
namespace {{namespace}} {
{% endfor %}

std::unique_ptr<Object> Object::parse(protocol::Value* value, ErrorSupport* errors)
{
    protocol::DictionaryValue* object = DictionaryValue::cast(value);
    if (!object) {
        errors->addError("object expected");
        return nullptr;
    }
    return wrapUnique(new Object(wrapUnique(static_cast<DictionaryValue*>(object->clone().release()))));
}

std::unique_ptr<protocol::DictionaryValue> Object::serialize() const
{
    return DictionaryValue::cast(m_object->clone());
}

std::unique_ptr<Object> Object::clone() const
{
    return wrapUnique(new Object(DictionaryValue::cast(m_object->clone())));
}

Object::Object(std::unique_ptr<protocol::DictionaryValue> object) : m_object(std::move(object)) { }

Object::~Object() { }

{% for namespace in config.protocol.namespace %}
} // namespace {{namespace}}
{% endfor %}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/deps/v8_inspector/third_party/WebKit/Source/platform/inspector_protocol/lib/Object_cpp.template
node-compiler-0.9.0 vendor/node-v7.2.1/deps/v8_inspector/third_party/WebKit/Source/platform/inspector_protocol/lib/Object_cpp.template
node-compiler-0.8.0 vendor/node-v7.2.0/deps/v8_inspector/third_party/WebKit/Source/platform/inspector_protocol/lib/Object_cpp.template
node-compiler-0.7.0 vendor/node-v7.1.0/deps/v8_inspector/third_party/WebKit/Source/platform/inspector_protocol/lib/Object_cpp.template