Sha256: c2899cf54ffff183708857d3327ae137d8823e09713b104faf3f6fdcc8dd2912

Contents?: true

Size: 1.78 KB

Versions: 9

Compression:

Stored size: 1.78 KB

Contents

//
//  BlueprintSourcemap.cc
//  snowcrash
//
//  Created by Pavan Kumar Sunkara on 26/01/15.
//  Copyright (c) 2015 Apiary Inc. All rights reserved.
//

#include "BlueprintSourcemap.h"

using namespace snowcrash;

SourceMap<Elements>& SourceMap<Element>::Content::elements()
{
    if (!m_elements.get())
        throw ELEMENTS_NOT_SET_ERR;

    return *m_elements;
}

const SourceMap<Elements>& SourceMap<Element>::Content::elements() const
{
    if (!m_elements.get())
        throw ELEMENTS_NOT_SET_ERR;

    return *m_elements;
}

SourceMap<Element>::Content::Content()
{
    m_elements.reset(::new SourceMap<Elements>);
}

SourceMap<Element>::Content::Content(const SourceMap<Element>::Content& rhs)
{
    this->copy = rhs.copy;
    this->resource = rhs.resource;
    this->dataStructure = rhs.dataStructure;
    m_elements.reset(::new SourceMap<Elements>(*rhs.m_elements.get()));
}

SourceMap<Element>::Content& SourceMap<Element>::Content::operator=(const SourceMap<Element>::Content& rhs)
{
    this->copy = rhs.copy;
    this->resource = rhs.resource;
    this->dataStructure = rhs.dataStructure;
    m_elements.reset(::new SourceMap<Elements>(*rhs.m_elements.get()));

    return *this;
}

SourceMap<Element>::Content::~Content()
{
}

SourceMap<Element>::SourceMap(const Element::Class& element_)
: element(element_)
{
}

SourceMap<Element>::SourceMap(const SourceMap<Element>& rhs)
{
    this->element = rhs.element;
    this->attributes = rhs.attributes;
    this->content = rhs.content;
    this->category = rhs.category;
}

SourceMap<Element>& SourceMap<Element>::operator=(const SourceMap<Element>& rhs)
{
    this->element = rhs.element;
    this->attributes = rhs.attributes;
    this->content = rhs.content;
    this->category = rhs.category;

    return *this;
}

SourceMap<Element>::~SourceMap()
{
}

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
redsnow-0.4.4 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
lounge_lizard-0.1.4 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
lounge_lizard-0.1.3 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
lounge_lizard-0.1.2 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
lounge_lizard-0.1.1 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
lounge_lizard-0.1.0 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
redsnow-0.4.3 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
redsnow-0.4.1 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc
redsnow-0.4.0 ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc