Ejemplo n.º 1
0
Object Object::setObject (std::string const& key)
{
    checkWritable ("Object::setObject");
    if (writer_)
        writer_->startSet (Writer::object, key);
    return Object (this, writer_);
}
Ejemplo n.º 2
0
Object Array::appendObject ()
{
    checkWritable ("Array::appendObject");
    if (writer_)
        writer_->startAppend (Writer::object);
    return Object (this, writer_);
}
Ejemplo n.º 3
0
Array Array::appendArray ()
{
    checkWritable ("Array::makeArray");
    if (writer_)
        writer_->startAppend (Writer::array);
    return Array (this, writer_);
}
Ejemplo n.º 4
0
Object& Object::set (std::string const& key, Scalar value)
{
    checkWritable ("set");
    if (writer_)
        writer_->set (key, value);
    return *this;
}
Ejemplo n.º 5
0
Array& Array::append (Scalar value)
{
    checkWritable ("append");
    if (writer_)
        writer_->append (value);
    return *this;
}
Ejemplo n.º 6
0
Collection::Collection (Collection* parent, Writer* writer)
    : parent_ (parent), writer_ (writer), enabled_ (true)
{
    checkWritable ("Collection::Collection()");
    if (parent_)
    {
        check (parent_->enabled_, "Parent not enabled in constructor");
        parent_->enabled_ = false;
    }
}
Ejemplo n.º 7
0
Array Object::setArray (std::string const& key) {
    checkWritable ("Object::setArray");
    if (writer_)
        writer_->startSet (Writer::array, key);
    return Array (this, writer_);
}