swh:1:snp:6088ab52ef49920e01e3f334cdf4d5d6c8a822b9
Raw File
Tip revision: 31ab4b5fdaba1ee65ebe21d382bf46df8466dad7 authored by wenqing on 18 May 2021, 09:20:39 UTC
Merge branch 'TRM_update' into 'master'
Tip revision: 31ab4b5
Layer.h
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 */

#pragma once

#include <algorithm>
#include <string>
#include <vector>

#include "Region.h"

namespace FileIO
{
namespace Gocad
{
// Each model layer own several regions.
struct Layer final
{
    std::vector<Region> regions;

    bool hasRegion(Region const& r) const
    {
        return (std::find(regions.begin(), regions.end(), r) != regions.end());
    }
};

std::ostream& operator<<(std::ostream& os, Layer const& l);

Layer parseLayer(std::string const& line, std::vector<Region> const& regions);

}  // end namespace Gocad
}  // end namespace FileIO
back to top