OGS
Layer.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <algorithm>
7#include <string>
8#include <vector>
9
10#include "Region.h"
11
12namespace FileIO
13{
14namespace Gocad
15{
16// Each model layer own several regions.
17struct Layer final
18{
19 std::vector<Region> regions;
20
21 bool hasRegion(Region const& r) const
22 {
23 return (std::find(regions.begin(), regions.end(), r) != regions.end());
24 }
25};
26
27std::ostream& operator<<(std::ostream& os, Layer const& l);
28
29Layer parseLayer(std::string const& line, std::vector<Region> const& regions);
30
31} // end namespace Gocad
32} // end namespace FileIO
std::ostream & operator<<(std::ostream &os, CoordinateSystem const &c)
Layer parseLayer(std::string const &line, std::vector< Region > const &regions)
Definition Layer.cpp:23
bool hasRegion(Region const &r) const
Definition Layer.h:21
std::vector< Region > regions
Definition Layer.h:19