CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
multi_line.h
Go to the documentation of this file.
1
12
13#ifndef MULTILINE_H
14#define MULTILINE_H
15/* ===============================================================================================================================
16 This file is part of CoastalME, the Coastal Modelling Environment.
17
18 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23===============================================================================================================================*/
24#include <vector>
25using std::vector;
26
27#include <utility>
28using std::pair;
29using std::make_pair;
30
31#include "2d_point.h"
32#include "line.h"
33
35{
36 private:
38 vector<vector<pair<int, int>>> m_prVVLineSegment;
39
40 protected:
41 public:
42 CGeomMultiLine(void);
43 ~CGeomMultiLine(void) override;
44
45 vector<CGeom2DPoint>& pGetPoints(void);
46 // void SetPoints(vector<CGeom2DPoint> const&);
47
48 void AppendLineSegment(void);
49 void AppendLineSegment(vector<pair<int, int>>*);
50 // void AppendLineSegmentAndInherit(void);
51 int nGetNumLineSegments(void) const;
52 void TruncateLineSegments(int const);
53 void InsertLineSegment(int const);
54 vector<vector<pair<int, int>>> prVVGetAllLineSegAfter(int const);
55 // void RemoveLineSegment(int const);
56
57 void AppendCoincidentProfileToLineSegments(pair<int, int> const);
58 void AddCoincidentProfileToExistingLineSegment(int const, int const, int const);
59 vector<pair<int, int>>* pprVGetPairedCoincidentProfilesForLineSegment(int const);
60 int nGetCoincidentProfileForLineSegment(int const, int const) const;
63 // bool bFindProfileInCoincidentProfilesOfLineSegment(int const, int const);
65 void GetMostCoastwardSharedLineSegment(int const, int&, int &);
66
67 int nGetProf(int const, int const) const;
68 int nGetProfsLineSeg(int const, int const) const;
69 void SetProfsLineSeg(int const, int const, int const);
70
71 // int nFindProfilesLastSeg(int const) const;
72};
73#endif // MULTILINE_H
Contains CGeom2DPoint definitions.
CGeomLine(void)
Constructor.
Definition line.cpp:27
int nGetProfsLineSeg(int const, int const) const
Returns the profile's own line segment, given a line segment and the index of the co-incident profile...
bool bFindProfileInCoincidentProfilesOfLastLineSegment(int const)
Returns true if the given profile number is amongst the coincident profiles of the CGeomMultiLine obj...
int nGetNumCoincidentProfilesInLineSegment(int const)
Returns the count of coincident profiles in a specified line segment, or -1 if the line segment does ...
bool bFindProfileInCoincidentProfiles(int const)
Returns true if the given profile number is one of the coincident profiles of the a specified line se...
void AppendLineSegment(void)
Appends a new empty line segment.
int nGetCoincidentProfileForLineSegment(int const, int const) const
Returns the numbers of coincident profiles.
int nGetProf(int const, int const) const
Returns the profile number, given a line segment and the index of the co-incident profile for that li...
vector< CGeom2DPoint > & pGetPoints(void)
Returns a pointer to the points of the CGeomLine.
void TruncateLineSegments(int const)
Cuts short the number of line segments.
vector< vector< pair< int, int > > > prVVGetAllLineSegAfter(int const)
Returns a vector of the line segments which succeed the specified line segment number.
void AppendCoincidentProfileToLineSegments(pair< int, int > const)
Appends a coincident profile pair to the CGeomMultiLine object's final line segment.
void GetMostCoastwardSharedLineSegment(int const, int &, int &)
Finds the number of the most coastward line segment for which the two profiles are coincident,...
void SetProfsLineSeg(int const, int const, int const)
Sets a profile's own line segment number, given a line segment and the index of the co-incident profi...
vector< pair< int, int > > * pprVGetPairedCoincidentProfilesForLineSegment(int const)
Returns a vector of pairs (a line segment)
CGeomMultiLine(void)
Constructor, no parameters.
void InsertLineSegment(int const)
Inserts a line segment, inheriting from preceding line segments.
~CGeomMultiLine(void) override
Destructor.
vector< vector< pair< int, int > > > m_prVVLineSegment
A vector of line segments, each element is a vector of pairs. The first of the pair is a co-incident ...
Definition multi_line.h:38
void AddCoincidentProfileToExistingLineSegment(int const, int const, int const)
Adds a coincident profile to a pre-existing line segment of the CGeomMultiLine object.
int nGetNumLineSegments(void) const
Appends a line segment which then inherits from the preceding line segments.
Contains CGeomLine definitions.