// // 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& SourceMap::Content::elements() { if (!m_elements.get()) throw ELEMENTS_NOT_SET_ERR; return *m_elements; } const SourceMap& SourceMap::Content::elements() const { if (!m_elements.get()) throw ELEMENTS_NOT_SET_ERR; return *m_elements; } SourceMap::Content::Content() { m_elements.reset(::new SourceMap); } SourceMap::Content::Content(const SourceMap::Content& rhs) { this->copy = rhs.copy; this->resource = rhs.resource; this->dataStructure = rhs.dataStructure; m_elements.reset(::new SourceMap(*rhs.m_elements.get())); } SourceMap::Content& SourceMap::Content::operator=(const SourceMap::Content& rhs) { this->copy = rhs.copy; this->resource = rhs.resource; this->dataStructure = rhs.dataStructure; m_elements.reset(::new SourceMap(*rhs.m_elements.get())); return *this; } SourceMap::Content::~Content() { } SourceMap::SourceMap(const Element::Class& element_) : element(element_) { } SourceMap::SourceMap(const SourceMap& rhs) { this->element = rhs.element; this->attributes = rhs.attributes; this->content = rhs.content; this->category = rhs.category; } SourceMap& SourceMap::operator=(const SourceMap& rhs) { this->element = rhs.element; this->attributes = rhs.attributes; this->content = rhs.content; this->category = rhs.category; return *this; } SourceMap::~SourceMap() { }